-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwindows-build.bat
More file actions
41 lines (34 loc) 路 1.32 KB
/
Copy pathwindows-build.bat
File metadata and controls
41 lines (34 loc) 路 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
SETLOCAL ENABLEEXTENSIONS
:: Check for Python and get version
python --version > nul 2>&1
if %errorlevel% neq 0 (
echo Python is not installed or not in the PATH.
exit /b 1
)
:: Check if virtual environment exists
if not exist .venv (
echo Creating virtual environment...
python -m venv .venv
) else (
echo Virtual environment already exists.
)
:: Activate virtual environment
echo Activating virtual environment...
CALL .venv\Scripts\activate.bat
:: Check if a key dependency from requirements.txt is installed, replace 'yourmodule' with a real module name
python -c "import yourmodule" > nul 2>&1
if %errorlevel% neq 0 (
echo Installing dependencies...
pip install -r requirements.txt
) else (
echo Dependencies already installed.
)
:: Run Nuitka build command
echo Running Nuitka build...
python -m nuitka --standalone --include-data-dir=zenith/media=zenith/media --include-data-files=zenith/shortcuts.lua=zenith/shortcuts.lua --include-data-files=zenith/color_schemes.lua=zenith/color_schemes.lua --enable-plugin=pyqt6 --include-module=PyQt6.Qsci --windows-console-mode=disable --windows-icon-from-ico=zenith/media/icon.ico Nyxtext.py
:: Copy lupa package to Nyxtext.dist
echo Copying lupa package...
xcopy /E /I .venv\Lib\site-packages\lupa Nyxtext.dist\lupa\
echo Process completed.
ENDLOCAL