Navigation Menu

Skip to content

Commit

Permalink
cx_freeze script and mods to .nsi for windows build -> issue 19 fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaatu committed Jun 5, 2016
1 parent 3b0dfe0 commit 266d39f
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 4 deletions.
43 changes: 43 additions & 0 deletions PACKAGERS
@@ -1,3 +1,46 @@
Packagers
=========

Linux
-----






Windows
-------

You have to package for Windows from Windows, so if you don't have Windows then
you cannot, I guess, package this application for it. If you try to package it on WINE and have success, let us know!!

Requirements
++++++++++++

To package on Windows, you must install these packages from the thirdparty directory:

* python 2.x
* nsis
* wxpython

as well as:

* `cx_freeze <https://sourceforge.net/projects/cx-freeze/>`_


Build
+++++

1. Build the project from a DOS (*not* Cygwin or BASH) shell:

.. code::
python setup.win.py build

2. This produces ``build\exe.win32-2.7``

3. Launch NSIS and choose ``Compile NSI Scripts``

4. Drag-and-drop the stopgo.nsi script into the NSIS window.

5. You now have ``stopgo-installer.exe``. It should be megabytes in size. If it is less than a few megabytes, you have done something wrong (probably you moved the ``.nsi`` script; it wants to co-exist with the ``exe.win32-2.7`` directory.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions thirdparty/windows/stopgo.nsi → build/stopgo.nsi
Expand Up @@ -53,17 +53,18 @@ section "install"
# StrCpy $INSTDIR "C:\Program Files\stopgo"
setOutPath $INSTDIR
# Files added here should be removed by the uninstaller (see section "uninstall")
file /r "usr\"
file /r "exe.win32-2.7\"
file "stopgo.ico"
file "license.txt"
# Add any other files for the install directory (license files, app data, etc) here

# Uninstaller - See function un.onInit and section "uninstall" for configuration
writeUninstaller "$INSTDIR\uninstall.exe"

# Start Menu
createDirectory "$SMPROGRAMS\${COMPANYNAME}"
createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\bin\stopgo" "" "$INSTDIR\stopgo.ico"
createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\stopgo.exe" "" "$INSTDIR\stopgo.ico"

# Registry information for add/remove programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayName" "${COMPANYNAME} - ${APPNAME} - ${DESCRIPTION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
Expand Down
2 changes: 1 addition & 1 deletion setup.win.py
Expand Up @@ -4,7 +4,7 @@

sys.path.append(os.path.join("usr","share","pyshared","stopgolibs"))
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os","app"], "excludes": ["tkinter","tcl","tk"]}
build_exe_options = {"packages": ["os","app"], "excludes": ["Tkinter"]}

# GUI applications require a different base on Windows (the default is for a
# console application).
Expand Down

0 comments on commit 266d39f

Please sign in to comment.