From c3056ab58ddf4ff821e6bde77ab7c08e73d2eb41 Mon Sep 17 00:00:00 2001 From: Nick Dyer Date: Sun, 30 May 2021 00:15:59 -0400 Subject: [PATCH] added compiling script, added pyinstaller to requirements.txt --- .gitignore | 4 +--- compile.py | 15 +++++++++++++++ requirements.txt | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 compile.py diff --git a/.gitignore b/.gitignore index 965b584..ac0ebfb 100644 --- a/.gitignore +++ b/.gitignore @@ -128,8 +128,6 @@ dmypy.json # Pyre type checker .pyre/ -# pocket-friends compile script -/compile.bat - # save file /pocket_friends/game_files/save.json + diff --git a/compile.py b/compile.py new file mode 100644 index 0000000..76e43c1 --- /dev/null +++ b/compile.py @@ -0,0 +1,15 @@ +import os +import PyInstaller.__main__ +import pocket_friends + +script_dir = os.path.dirname(__file__) + +PyInstaller.__main__.run([ + '{0}/pocket_friends/__main__.py'.format(script_dir), + '--clean', + '--noconsole', + '--onefile', + '--name=pocket_friends-{0}'.format(pocket_friends.__version__), + '--collect-all=pocket_friends', + '--icon={0}/pocket_friends/game_files/resources/images/icon/icon.ico'.format(script_dir) +]) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 125fed6..ebe6d05 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -pygame==1.9.4 \ No newline at end of file +pygame==1.9.4 +pyinstaller \ No newline at end of file