-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add Nuitka build script for Linux (build_optimized.sh) - update CHANGELOG.md for v1.9.1 - update README.md to match new version and features - improve clarity of CONTRIBUTING.md - sync Windows and Linux build scripts
- Loading branch information
Showing
8 changed files
with
114 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$1" ]; then | ||
echo "Usage: build_fast.sh [RELEASE|DEV]" | ||
exit 1 | ||
fi | ||
|
||
COMMON_FLAGS="--standalone --enable-plugin=pyside6 --include-data-dir=assets=assets" | ||
|
||
if [ "$1" == "RELEASE" ]; then | ||
echo "Building RELEASE version..." | ||
python -m nuitka $COMMON_FLAGS --windows-console-mode=disable --output-dir=build/release src/main.py --lto=yes | ||
elif [ "$1" == "DEV" ]; then | ||
echo "Building DEV version..." | ||
python -m nuitka $COMMON_FLAGS --output-dir=build/dev src/main.py | ||
else | ||
echo "Invalid argument. Use RELEASE or DEV." | ||
exit 1 | ||
fi | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Build failed." | ||
exit 1 | ||
else | ||
echo "Build completed successfully." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,31 @@ | ||
#!/bin/sh | ||
|
||
# Check if Python is installed | ||
if ! command -v python3 >/dev/null 2>&1; then | ||
echo "Error: Python 3 is not installed or not in the PATH." | ||
echo "Please install Python 3 and try again." | ||
exit 1 | ||
fi | ||
|
||
# Set environment variables | ||
export PYTHONIOENCODING=utf-8 | ||
export AUTOGGUF_LANGUAGE=en-US | ||
export AUTOGGUF_CHECK_BACKEND=disabled | ||
python3 src/main.py | ||
|
||
# Try to run main.py in the current directory | ||
if [ -f "main.py" ]; then | ||
echo "Running main.py in the current directory..." | ||
python3 main.py | ||
exit 0 | ||
fi | ||
|
||
# If main.py doesn't exist in the current directory, try src/main.py | ||
if [ -f "src/main.py" ]; then | ||
echo "Running src/main.py..." | ||
python3 src/main.py | ||
exit 0 | ||
fi | ||
|
||
# If neither file is found, display an error message | ||
echo "Error: Neither main.py nor src/main.py found." | ||
echo "Please make sure the script is in the correct directory." | ||
exit 1 |