Skip to content

Commit

Permalink
github actions - fix windows build v2
Browse files Browse the repository at this point in the history
  • Loading branch information
slatinsky committed Aug 12, 2024
1 parent 0602216 commit 55b29f4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- name: Run build script
run: src\BUILD_RELEASE.bat

- name: Verify build
run: if not exist release\dcef.exe exit 1

- name: Upload build folder
uses: actions/upload-artifact@v2
with:
Expand Down
18 changes: 9 additions & 9 deletions src/BUILD_RELEASE.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ mkdir "_temp"

@REM install windows-runner dependencies
if not exist "_temp\dcef\venv" (
py -m venv _temp\dcef\venv
call py -m venv _temp\dcef\venv
call _temp\dcef\venv\Scripts\activate
pip install -r requirements.txt
deactivate
call pip install -r requirements.txt
call deactivate
)
@REM Build windows-runner
py -m PyInstaller --onefile --name dcef --icon "../../icon.ico" --distpath "_temp/dcef/" --specpath "_temp/dcef/" --workpath "_temp/dcef/" ./dcef.py --paths "_temp\dcef\venv\Lib\site-packages"
Expand All @@ -41,10 +41,10 @@ move "_temp\dcef\dcef.exe" "..\release\dcef.exe"

@REM install preprocess dependencies
if not exist "_temp\preprocess\venv" (
py -m venv _temp\preprocess\venv
call py -m venv _temp\preprocess\venv
call _temp\preprocess\venv\Scripts\activate
pip install -r dcef\backend\preprocess\requirements.txt
deactivate
call pip install -r dcef\backend\preprocess\requirements.txt
call deactivate
)
@REM Build preprocess
py -m PyInstaller --onefile --name preprocess --icon "../../icon.ico" --distpath "_temp/preprocess/" --specpath "_temp/preprocess/" --workpath "_temp/preprocess/" ./dcef/backend/preprocess/main_mongo.py --paths "_temp\preprocess\venv\Lib\site-packages"
Expand All @@ -56,10 +56,10 @@ copy "dcef\backend\preprocess\emojiIndex.json" "..\release\dcef\backend\preproce

@REM install api-backend dependencies
if not exist "_temp\fastapi\venv" (
py -m venv _temp\fastapi\venv
call py -m venv _temp\fastapi\venv
call _temp\fastapi\venv\Scripts\activate
pip install -r dcef\backend\fastapi\requirements.txt
deactivate
call pip install -r dcef\backend\fastapi\requirements.txt
call deactivate
)
@REM build api-backend
py -m PyInstaller --onefile --name fastapi --icon "../../icon.ico" --distpath "_temp/fastapi/" --specpath "_temp/fastapi/" --workpath "_temp/fastapi/" ./dcef/backend/fastapi/prod.py -F --hidden-import "uvicorn.logging" --hidden-import "uvicorn.loops" --hidden-import "uvicorn.loops.auto" --hidden-import "uvicorn.protocols" --hidden-import "uvicorn.protocols.http" --hidden-import "uvicorn.protocols.http.auto" --hidden-import "uvicorn.protocols.websockets" --hidden-import "uvicorn.protocols.websockets.auto" --hidden-import "uvicorn.lifespan" --hidden-import "uvicorn.lifespan.on" --hidden-import "src.main" --paths "_temp\fastapi\venv\Lib\site-packages"
Expand Down
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pywebview==4.0.1
pywin32==305
pywin32==306
psutil==5.9.4

0 comments on commit 55b29f4

Please sign in to comment.