moved build scripts into install folder (#181)

This commit is contained in:
Micah Lee 2015-05-15 13:03:04 -07:00
parent 669750be37
commit 245ddd0300
18 changed files with 29 additions and 21 deletions

View File

@ -15,7 +15,7 @@ Note that python-stem appears in Debian wheezy and newer (so by extension Tails
```sh ```sh
sudo apt-get install -y build-essential fakeroot python-all python-stdeb python-flask python-stem python-qt4 sudo apt-get install -y build-essential fakeroot python-all python-stdeb python-flask python-stem python-qt4
./build_deb.sh ./install/build_deb.sh
sudo dpkg -i deb_dist/onionshare_*.deb sudo dpkg -i deb_dist/onionshare_*.deb
``` ```
@ -23,7 +23,7 @@ sudo dpkg -i deb_dist/onionshare_*.deb
```sh ```sh
sudo yum install -y rpm-build python-flask python-stem pyqt4 sudo yum install -y rpm-build python-flask python-stem pyqt4
./build_rpm.sh ./install/build_rpm.sh
sudo yum install -y dist/onionshare-*.rpm sudo yum install -y dist/onionshare-*.rpm
``` ```
@ -54,7 +54,7 @@ Each time you start work:
To build the .app: To build the .app:
```sh ```sh
pyinstaller -w -y setup/onionshare-osx.spec pyinstaller -w -y install/onionshare-osx.spec
``` ```
Now you should have `dist/OnionShare.app`. Now you should have `dist/OnionShare.app`.
@ -62,7 +62,7 @@ Now you should have `dist/OnionShare.app`.
To build a .dmg (this script builds the .app for you): To build a .dmg (this script builds the .app for you):
```sh ```sh
./build_dmg.sh ./install/build_dmg.sh
``` ```
Now you should have `dist/OnionShare.dmg`. Now you should have `dist/OnionShare.dmg`.
@ -95,13 +95,13 @@ If you want to sign binaries with Authenticode:
### To make a .exe: ### To make a .exe:
* Open a command prompt, cd into the onionshare directory, and type: `pyinstaller -y setup\onionshare-win.spec`. Inside the `dist` folder there will be a folder called `onionshare` with `onionshare.exe` in it. * Open a command prompt, cd into the onionshare directory, and type: `pyinstaller -y install\onionshare-win.spec`. Inside the `dist` folder there will be a folder called `onionshare` with `onionshare.exe` in it.
### To build the installer: ### To build the installer:
Note that you must have a code signing certificate installed in order to use the `build_exe.bat` script, because it tries code signing both `onionshare.exe` and `OnionShare_Setup.exe`. Note that you must have a code signing certificate installed in order to use the `install\build_exe.bat` script, because it tries code signing both `onionshare.exe` and `OnionShare_Setup.exe`.
Open a command prompt, cd to the onionshare directory, and type: `build_exe.bat` Open a command prompt, cd to the onionshare directory, and type: `install\build_exe.bat`
A NSIS window will pop up, and once it's done you will have `dist\OnionShare_Setup.exe`. A NSIS window will pop up, and once it's done you will have `dist\OnionShare_Setup.exe`.

View File

@ -1,9 +1,12 @@
#!/bin/sh #!/bin/sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
VERSION=`cat version` VERSION=`cat version`
# clean up from last build # clean up from last build
rm -r deb_dist rm -r deb_dist >/dev/null 2>&1
# build binary package # build binary package
python setup.py --command-packages=stdeb.command bdist_deb python setup.py --command-packages=stdeb.command bdist_deb

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
DMG_DIR=$ROOT/dist/dmg DMG_DIR=$ROOT/dist/dmg
DMG_TMP_NAME=$ROOT/dist/tmp.dmg DMG_TMP_NAME=$ROOT/dist/tmp.dmg
DMG_NAME=$ROOT/dist/OnionShare.dmg DMG_NAME=$ROOT/dist/OnionShare.dmg

View File

@ -1,5 +1,5 @@
REM use pyinstaller to builder a folder with onionshare.exe REM use pyinstaller to builder a folder with onionshare.exe
pyinstaller -y setup\onionshare-win.spec pyinstaller -y install\onionshare-win.spec
REM sign onionshare.exe REM sign onionshare.exe
signtool.exe sign /v /d "OnionShare" /a /tr "http://www.startssl.com/timestamp" dist\onionshare\onionshare.exe signtool.exe sign /v /d "OnionShare" /a /tr "http://www.startssl.com/timestamp" dist\onionshare\onionshare.exe
@ -8,7 +8,7 @@ REM run onionshare once, to compile the .py files into .pyc
dist\onionshare\onionshare.exe --help dist\onionshare\onionshare.exe --help
REM build an installer, dist\OnionShare_Setup.exe REM build an installer, dist\OnionShare_Setup.exe
makensisw setup\onionshare.nsi makensisw install\onionshare.nsi
REM sign OnionShare_Setup.exe REM sign OnionShare_Setup.exe
signtool.exe sign /v /d "OnionShare" /a /tr "http://www.startssl.com/timestamp" dist\OnionShare_Setup.exe signtool.exe sign /v /d "OnionShare" /a /tr "http://www.startssl.com/timestamp" dist\OnionShare_Setup.exe

View File

@ -1,9 +1,12 @@
#!/bin/sh #!/bin/sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
VERSION=`cat version` VERSION=`cat version`
# clean up from last build # clean up from last build
rm -r build dist rm -r build dist >/dev/null 2>&1
# build binary package # build binary package
python setup.py bdist_rpm --requires="python-flask, python-stem, pyqt4" python setup.py bdist_rpm --requires="python-flask, python-stem, pyqt4"

View File

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

@ -1,5 +1,5 @@
# -*- mode: python -*- # -*- mode: python -*-
a = Analysis(['setup/onionshare-launcher.py'], a = Analysis(['install/onionshare-launcher.py'],
pathex=['.'], pathex=['.'],
hiddenimports=['onionshare', 'onionshare_gui'], hiddenimports=['onionshare', 'onionshare_gui'],
hookspath=None, hookspath=None,
@ -48,5 +48,5 @@ app = BUNDLE(exe,
upx=True, upx=True,
name='OnionShare.app', name='OnionShare.app',
appname='OnionShare', appname='OnionShare',
icon='setup/onionshare.icns', icon='install/onionshare.icns',
version=open('version').read().strip()) version=open('version').read().strip())

View File

@ -1,5 +1,5 @@
# -*- mode: python -*- # -*- mode: python -*-
a = Analysis(['setup/onionshare-launcher.py'], a = Analysis(['install/onionshare-launcher.py'],
hiddenimports=['onionshare', 'onionshare_gui'], hiddenimports=['onionshare', 'onionshare_gui'],
hookspath=None, hookspath=None,
runtime_hooks=None) runtime_hooks=None)
@ -29,7 +29,7 @@ exe = EXE(pyz,
debug=False, debug=False,
strip=False, strip=False,
upx=True, upx=True,
icon='setup/onionshare.ico', icon='install/onionshare.ico',
console=False ) console=False )
coll = COLLECT(exe, coll = COLLECT(exe,
a.binaries, a.binaries,

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -4,9 +4,12 @@
# If you want to use it, you'll need your own ~/.dput.cf and ssh key. # If you want to use it, you'll need your own ~/.dput.cf and ssh key.
# More info: https://help.launchpad.net/Packaging/PPA/Uploading # More info: https://help.launchpad.net/Packaging/PPA/Uploading
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
VERSION=`cat version` VERSION=`cat version`
rm -rf deb_dist rm -rf deb_dist >/dev/null 2>&1
python setup.py --command-packages=stdeb.command sdist_dsc python setup.py --command-packages=stdeb.command sdist_dsc
cd deb_dist/onionshare-$VERSION cd deb_dist/onionshare-$VERSION
dpkg-buildpackage -S dpkg-buildpackage -S

View File

@ -64,8 +64,8 @@ setup(
include_package_data=True, include_package_data=True,
scripts=['bin/onionshare', 'bin/onionshare-gui'], scripts=['bin/onionshare', 'bin/onionshare-gui'],
data_files=[ data_files=[
(os.path.join(sys.prefix, 'share/applications'), ['setup/onionshare.desktop']), (os.path.join(sys.prefix, 'share/applications'), ['install/onionshare.desktop']),
(os.path.join(sys.prefix, 'share/pixmaps'), ['setup/onionshare80.xpm']), (os.path.join(sys.prefix, 'share/pixmaps'), ['install/onionshare80.xpm']),
(os.path.join(sys.prefix, 'share/onionshare/images'), [ (os.path.join(sys.prefix, 'share/onionshare/images'), [
'images/logo.png', 'images/logo.png',
'images/drop_files.png', 'images/drop_files.png',
@ -88,4 +88,3 @@ setup(
]) ])
] ]
) )