added build scripts

This commit is contained in:
2025-05-13 00:25:46 +00:00
parent b9e84e1503
commit 09ccfe51b7
2 changed files with 49 additions and 0 deletions

30
build-linux.sh Normal file
View File

@ -0,0 +1,30 @@
#!/bin/bash
echo "Building Linux target (AppImage)..."
# It's good practice to navigate to the script's directory
# in case it's called from elsewhere, though for this simple case it might not be strictly necessary.
# cd "$(dirname "$0")"
echo "Running npm install (ensures Linux dependencies)..."
npm install
if [ $? -ne 0 ]; then
echo "npm install failed!"
exit 1
fi
echo "Running electron:build script for Linux..."
# The first '--' separates npm arguments from arguments for the script being run (electron-builder in this case).
# The second '--linux' is passed to electron-builder.
npm run electron:build -- --linux
if [ $? -ne 0 ]; then
echo "Build failed!"
exit 1
fi
echo "Linux build completed successfully!"
echo "Output AppImage is in the dist_electron directory."
exit 0

19
build-windows.bat Normal file
View File

@ -0,0 +1,19 @@
@echo off
echo Building Windows targets (NSIS installer and Portable)...
echo Running npm install...
call npm install
echo Running electron:build script...
call npm run electron:build
if %errorlevel% neq 0 (
echo Build failed!
exit /b %errorlevel%
)
echo Windows build completed successfully!
echo Output files are in the dist_electron directory.
echo Press any key to exit...
pause > nul