buildscript.pl - script to reprocess all or only changed parts of the project using one of Stunnix Obfuscators.
perl buildscript.pl [ --help ] [ --verbose ..] [ --nostop ] [ --force-one-by-one ] [ --list-autoadded-files ] [ --list-absent-files ] [ --list-unhandled-files ] [ --override-input-directory ..] [ --override-output-directory ..] [ --override-state-directory ..] [ --override-symbols-subdirectory ..] [ --op build|build-and-test|rebuildall-and-test| rebuildall|clearout|clearstate|clearall|no-op] [ filenames... ]
This is a perl script file that can be used to perform various operations on the project created in Stunnix Obfuscator Project Manager. This script can be recreated by running Stunnix Obfuscator Project Manager, then visiting Project menu and clicking on the menuitem Export as buildscript - you will be prompted to enter name of file to save this script to.
In order to run this script, type perl buildscript.pl [arguments].
This script can be used to rebuild all files, rebuild only ``dirty'' files, clear all output files and/or state files produced during build process - the operation performed is specified as the value of the op commandline option. It's possible to specify the set of files to apply operation to by passing space-separated list of file names (relative to the project ``input'' directory) after all commandline arguments. There are other switches to affect the behaviour.
This script is cross-platform, it will work correctly on any computer provided that paths listed in the script are correct for your system. It's possible to edit this file by hand in order to tweak commandline options or set of files, provided Perl language syntax is respected.
This script can be thought of as a replacement for Makefile for make utility, traditionally used for building large or complex projects. It's recommended to generate such script rather than to write Makefile instead since commandlines to be written are rather complex. So the recommended approach for people who prefer writing Makefiles for their projects is to create project in Stunnix Obfuscator Project Manager, properly assign all options, export the buildscript and then use the buildscript for building the project; if necessary, changes in the commandline options and adding set of files can be performed by editing this script (though using Stunnix Obfuscator Project Manager would still be more convenient for this task too).
If this script is invoked with empty commandline, all ``dirty'' output files (for which corresponding original files are more fresh than output files) will be rebuilt.
Execution is aborted in case error occurs during processing of some file. It's possible to not abort processing in case of error by passing option --nostop.
Specifies operation to be performed. Can be either of the following:
- Process only those files, which were changed after their protected version was built (or for which no protected version exists). This is the default operation, it's performed when no --op option was specified at all.
- Same as build, but also runs test command (specified in project options) if processing all files was successful. It's useful to run some testsuite or just navigate the browser to some page by using the test command.
- Processes all files in the project, without comparing the time of the modification of input and output files.
- Same as rebuild, but also runs but test command (specified in project options) if processing of all files was successful.
- Clear all output files.
- Clear all state files that were produced during building of the project - such files are typically lists of exceptions extracted automatically and mapping of original to protected symbols.
- Does everything that operations clearout and clearstate do.
- Does nothing. Useful with --list-autoadded-files to query various info about the project.
- Prints list of files in the project that got their processing mode autoassigned. Use with --op no-op to prevent any operation performed with files.
- Prints list of files inside input directory that are registered in the project but are missing in the filesystem. Use with --op no-op to prevent any operation performed with files.
- Prints list of files inside input directory that are neither registered in the project nor autoadded to the project. Use with --op no-op to prevent any operation performed with files.
- Passing this option multiplie types increases level of verbosity of its output.
- Do not abort if some error occured while processing some file.
- Forces protecting files one by one. This dramatically increases time it takes to protect the project. Use this option only for debugging obfuscator itself.
- --override-input-directory ..
- --override-output-directory ..
- --override-state-directory ..
- --override-symbols-subdirectory ..
- Override location of project's input directory, project's output directory, project's state directory or project's directory where names of symbols are stored. These command line options allow you to have several sets of project trees to be handled by a single buildscript. There is no need to override all these directories at once - you can e.g. override only project's input directory. If you've specified project's output or project's state directory as relative paths (either in project's settings or via these command line options), they will be handled correctly.
- Produces help on options the script supports.