-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch_code_journal.bat
More file actions
41 lines (36 loc) · 1.37 KB
/
Copy pathlaunch_code_journal.bat
File metadata and controls
41 lines (36 loc) · 1.37 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
echo Starting Code Journal...
REM Check if the executable exists in the dist folder
if exist "dist\CodeJournal.exe" (
echo Found existing CodeJournal.exe. Launching...
start "" "dist\CodeJournal.exe"
goto :eof
) else (
echo CodeJournal.exe not found in dist. Attempting to build...
python build.py
if errorlevel 1 (
echo Error: Failed to build Code Journal.
echo You can try running the script directly using: python app_gui.py
pause
exit /b 1
)
echo Build successful. Launching CodeJournal.exe...
if exist "dist\CodeJournal.exe" (
start "" "dist\CodeJournal.exe"
) else (
echo Error: CodeJournal.exe not found in dist even after build attempt.
pause
exit /b 1
)
goto :eof
)
:eof
REM The following lines for direct script execution are now effectively bypassed
REM if the .exe logic above succeeds and uses 'goto :eof'.
REM They can serve as a fallback if you comment out the .exe logic for development.
REM echo Running script directly (fallback or development mode)...
REM REM Ensure your Python environment is correctly set up if needed (e.g., activating a venv)
REM REM Example: CALL path\to\your\venv\Scripts\activate.bat
REM REM Use pythonw.exe to run app_gui.py without a console window
REM pythonw app_gui.py
REM REM Example: CALL deactivate (if you activated a venv)