Choosing files and destination |
Top Previous Next |
A project window is the main window you will use when working with RubyEncoder encoder. It displays a RubyEncoder project which includes information about files to be encoded, encoding mode, target Ruby versions, locking and advanced options. You can save the project to a file using File/Save or File/Save As menu item. You may load a previously saved project using File/Open or choose from your recent projects using File/Open Recent menu item.
You need to create a RubyEncoder project before you can encode files. This is a simple process during which you will choose files to be encoded, select the destination folder, choose target Ruby versions, encoding mode and set encoding options. First two steps are required. All the other steps are optional.
1. Choose files for encoding.
Clicking on "Add" displays a standard dialog for selecting files or folders. You may either add separate files or add entire folders. You may set encoding mode for files or delete files from the project that you do not want to encode. No real deletion happens when you delete files or folders from the project using "Remove from Project" button. Clicking on "Remove from Project" simply excludes a file or folder from encoding.
Choose encoding mode for files or folders. There are 3 modes available:
To change encoding mode for a file or folder you need to choose it from the Type dropdown in the files list. Double click to select another encoding mode. You may select the encoding mode for each file separately or set it once for a folder. When you select the encoding mode for a folder, it will be assigned to all files and subfolders recursively.
When you add new files to the project, encoding modes are set automatically. This is done according to default settings in Preferences. You may change defaults there if you often need to make changes in encoding modes after adding new files.
You may build a new "tree" of your project instead of adding existing files and folders. Use "Create Folder" button to create a new folder within the project. You may change the Project Window Mode in Preferences. You may add files and folders to the newly created folders as usual. Files added to the project will be copied to the destination folder and encoded there replicating the folders structure of the project.
2. Choose a destination folder.
You need to select a destination folder where encoded files will be copied to. Files marked as "Copy unencoded" will be also copied to the destination folder as is without encoding. Click on 'Choose' button to select a destination folder. You may create a new folder by clicking on 'Create Folder' in the file dialog if you need.
3. Optionally set target Ruby versions.
RubyEncoder encoder produces different bytecodes for different Ruby versions to provide maximum compatibility and full support of Ruby language features. So you need to choose target Ruby versions for encoding. All versions of the internal bytecode for one source script will be packed into one protected script. Choose target Ruby versions by clicking checkboxes on the top of the project window. A new project will use default settings. You may change the default setting in Preferences.
Your choice should be easy when you know what version of Ruby is installed on the server where you plan to run your scripts. It is important to know which Ruby versions your code is compatible with and do a correct choice. Nothing bad will happen if you do a wrong choice. A built-in Ruby compiler will try to compile your code for each of the selected versions of Ruby and display an error message in the case your code is not compatible with any of the selected versions. Note, the entire script will NOT be encoded in that case and you can find details in the encoding log.
4. Optionally set locking options.
You may set many locking options which include IP address, domain name locks, hardware MAC address lock, machine ID lock, expire date lock etc. Click Lock to set locking options. Please refer to Locking options section for further details.
5. Optionally set advanced options.
You may set advanced options which include character encoding for Ruby 1.9.x and 2.x, custom header code, loader not found error handler etc. Click Advanced to set advanced options. Please refer to Advanced options section for further details.
6. Click Encode to start encoding.
If the Encode button is not available then you have not added files for encoding or have not chosen the destination folder yet. Please do it to proceed with encoding. You may hold down the Control/Command key on the keyboard before clicking the Encode in order to encode only selected files and folders in the list. It is useful if you need to re-encode only some files without doing it for the entire project.
Files and folders highlighting in the project tree
Files and folders may be shown highlighted in the project tree. The legend is: Folders - bold, virtual folders - green, files/folders changed or added since last encoding - blue. |