-
Notifications
You must be signed in to change notification settings - Fork 7
Bundling qbank
If you need a standalone qbank
executable (for running with unplatform, for example), then you can use pyinstaller
to create a bundle. This should work with OS X, Windows, or Linux, whatever pyinstaller
supports. Note that to create a bundle for a platform, you need to run pyinstaller
on that specific platform. You cannot build Windows bundles on OS X.
The bundled package will run on port 8080
unless you manually change main.py
and insert the port before bundling, like:
if (not is_test()) and __name__ == "__main__":
sys.argv.append('9123')
app.run()
This is because pyinstaller
does not allow you to include command line arguments as part of the bundling process.
There are many hidden imports in qbank
that need to be declared for pyinstaller
to include them. The best way to create the bundle is using the included spec
file.
pyinstaller main.spec
Once qbank
is bundled for unplatform
, it needs to get included in the unplatform
bundle. This is done by adding the qbank
executable to the qbank bundles repository.
- Clone / pull that repository.
- Add a directory with the
qbank
version. - Copy in the
qbank
executable to the new directory, renaming the file toqbank-lite-v#.#.#-32bit-ssl.exe
. - Commit and push those changes to
master
. - Checkout
release
branch. - Copy the
qbank
executable into therelease/
directory, renaming the file toqbank-lite-v#.#.#-32bit-ssl.exe
. - Remove the old
exe
file. - Commit and push those changes to
release
.
For example:
$ git pull
$ mkdir v3.14.4
$ cp ~/projects/qbank-lite/dist/main.exe v3.14.4/qbank-lite-v3.14.4-32bit-ssl.exe
$ git add .
$ git commit -m 'with qbank 3.14.4 bundle for windows'
$ git push
$ git checkout release
$ cp ~/projects/qbank-lite/dist/main.exe release/qbank-lite-v3.14.4-32bit-ssl.exe
$ git rm release/qbank-lite-v3.7.7-32bit-ssl.exe
$ git add .
$ git commit -m 'update released windows version'
$ git push