Advanced options |
Top Previous Next |
This field lets you assign ID to your project that is used to identify what license it should accept. Specify the same Project ID in the license generator when you generate a license file for this project (if you use a command line license generator tool). This option is useful when you want to deploy several products that use external license locking so that each license works only with the corresponding Project ID.
Project Key
This field is used in conjunction with Project ID and is required if you use external license locking. RubyEncoder license file locking algorithm uses an idea of two keys. The first key (Project Id) is stored within the encrypted area of protected scripts and used to decrypt an external license file. The second key (Project Key) is stored within the license file and used to decrypt the bytecode from the protected script. This algorithm protects your product against creating a full working copy from the demo version by some people who may be interested in this. In order to decrypt and run the protected script a valid license file for the full version of your product is required. Otherwise it's impossible to decrypt and run the bytecode. Project Id and Project Key values are required if external license protection method is selected.
Project ID and Project Key values are randomly generated for every new project. Usually you do not need to change them. If you need to use the same Project ID or Project Key value for any reasons (e.g. when creating different projects which share the same license file) you may change the values in Advanced options manually.
Encoding
Specify a target character encoding for Ruby 1.9.x and newer. This option does not make any sense for Ruby 1.8. RubyEncoder compiles source Ruby files to a binary representation, as a result 'magic comments' cannot be used for specifying character encoding of source files as they are read on the 'running' stage, not during compilation. Please use this RubyEncoder option when you are encoding files that have 'magic comments' in the code for specifying the character encoding.
Example 1: UTF-8 Example 2: ISO-8859-1
If not specified, UTF-8 is used by default
Enables Rails compatibility which lets you encode all Rails *.rb files (you can encode only pure Ruby files with RubyEncoder). Normally you can encode only application controllers, model and helper files. Other files if encoded would not work under Rails if the Rails compatibility mode was not used. If this option is selected, a more relaxed CRC checking will be used for protected scripts. This lets Rails engine use eval() for loading protected files.
Stop on compiler errors
This option instructs the encoder to stop encoding at first critical error. This may be useful if you have many files in the project and there is a risk of missing errors and leaving some files unencoded because of that.
Note: Even if this option is off you will be able to find all error messages in the encoding log.
Don't integrate dynamic loader
You may use this option if you don't want to include the default starter code into protected scripts. Scripts encoded using this option will not be able to automatically find and load an appropriate RubyEncoder loader and you have to start an appropriate loader before running the encoded script. This option is useful if you have multiple encoded files and want to start the RubyEncoder loader manually from your code maybe from the custom folder before running the protected files. When starting loaders manually you may either 'require' the loader.rb helper file which is available along with binary loaders or you may load the binary loader directly.
Note: if you select this option then "Loader not found error code" option has no effect (as the code is placed inside the default dynamic loader code).
Keep modification date for encoded files
This option instructs the encoder to keep the modification date for encoded files the same as modification date of source files. This may help in deploying only updated files and in some other cases of custom deployment of encoded files. The modification date for encoded files is set to the current date by default if this option is not used.
You may add any code and it will be inserted BEFORE the protected scripts code starts within protected files. This custom header code WILL NOT BE ENCODED. This should be syntactically correct Ruby code. Of course, it may by Ruby comments starting with a # symbol. This option is useful for including copyrights into protected scripts, adding custom error handlers for RubyEncoder errors.
All the user {constants} that are defined in locking options will be replaced in the header code. Also some standard RubyEncoder constants may be used:
{RG_DATE} - current date i.e. date of encoding {RG_LICENSEE} - RubyEncoder license owner from the RubyEncoder license file
Constant names are case sensitive. It works in the same way also for licgen and do replacements for custom text if it is used. See details
Loader not installed error code
By default a RubyEncoder protected script will generate an exception with the following message when the RubyEncoder Loader is not installed:
Ruby script '...' is protected by RubyEncoder and requires the RubyEncoder loader. Please visit the http://www.rubyencoder.com/loaders/ RubyEncoder site to download the required loader and unpack it into '.../rgloader/' directory to run this protected script. (RuntimeError)
It is possible for you to change the default loader error behavior. This option allows you to change the default error action of the protected script if it cannot find or load an appropriate RubyEncoder Loader file. You may use any Ruby code here and it will be executed as a replacement to the default RubyEncoder loader exception. This code WILL NOT BE ENCODED. If you want you may load the required RubyEncoder Loader with "require" directive from a non-standard directory instead of printing an error message.
Example:
puts "Loader is not found. Call 123-456-7890 for support"; exit(1);
The encoded script will have the defined code as unencoded:
Now a test run without a required RubyEncoder Loader installed:
>ruby hello.rb
License file custom text
This option lets you add a custom text that will be embedded as-is into the license file and therefore that text is readable. The text is protected with a checksum against modification. You may include any text such as user information, license description etc.
All user {constants} that are defined with the custom constant option will be replaced in the text. Also some standard RubyEncoder constants may be used:
{RG_DATE} - current date i.e. date of encoding {RG_LICENSEE} - RubyEncoder license owner from the RubyEncoder license file, i.e. your name. {RG_EXPIRY_DATE} - expiry date of the custom license you generate. If the expiry date is not set, a word "never" will be placed into the text
Constant names are case sensitive. It works in the same way also for the custom header in protected scripts. See details
Only encode files changed since last encoding
This option lets you encode only files that have been changed since when you encoded the project for the last time. The encoder saves the date and time of encoding in the project file. When this option is used the encoder checks your source files added to the project to find which files have been modified and encodes only them. This happens automatically when you open the project and you may turn this off/on in Preferences.
Additional command line options
This option lets you pass additional options to the command line encoder when it's being called for encoding the project. Normally, you do not need to add any options as all of the options are available on the 'Lock' and 'Advanced' windows in GUI. Use this on you own risk. Specifying unexpected options to the command line encoder may cause unexpected results or even files loss. If there are any issues with encoding of some code or issues with running encoded code, our support team may suggest that you pass some special options to the encoder using this line for debugging purposes.
|