Many people create repaints for FSX aircraft, but there is no easy way to have an installer add the [fltsim.x] information into the correct aircraft.cfg file. This is usually left to the person who downloads the repaint, which is not very professional. AircraftTweak can help you automate this process, and creating a single exe which installs your repaint is fairly straightforward. But before you start, you will need to download and install Clickteam’s Install Creator, a free tool which lets you compress a set of files in one handy package. (click here to download). You will also need to download aircrafttweak.exe – you can download that here.
As an example, I will imagine I am the talented Michael Verlin, creating a new repaint for the HJG Boeing 707-320. Once my textures are painted and tested, I am ready to package all this up to upload to my favorite FSX library (I am using Micheal’s Pan Am 1961 repaint in the example below).
Ok, before we create our package, we will need to set up the files correctly. Create a new folder somewhere convenient and call it installer – we will be putting all the files which end up in your exe installer in this folder: the texture folder (in my example this is texture.pan_am_1961_321_n714pa), a copy of aircrafttweak.exe, and two new files we will make: source.txt and install_script.bat:
Now to create those new files: Source.txt is the install source file which will be used by aircrafttweak.exe – this is a plain text file which contains the [fltsim.x] section which needs to be inserted into the aircraft.cfg file, like so:
title=HJG B707-320 Pan American 1961
description=HJG Boeing 707-320 repaint by Michael VERLIN
ui_variation=Pan American (1961)
Note that this file should ONLY contain this info, and there should not be any empty lines between the lines of text.
Now the install_script.bat file. This contains the commands to both install the repaint, and clean up the temporary files afterward. The install_script.bat contains, in this example:
aircrafttweak.exe install_variant “HJG Boeing 707-320 v6” “.\source.txt” /COPY_TEXTURE_FOLDERS /DELETE_TEXTURE_FOLDERS_AFTER_INSTALL /DELETE_SOURCEFILE_AFTER_INSTALL
Ok, some important things to note about install_script.bat (especially the sections marked in red and blue above). The red text indicates which aircraft this repaint must be installed to. This should be exactly the same name as the folder name used by the aircraft. In my example, the 707 is installed on c:\program files\microsoft games\flight simulator x\simobjects\airplanes\hjg boeing 707-320 v6 which is why I use “hjg boeing 707-320 v6” (in quotes, very important) as that parameter. The blue text indicates which file aircrafttweak.exe will read the [fltsim.x] information from. You can name it to match your file, but you must put it in quotes, and preface it with a period and backslash like this: .\ You can keep all the other parameters the same in each installer. The aircrafttweak.pdf file describes what they all do if you are interested in the gory details.
Note for advanced users: Aircrafttweak.exe is smart enough to search all the SimObjectPaths.x sections of the FSX.cfg file for the aircraft to install to – so if you are installing a new variant to, for example, a MyTrafficX model, you can safely refer to it directly as, for instance, “A346MX” without having to specify any special path.
Ok, we have now gotten all the files required to install the repaint – we can now package this up into an installer. Start up the Install Creator. The Install Creator Wizard will come up. In the Directory page select your installer directory, and make sure that the Include sub-directories box is ticked ON:
In the Title page, add an informative title about your repaint (be sure to include what model it is for, so people know that they have the correct base model installed!):
The next two pages of the wizard you can leave on the default values (if you feel adventurous, you can experiment to get the look you like for your installer). In the Information page, add the following instruction to your users:
In order to enable the repaint, this installer needs to run install_script.bat. On the final page of this installer, you will be given the option to run this file. Please ensure that the checkbox next to install_script.bat on that page is left on.
It will look like this:
This is important, otherwise aircrafttweak.exe will not be able to enable the repaint for them. Ok, the next page of the wizard is the license page (add legal conditions there if you need them), and the page after that is the Installation Directory page. There are some important parameters to set here. Delete all the text in the textbox, and then from the > button, select Current User Directory:
You will see #UserDir# appears in the textbox. Now add to that \Temp\A name that describes your repaint. Be sure you have the Temp first, or you will be dumping little folders all over your user’s home folder! The name that describes your repaint can be any legal directory name:
Ok, the next page called Shell you can leave as is, but the page after that, called End Page Options needs some settings to be changed. The most important thing here is to set the file to run after installation to install_script.bat, like this:
Now on the final page of the installer (Uninstallation), check OFF the Uninstall program checkbox (the Install Creator cannot uninstall repaints, so it will give your users a false impression if you leave this on):
Now finish the wizard – Install Creator will want to build the installer. Select a folder to put the installer that is NOT the installer folder we have been using to prepare our package. I normally put this in another folder called zipfile, which I will use to make the zip file ready for upload. Before you exit the Install Creator, it would be a good idea to save your installer in case you need to make changes to it later.
Ok, now you should test your repaint. Deactivate the repaint and go to FSX to ensure that it does not appear in the aircraft list. Now run the installer to completion, and again return to FSX to ensure that your repaint does in fact appear.
Fixing errors: If your repaint does not install, the two most common errors are: (1) Your system does not have the registry key for FSX set (download this tool to fix that), or (2) you have made a typo in the name of the aircraft folder, and the target aircraft cannot be found by aircrafttweak.exe.
When your installer is done and tested, all you need to do is prepare the zip file to upload as usual.- don’t forget to add some screenshots and a text file with install instructions and your contact details as usual. In your instructions for installations, be sure to remind your users to not turn off the ‘Launch repaint’ checkbox on the last page of the installer!
: : : : : : : : :
Read Full Post »