diff --git a/chaos_monkey/build_linux.sh b/chaos_monkey/build_linux.sh new file mode 100644 index 000000000..2a0ac738f --- /dev/null +++ b/chaos_monkey/build_linux.sh @@ -0,0 +1,2 @@ +#!/bin/bash +pyinstaller monkey-linux.spec diff --git a/chaos_monkey/build_py2exe.bat b/chaos_monkey/build_py2exe.bat deleted file mode 100644 index 1df0d1757..000000000 --- a/chaos_monkey/build_py2exe.bat +++ /dev/null @@ -1 +0,0 @@ -c:\Python27\python -m PyInstaller.main --name monkey -F -y --clean -i monkey.ico main.py diff --git a/chaos_monkey/build_py2exe_and_run.bat b/chaos_monkey/build_py2exe_and_run.bat deleted file mode 100644 index 57b073faf..000000000 --- a/chaos_monkey/build_py2exe_and_run.bat +++ /dev/null @@ -1,3 +0,0 @@ -c:\Python27\python -m PyInstaller.main --name monkey -F -y --clean -i monkey.ico main.py -move /Y dist\monkey.exe "%allusersprofile%\desktop\monkey.exe" -"%allusersprofile%\desktop\monkey.exe" m0nk3y diff --git a/chaos_monkey/build_windows.bat b/chaos_monkey/build_windows.bat new file mode 100644 index 000000000..6f65989ee --- /dev/null +++ b/chaos_monkey/build_windows.bat @@ -0,0 +1,2 @@ +REM c:\Python27\python -m PyInstaller.main --name monkey -F -y --clean -i monkey.ico main.py +c:\python27\Scripts\pyi-build.exe --upx-dir=.\bin monkey.spec diff --git a/chaos_monkey/monkey-linux.spec b/chaos_monkey/monkey-linux.spec new file mode 100644 index 000000000..b760f128e --- /dev/null +++ b/chaos_monkey/monkey-linux.spec @@ -0,0 +1,28 @@ +# -*- mode: python -*- + +block_cipher = None + + +a = Analysis(['main.py'], + pathex=['.'], + binaries=None, + datas=None, + hiddenimports=[], + hookspath=None, + runtime_hooks=None, + excludes=None, + win_no_prefer_redirects=None, + win_private_assemblies=None, + cipher=block_cipher) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + name='monkey', + debug=False, + strip=True, + upx=True, + console=True ) \ No newline at end of file diff --git a/chaos_monkey/monkey.spec b/chaos_monkey/monkey.spec new file mode 100644 index 000000000..254904154 --- /dev/null +++ b/chaos_monkey/monkey.spec @@ -0,0 +1,22 @@ +# -*- mode: python -*- +import platform +a = Analysis(['main.py'], + pathex=['.'], + hiddenimports=[], + hookspath=None, + runtime_hooks=None) + +if platform.system().find("Windows")>= 0: + a.datas = [i for i in a.datas if i[0].find('Include') < 0] + +pyz = PYZ(a.pure) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + name='monkey.exe', + debug=False, + strip=None, + upx=True, + console=True , icon='monkey.ico')