forked from rapidftr/RapidFTR
-
Notifications
You must be signed in to change notification settings - Fork 0
Windows Offline Installer 1580
rdsubhas edited this page Mar 14, 2013
·
31 revisions
In some situations, we may need to install RapidFTR in places where there is no internet connectivity. Hence we need an offline installer package which can then be installed offline via a CD or USB drive.
- 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)
- Create the package in a separate, Sys-Admin machine, with full access to internet
- Copy it to the field in a CD or USB or any other medium
- Install it on a Field Netbook, which does not have any internet connection
- Windows XP SP3 and above
- 32-bit (64 bit is not yet supported by some gems, specially ImageMagick)
First step is to get all the dependencies (like CouchDB, Ruby, etc), and then to create the offline installer package.
- Download the following setup files (refer to footnote at end of this page for download locations):
- RailsInstaller
- CouchDB
- ImageMagick
- WiX 3.7
- Windows Imaging Component
- DotNet Framework
- Java Development Kit
Copy all these to the CD or USB that you intend to distribute.
- To create the installer, you must first install the following software in this order (refer to footnotes at end of this page for download instructions):
- RailsInstaller
- Windows Imaging Component (wic_x86_enu.exe) (install this only for Windows XP)
- DotNet Framework (4.0 for XP, 4.5 for Vista and above)
- Java Development Kit
- WiX
- 7-Zip (make a note where 7za.exe is present)
- 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"
- Update RubyGems version
gem install rubygems-update -v 1.8.25
update_rubygems
- Download RapidFTR code:
git clone https://github.com/rapidftr/RapidFTR.git
cd RapidFTR
- Download the gems:
del Gemfile.lock
bundle install --path=vendor\bundle
- Zip the entire codebase into one file:
<path-to-7za.exe>\7za.exe a -tzip Codebase.jar .\ -xr!.git -xr!spec -xr!test -xr!features -xr!capybara_features -xr!jmeter -xr!lib\tasks\windows
move Codebase.jar lib\tasks\windows\
- Generate the package using WiX:
cd lib\tasks\windows
set PATH=%PATH%;"C:\Program Files\WiX Toolset v3.7\bin"
candle -ext WixUtilExtension RapidFTR.wxs
light -ext WixUtilExtension -ext WixUIExtension RapidFTR.wixobj
The last step may throw some warnings, ignore them as long as everything says "warning".
- Run:
msiexec /i RapidFTR.msi /l*v Log.txt
- This will generate a file called Log.txt which will contain troubleshooting information
Once the dependencies are downloaded and the installer package is created, they can now be copied over to any medium for distribution.
- Copy all the setup files that were downloaded in the first step
- Copy lib\tasks\RapidFTR.msi which was generated in the second step
- First install all the external software one by one
- Finally install RapidFTR.msi
- During the first installation - you will be prompted if you have a CouchDB username/password. Say no - and it will create a default CouchDB username and password
- During subsequent installations, say "yes" and enter the CouchDB username/password
- RailsInstaller - Download the Windows Ruby 1.8 version
- CouchDB - Download the 1.2.1 Windows version
- ImageMagick - Download the static, x86 release (e.g. ImageMagick-x.y.z-Q16-x86-static.exe)
- DotNet Framework (4.0 for XP SP3, 4.5 for Vista and above)
- Java Development Kit - Download the JDK release, not the JRE
- Windows Imaging Component - required only for Windows XP, download "wic_x86_enu.exe"
- 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
- Google Chrome - Required since we don't support Internet Explorer officially
- Firefox