Skip to content

Commit

Permalink
test package with --onedir
Browse files Browse the repository at this point in the history
  • Loading branch information
triwinds committed Apr 12, 2024
1 parent b5c10e8 commit c32bf3e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
with:
path: dist/NsEmuTools-console.exe
name: NsEmuTools-console
- uses: actions/upload-artifact@v4
with:
path: dist/NsEmuTools.7z
name: NsEmuTools.7z
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
Expand Down
9 changes: 9 additions & 0 deletions build_tools/zip_files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from utils.package import compress_folder
from pathlib import Path


DIST_FOLDER = Path(__file__).parent.parent / 'dist'


if __name__ == '__main__':
compress_folder(DIST_FOLDER.joinpath('NsEmuTools'), DIST_FOLDER.joinpath('NsEmuTools.7z'))
4 changes: 2 additions & 2 deletions package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ chcp>nul 2>nul 65001
cd>nul 2>nul /D %~dp0
rem call venv\Scripts\activate.bat
rem pyinstaller --noconfirm --onefile --windowed --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./main_devnull.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools"
poetry run pyinstaller --noconfirm --onefile --console --upx-dir "./build_tools/upx/" --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./main.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools-console"
rem pyinstaller --noconfirm --onefile --console --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./ui_webview.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools-webview"
rem poetry run pyinstaller --noconfirm --onefile --console --upx-dir "./build_tools/upx/" --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./main.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools-console"
poetry run pyinstaller --noconfirm --windowed --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./main_devnull.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools"
pause
2 changes: 1 addition & 1 deletion package_all.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ cd>nul 2>nul /D %~dp0
rem call venv\Scripts\activate.bat
poetry run pyinstaller --noconfirm --onefile --windowed --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./main_devnull.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools"
poetry run pyinstaller --noconfirm --onefile --console --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./main.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools-console"
rem pyinstaller --noconfirm --onefile --console --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./ui_webview.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools-webview"
poetry run pyinstaller --noconfirm --windowed --icon "./web/favicon.ico" --add-data "./module/*.exe;./module/" --add-data "./web;web/" "./main_devnull.py" --additional-hooks-dir=".\\hooks" --name "NsEmuTools"
pause

0 comments on commit c32bf3e

Please sign in to comment.