From 6d9e2d3c03d2032bf4c1fd44fa9c3e79061044da Mon Sep 17 00:00:00 2001 From: Paweł Jastrzębski Date: Thu, 7 Nov 2013 22:53:28 +0100 Subject: Added Linux build script --- setup.py | 15 ++++----------- setup.sh | 12 ++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 setup.sh diff --git a/setup.py b/setup.py index afb7bb8..4bee918 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 """ cx_Freeze build script for KCC. @@ -67,18 +68,10 @@ elif platform == "win32": appendScriptToLibrary=False, compress=True)]) else: - from cx_Freeze import setup, Executable - extra_options = dict( - options={"build_exe": {"include_files": ['LICENSE.txt', - ['other/Additional-LICENSE.txt', 'Additional-LICENSE.txt'] - ], "compressed": True}}, - executables=[Executable(MAIN, - icon="icons/comic2ebook.png", - copyDependentFiles=True, - appendScriptToExe=True, - appendScriptToLibrary=False, - compress=True)]) + print 'Please use setup.sh to build Linux package.' + exit() +#noinspection PyUnboundLocalVariable setup( name=NAME, version=VERSION, diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..11ed361 --- /dev/null +++ b/setup.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Linux Python package build script + +VERSION="3.5" + +cp kcc.py __main__.py +zip kcc.zip __main__.py kcc/*.py +echo "#!/usr/bin/env python2" > kcc-bin +cat kcc.zip >> kcc-bin +chmod +x kcc-bin +tar --xform s:^.*/:: --xform s/kcc-bin/kcc/ --xform s/comic2ebook/kcc/ -czf KindleComicConverter_linux_$VERSION.tar.gz kcc-bin LICENSE.txt icons/comic2ebook.png +rm __main__.py kcc.zip kcc-bin -- cgit 1.4.1