-
Notifications
You must be signed in to change notification settings - Fork 8
Creating a Final Distributable
To create a final distributable, you can create an easy-to-install version of unplatform
(with modules and assessment data). Example instructions and steps on how to do so are below. If you have other requirements for a final distribution (i.e. to include additional tools, synchronization software, etc.), you may have a different process to follow.
To create a macOS application (i.e. CLIx.app
), we use the Platypus application to create the .app
bundle, and dmgbuild to create a distributable installer.
- Run the
build_script_all_ssl.sh
script inscripts/build_scripts
. - Open Platypus.
- Set
Script Type
toBash
. - Set
Script Path
to point tobundle/unplatform_osx_ssl.sh
. - Update the
App Name
to just sayCLIx
. - Set the
Custom Icon
to the file frombundle/static/assets/clix.png
. - Set the
Identifier
toorg.clixindia.CLIx
. - Set the
Author
toCLIx
. - Set the
Version
to match the unplatform version. - Add to
Bundled Files
all of the directories and files inbundle/
except theunplatform_*.zip
file -- you don't need to re-include the zipped bundle. - Check that the fields look like this screenshot.
- Click
Create App
. - Select the target output directory from the pop-up.
- Wait. Sometimes Platypus will appear to hang / show a beach ball when it is copying over a large number of files. Be patient. When it is done, the screen will become interactive again.
- Verify that your output
CLIx.app
file runs. Double-clicking it should causeTerminal
to run bothunplatform
andqbank
, and in a browser you should be able to navigate tohttps://localhost:8888
(if Chrome does not automatically open it) and interact with the modules. NOTE: Because we have not signed the application with Apple Developer certificates, users will get a warning when they attempt to run this for the first time. They can option-click on the application, then click "Open anyways" to bypass the security check. - Now we create a
CLIx.dmg
installer so you can distribute the application. - In a virtual environment (preferred) or just in your global directory, type in
pip install dmgbuild
in aTerminal
window. - Depending on how many modules you are including, and the expected size of the final
.dmg
file, you may need to adjust thesize
value inclix_settings.py
(line 46). Currently it is set to3GB
. - Run
dmgbuild -s clix_settings.py "CLIx" CLIx.dmg
- Wait. You should see your
CLIx.dmg
file appear soon. Now you can distribute this to others.
Because the bundled files can reach over 2GB in size, you have to build this installer on a 64bit Windows machine (you can create a 32bit installer still). You'll also need NSISBI, plus all of the dependencies listed in its INSTALL
file. You will have to build NSISBI from source.
- Download and extract NSISBI.
- Install Python 2.7.14 (SCONS, the compiler used for NSISBI, does not support Python 3+).
- Install SCONS 3.
- Download and extract the precompiled zlib 1.2.7 dll.
- Install a Visual C++ compiler. I used the 2015 build tools, and it worked fine.
- In
Command Prompt
, set theZLIB_W32
environment variable to where you extractedzlib
from step 4.set ZLIB_32=C:\<path>\zlib127
. - Download and install wxWidgets.
- Run an elevated
Command Prompt
(right-click and selectRun as administrator
). - In the elevated
Command Prompt
, navigate to theNSISBI
folder that you extracted in step 1. Build withscons PREFIX="C:\Program Files\NSIS" install
. - Once the installation has finished, you can use
Explorer
to navigate toC:\Program Files\NSIS
. You should seemakensisw.exe
-- that's what we'll use to build the CLIx Installer. - Now, you need to install the
inetc
plugin forNSIS
. Download and unzip Inetc.zip. - Copy
Inetc\Plugins\x86-unicode\INetC.dll
toC:\Program Files\NSIS\Plugins\x86-unicode
. - Copy
Inetc\Plugins\x86-ansi\INetC.dll
toC:\Program Files\NSIS\Plugins\x86-ansi
.
- Run the
build_script_all_ssl.sh
script inscripts\build_scripts
. OR, download a pre-bundled*.zip
file from Google Drive and extract everything. - Copy the modules you want installed to
bundle\modules
. - Copy the corresponding unzipped
webapps
data bundle tobundle\webapps
. - Run the
C:\Program Files\NSIS\makensisw.exe
program. - In NSIS, click
File
, and load thebundle\clix.nsi
script. Watch it build. - Now you have a
CLIxInstaller.exe
that you can distribute!
The build scripts and steps provided here have been tested on Ubuntu 16.04, but theoretically should work on any other Debian platform.
You do not need any additional tools -- the build script provided will download and install the tools that it needs.
- Build the bundle or unzip a prepared bundle.
- Copy in the
modules
andwebapps
files into thebundle/
directory. - Run the
build_debian_package.sh
script. You will get prompted for two things:
- Your
sudo
password, to install some of the Debian build tools. - Verify that the Debian build information (e-mail, version, contact, etc.) are correct.
- Wait.
- After the build process is finished, you should see a Debian package in the
clix/
directory (sibling tobundle/
).
To install, you can use a package manager like GDebi. NOTE that there is a bug in Ubuntu, that may prevent from using the default Software Center to install third-party deb
packages. Alternatively, you can install from the command-line, using sudo dpkg -i <filename>.deb
.