This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Windows Installer Scripts
rdsubhas edited this page Jun 14, 2014
·
1 revision
- We are using WiX Toolset to generate the installer
- WiX toolset provides helper utilities and APIs on top of the Windows Installer API
- Normall we would use Visual Studio to develop for Windows Installer
- WiX can generate installers just using XML files and command line tools, all using the same Windows Installer API
- We decided against using any proprietary or non-open-source components (like InstallShield or Install4J)
- WiX 3.7 - The Installer toolset
- 7-Zip - Download the 7-Zip Command Line Version, and extract it. There will be a file called "7za.exe" which is the only file that we need. Make a note of where this 7za.exe is present, we will be needing it
- As well as all dependencies listed in Installing on Windows
- Windows XP SP3 and above
- 32-bit (64 bit is not yet supported by some gems, specially ImageMagick)
- To create the installer, you must have an active internet connection
- Download and install all the necessary software
- Rest of the steps are done in a command prompt
- Optional Make sure that third-party gem documentations are not installed, since they take a long time. Some of the "echo" commands may fail, but don't worry, its enough if one of these commands succeeds, and anyways this is an optional step that reduces your download time and doesn't affect the installer:
echo gem: --no-ri --no-rdoc > "C:\Documents and Settings\All Users\gemrc"
echo gem: --no-ri --no-rdoc > "C:\Documents and Settings\All Users\Application Data\gemrc"
echo gem: --no-ri --no-rdoc > "C:\gemrc"
echo gem: --no-ri --no-rdoc > "C:\Program Files\gemrc"
echo gem: --no-ri --no-rdoc > "C:\ProgramData\gemrc"
- Download RapidFTR code into C:\RapidFTR. NOTE: The installer will not be generated if you place this in any other drive.
C:
cd \
git clone https://github.com/rapidftr/RapidFTR.git
cd RapidFTR
- Cache the gems for packing into the installer:
del Gemfile.lock
bundle install
bundle package --all
- Compile the assets (NOTE: this may take quite some time)
bundle exec rake app:assets_precompile
- Copy 7za.exe from the 7-Zip software into "lib\tasks\windows"
copy <path-to-7za.exe> lib\tasks\windows\
- Zip the entire codebase into one file:
lib\tasks\windows\7za.exe a -tzip lib\tasks\windows\Codebase.zip .\ -xr!.git -xr!spec -xr!test -xr!features -xr!capybara_features -xr!jmeter -xr!lib\tasks\windows -xr!log -xr!tmp
- Generate the package using WiX:
cd lib\tasks\windows
del *.msi
set PATH=%PATH%;"C:\Program Files\WiX Toolset v3.7\bin"
candle -ext WixUtilExtension -ext WixUIExtension RapidFTR.wxs
light -ext WixUtilExtension -ext WixUIExtension RapidFTR.wixobj
The last step may throw some warnings, ignore them as long as everything says "warning".
- Now the installer is generated! It is available at:
lib\tasks\windows\RapidFTR.msi
- Run:
msiexec /i RapidFTR.msi /l*v Log.txt
- This will generate a file called Log.txt which will contain troubleshooting information