From 17f6c6311a8110fb2fa337b92244032db5aeb584 Mon Sep 17 00:00:00 2001 From: Valentin Marquez Date: Tue, 15 Oct 2024 04:01:01 -0300 Subject: [PATCH] reafact nikke_ocr.spec y ui.py --- .github/workflows/build-and-release.yml | 7 +++---- scripts/build.bat | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 01e322b..aed35c7 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -29,11 +29,10 @@ jobs: - name: Prepare release package run: | + # Create a release folder mkdir NIKKE-OCR-release - xcopy /E /I dist\NIKKE-OCR NIKKE-OCR-release\NIKKE-OCR - xcopy /E /I resources NIKKE-OCR-release\resources - copy launcher.py NIKKE-OCR-release\ - copy requirements\prod.txt NIKKE-OCR-release\requirements.txt + # Copy only the necessary files + xcopy /E /I dist\NIKKE-OCR NIKKE-OCR-release - name: Zip release package run: Compress-Archive -Path .\NIKKE-OCR-release -DestinationPath .\NIKKE-OCR.zip diff --git a/scripts/build.bat b/scripts/build.bat index 9ed451c..52953c6 100644 --- a/scripts/build.bat +++ b/scripts/build.bat @@ -41,6 +41,12 @@ if errorlevel 1 ( goto :error ) +:: Delete previous build files +echo Deleting previous build files... +rmdir /s /q "%ROOT_DIR%\dist" >nul 2>&1 +rmdir /s /q "%ROOT_DIR%\build" >nul 2>&1 + + :: Build with PyInstaller echo Building with PyInstaller... pyinstaller --clean "%ROOT_DIR%\nikke_ocr.spec" >nul 2>&1