<commit_before>= Building Base Installers =
Explains how to go about building the base installers (everything you need to distribute the program except custom vessel information).

'''NOTE:''' In order to build the Windows GUI installer, NSIS must be properly installed and configured on the system building the base installers. [wiki:NSISSystemSetup Click here] for quick detailed instructions on how to do this.
----
[[TOC(inline)]]
----
[[BR]]
== Sample Usage ==
Running from trunk/dist directory: [[BR]]
{{{
python make_base_installers.py at .. updaterkeys/updater.publickey updaterkeys/updater.privatekey outputdir [version]
}}}
----
[[BR]]
== Step by Step ==
----
 1. Make sure you are operating on a Linux system.
 1. Choose an output folder for the base installers. Note: If there are already base installers of the same names in this folder, they will be overwritten without warning.
 1. Navigate to the trunk/dist directory.
 1. Run the program (make_base_installers.py) with the following arguments:
   1. Various flags that will modify the behavior of the program. Include "m" to create a Mac installer, "l" to create a Linux installer, "w" to create a Windows installer, "i" to create a Windows Mobile installer, "a" to create installers for all supported Operating Systems, and "t" (optional) to include the test cases with the installers. Example: "mlt" will build Mac and Linux installers with test cases.
   1. The path to trunk; for example, ".." if you are running from the dist directory.
   1. The path to the public key that the installation will eventually use to communicate with the software updater.
   1. The path to the private key that the installation will eventually use to communicate with the software updater.
   1. The path to the output directory that you wanted any created installers to end up in.
   1. (Optional) The version of the installer which will be included in the installer name.
[[BR]]
== Using the base installers to test your code ==
----
You might often want to package up the code nicely so that you can easily test the current contents of your working directories on various systems. In this case, you might not care very much about the keys for the software updater or the vessel information. If this is true, then you can quickly and easily build installers by navigating to trunk/dist and running the following: 
{{{
python make_base_installers.py at .. updater_keys/updater.publickey updater_keys/updater.privatekey output/dir
}}}
Before running the installer on any system, you will want to first run "python nminit.py" from inside the install directory. This will generate some sample vessel information.<commit_msg>Revision 8 of BaseInstallers<commit_after>= Building Base Installers =
Explains how to go about building the base installers (everything you need to distribute the program except custom vessel information).

'''NOTE:''' In order to build the Windows GUI installer, NSIS must be properly installed and configured on the system building the base installers. [wiki:NSISSystemSetup Click here] for quick detailed instructions on how to do this.
----
[[TOC(inline)]]
----
[[BR]]
== Sample Usage ==
Running from trunk/dist directory: [[BR]]
{{{
python make_base_installers.py at .. updaterkeys/updater.publickey updaterkeys/updater.privatekey outputdir [version]
}}}
----
[[BR]]
== Step by Step ==
----
 1. Make sure you are operating on a Linux system.
 1. Choose an output folder for the base installers. Note: If there are already base installers of the same names in this folder, they will be overwritten without warning. A common directory would be /var/www/dist/ (The dist folder doesn't exist and must be created.)
 1. If a pair of public key and private key doesn't exist for the updater then the following steps must be followed.
   1. Create a temporary folder.
   1. Navigate to the trunk/ folder.
   1. Run the command:
{{{
python preparetest.py TEMP_FOLDER
}}}
      where the temp folder is the folder created in step 1.
   1. Navigate to the TEMP_FOLDER.
   1. Run the command:
{{{
python generatekey.py NAME_OF_YOUR_PUBKEY_PRIV_KEY
}}}
      An example would be:
{{{
python generatekey.py softwareupdater_key
}}}
   1. You can copy these two files over to where you want to store the keys. You can delete the TEMP_FOLDER and all its contents at this point if you want.
 1. Navigate to the trunk/dist directory.
 1. Run the program (make_base_installers.py) with the following arguments:
   1. Various flags that will modify the behavior of the program. Include "m" to create a Mac installer, "l" to create a Linux installer, "w" to create a Windows installer, "i" to create a Windows Mobile installer, "a" to create installers for all supported Operating Systems, and "t" (optional) to include the test cases with the installers. Example: "mlt" will build Mac and Linux installers with test cases.
   1. The path to trunk; for example, ".." if you are running from the dist directory.
   1. The path to the public key that the installation will eventually use to communicate with the software updater.
   1. The path to the private key that the installation will eventually use to communicate with the software updater.
   1. The path to the output directory that you wanted any created installers to end up in.
   1. (Optional) The version of the installer which will be included in the installer name.
[[BR]]
== Using the base installers to test your code ==
----
You might often want to package up the code nicely so that you can easily test the current contents of your working directories on various systems. In this case, you might not care very much about the keys for the software updater or the vessel information. If this is true, then you can quickly and easily build installers by navigating to trunk/dist and running the following: 
{{{
python make_base_installers.py at .. updater_keys/updater.publickey updater_keys/updater.privatekey output/dir
}}}
Before running the installer on any system, you will want to first run "python nminit.py" from inside the install directory. This will generate some sample vessel information.
{'fraction_non_alphanumeric': 0.06562193927522038, 'fraction_numerical': 0.004733920992491022, 'mean_word_length': 4.131490787269682, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5157513', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1529, 'n_words': 906}