diff options
author | Micah Lee <micah@micahflee.com> | 2014-06-26 18:57:28 -0400 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2014-06-26 18:57:28 -0400 |
commit | 9bf8814a921942192af59f91b9ced3d44ed0dfe2 (patch) | |
tree | 4206065490bc3071dba6afbb2c991adaffc288de | |
parent | 680b92e61db8776d62a6e7c7464759ef660eb2b2 (diff) | |
download | onionshare-9bf8814a921942192af59f91b9ced3d44ed0dfe2.tar.gz onionshare-9bf8814a921942192af59f91b9ced3d44ed0dfe2.zip |
simplified windows build system, and only include .pyc and not .py in windows installer package
-rw-r--r-- | BUILD.md | 11 | ||||
-rw-r--r-- | build_exe.bat | 8 | ||||
-rw-r--r-- | setup/onionshare.nsi | 10 |
3 files changed, 16 insertions, 13 deletions
@@ -62,9 +62,11 @@ Now you should have `dist/OnionShare.app`. To build a .dmg (this script builds the .app for you): ```sh -setup/build_dmg.sh +./build_dmg.sh ``` +Now you should have `dist/OnionShare.dmg`. + ## Windows The first time you're setting up your dev environment: @@ -89,8 +91,11 @@ If you want to build the installer: To build the installer: -* Follow the steps above until to make the .exe. You should have a folder called `dist\onionshare` with a bunch of files inside of it, including `onionshare.exe`. Run `onionshare.exe` once before you build the installer, to compile all the `.py` files into `.pyc` files. -* Open a command prompt, cd into the onionshare directory, and type: `makensisw setup\onionshare.nsi`. You'll find the installer, `OnionShare_Setup.exe`, inside the `dist` folder. +* Open a command prompt, cd to the onionshare directory, and type: + +`build_exe.bat` + +A NSIS window will pop up, and once it's done you will have `dist\OnionShare_Setup.exe`. ## Tests diff --git a/build_exe.bat b/build_exe.bat new file mode 100644 index 00000000..1fe4bd4d --- /dev/null +++ b/build_exe.bat @@ -0,0 +1,8 @@ +REM use pyinstaller to builder a folder with onionshare.exe
+pyinstaller -y setup\onionshare-win.spec
+
+REM run onionshare once, to compile the .py files into .pyc
+dist\onionshare\onionshare.exe --help
+
+REM build an installer, dist\OnionShare_Setup.exe
+makensisw setup\onionshare.nsi
\ No newline at end of file diff --git a/setup/onionshare.nsi b/setup/onionshare.nsi index 4c37a62a..78c8ce81 100644 --- a/setup/onionshare.nsi +++ b/setup/onionshare.nsi @@ -47,18 +47,13 @@ Section "install" File "${BINPATH}\onionshare\404.html"
File "${BINPATH}\onionshare\__init__.pyc"
File "${BINPATH}\onionshare\index.html"
- File "${BINPATH}\onionshare\onionshare.py"
- File "${BINPATH}\onionshare\__init__.py"
File "${BINPATH}\onionshare\onionshare.pyc"
File "${BINPATH}\onionshare\strings.json"
SetOutPath "$INSTDIR\onionshare_gui"
- File "${BINPATH}\onionshare_gui\__init__.py"
File "${BINPATH}\onionshare_gui\onionshare_gui.pyc"
- File "${BINPATH}\onionshare_gui\webapp.py"
File "${BINPATH}\onionshare_gui\webapp.pyc"
File "${BINPATH}\onionshare_gui\onionshare-icon.png"
File "${BINPATH}\onionshare_gui\__init__.pyc"
- File "${BINPATH}\onionshare_gui\onionshare_gui.py"
SetOutPath "$INSTDIR\onionshare_gui\templates"
File "${BINPATH}\onionshare_gui\templates\index.html"
SetOutPath "$INSTDIR\onionshare_gui\static"
@@ -173,12 +168,9 @@ Section "uninstall" Delete "$INSTDIR\onionshare\404.html"
Delete "$INSTDIR\onionshare\__init__.pyc"
Delete "$INSTDIR\onionshare\index.html"
- Delete "$INSTDIR\onionshare\onionshare.py"
- Delete "$INSTDIR\onionshare\__init__.py"
Delete "$INSTDIR\onionshare\onionshare.pyc"
Delete "$INSTDIR\onionshare\strings.json"
Delete "$INSTDIR\onionshare_gui\__init__.pyc"
- Delete "$INSTDIR\onionshare_gui\onionshare_gui.py"
Delete "$INSTDIR\onionshare_gui\templates"
Delete "$INSTDIR\onionshare_gui\templates\index.html"
Delete "$INSTDIR\onionshare_gui\static"
@@ -188,9 +180,7 @@ Section "uninstall" Delete "$INSTDIR\onionshare_gui\static\style.css"
Delete "$INSTDIR\onionshare_gui\static\loader.gif"
Delete "$INSTDIR\onionshare_gui\static\helpers.js"
- Delete "$INSTDIR\onionshare_gui\__init__.py"
Delete "$INSTDIR\onionshare_gui\onionshare_gui.pyc"
- Delete "$INSTDIR\onionshare_gui\webapp.py"
Delete "$INSTDIR\onionshare_gui\webapp.pyc"
Delete "$INSTDIR\onionshare_gui\onionshare-icon.png"
Delete "$INSTDIR\qt4_plugins\accessible\qtaccessiblewidgets4.dll"
|