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 11, 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:
- RailsInstaller - download the Windows Ruby 1.8 version
- CouchDB
- ImageMagick - download the static, x86 release
- DotNet Framework (4.0 for XP SP3, 4.5 for Vista and above)
- Java Development Kit
- Windows Imaging Component - required only for Windows XP, download "wic_x86_enu.exe"
- WiX 3.7 - the Installer toolset
Copy all these to the CD or USB that you intend to distribute.
- Install the following for creating the package:
- RailsInstaller
- Windows Imaging Component (wic_x86_enu.exe) (only for XP)
- DotNet Framework (4.0 for XP, 4.5 for Vista and above)
- Java Development Kit
- WiX
- Rest of the steps are done in a command prompt
- Download all the required gems, but first make sure they don't install unnecessary Gem documentation:
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"
Some of the above "echo" commands may fail, but don't worry, one of these files will make sure that Gem documentation is not downloaded.
- 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:
bundle install --path=vendor\bundle --without cucumber development test
- Zip the entire codebase into one file:
set RAILS_ENV=standalone
bundle exec rake windows:package
- Generate the package using WiX:
set PATH=%PATH%;"C:\Program Files\WiX Toolset v3.7\bin"
cd lib\tasks\windows
candle -ext WixUtilExtension RapidFTR.wxs
light -ext WixUtilExtension -ext WixUIExtension RapidFTR.wixobj
- 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