mirror of https://github.com/leafspark/AutoGGUF
build: add cross-platform build scripts
This commit is contained in:
parent
89826de0b2
commit
6797ba1110
|
@ -9,6 +9,7 @@ __pycache__/
|
|||
!*.bat
|
||||
!*.txt
|
||||
!*.md
|
||||
!*.sh
|
||||
!LICENSE
|
||||
|
||||
# Allow assets folder
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 [RELEASE|DEV]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BUILD_TYPE=$1
|
||||
ICON_PATH="../../assets/favicon_large.png"
|
||||
ASSETS_PATH="../../assets"
|
||||
SRC_PATH="src/main.py"
|
||||
|
||||
case $BUILD_TYPE in
|
||||
RELEASE)
|
||||
OUTPUT_DIR="build/release"
|
||||
EXTRA_ARGS="--windowed"
|
||||
;;
|
||||
DEV)
|
||||
OUTPUT_DIR="build/dev"
|
||||
EXTRA_ARGS=""
|
||||
;;
|
||||
*)
|
||||
echo "Invalid build type. Use RELEASE or DEV."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Building $BUILD_TYPE version..."
|
||||
|
||||
pyinstaller $EXTRA_ARGS --onefile --name=AutoGGUF --icon=$ICON_PATH --add-data "$ASSETS_PATH:assets" --distpath=$OUTPUT_DIR/dist --workpath=$OUTPUT_DIR/build --specpath=$OUTPUT_DIR $SRC_PATH
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Build failed."
|
||||
exit 1
|
||||
else
|
||||
echo "Build completed successfully."
|
||||
fi
|
|
@ -0,0 +1,74 @@
|
|||
@echo off
|
||||
cls
|
||||
echo.
|
||||
echo . .
|
||||
echo . ^| .
|
||||
echo . . . .
|
||||
echo . . ^|. ^|.. .
|
||||
echo . ^| ^| ^| .
|
||||
echo . ^| ^| ^| ^| ^| .
|
||||
echo ." ^|...^| ."
|
||||
echo ." ." ^| ^|.
|
||||
echo ." ." ^| ^| .
|
||||
echo ." ." ^| ."
|
||||
echo ." ." ."
|
||||
echo ____." ." ."
|
||||
echo ." ."
|
||||
echo ." ."
|
||||
echo ." ." AutoGGUF Builder v1.337
|
||||
echo ." ." ~~~ Cracked by CODEX Team ~~~
|
||||
echo ."."
|
||||
echo ."."
|
||||
echo "."
|
||||
echo.
|
||||
echo +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|
||||
echo : Release Notes :
|
||||
echo : - Now with 100%% less Python dependency! :
|
||||
echo : - Added quantum entanglement for faster builds :
|
||||
echo : - Integrated AI to write better code than you :
|
||||
echo : - Free pizza with every successful compile (while stocks last) :
|
||||
echo +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|
||||
echo : Installation :
|
||||
echo : 1. Run this totally legit .bat file :
|
||||
echo : 2. Choose your poison: RELEASE or DEV :
|
||||
echo : 3. ??? :
|
||||
echo : 4. Profit! :
|
||||
echo +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|
||||
echo : System Requirements :
|
||||
echo : - A computer (duh) :
|
||||
echo : - Electricity (optional but recommended) :
|
||||
echo : - At least 3 brain cells :
|
||||
echo +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|
||||
echo.
|
||||
|
||||
if "%1"=="" (
|
||||
echo [!] ERROR: No build type specified. RTFM, n00b!
|
||||
echo Usage: build.bat [RELEASE^|DEV]
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if /I "%1"=="RELEASE" (
|
||||
echo [+] Initiating RELEASE build sequence...
|
||||
echo [+] Compressing code until it becomes a singularity...
|
||||
pyinstaller --windowed --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\release\dist --workpath=build\release\build --specpath=build\release src\main.py
|
||||
) else if /I "%1"=="DEV" (
|
||||
echo [+] Launching DEV build missiles...
|
||||
echo [+] Obfuscating code to confuse even its creator...
|
||||
pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets;assets" --distpath=build\dev\dist --workpath=build\dev\build --specpath=build\dev src\main.py
|
||||
) else (
|
||||
echo [!] FATAL ERROR: Invalid build type. Are you even trying?
|
||||
echo Use RELEASE or DEV, genius.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if errorlevel 1 (
|
||||
echo [-] Build failed. Blame the intern.
|
||||
exit /b 1
|
||||
) else (
|
||||
echo [+] Build completed successfully. Time to take credit for someone else's work!
|
||||
)
|
||||
|
||||
echo.
|
||||
echo +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|
||||
echo : Remember: Piracy is wrong. Unless you're really good at it. :
|
||||
echo +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|
|
@ -0,0 +1,75 @@
|
|||
#!/bin/bash
|
||||
|
||||
clear
|
||||
echo ""
|
||||
echo " . ."
|
||||
echo " . | ."
|
||||
echo " . . . ."
|
||||
echo " . . |. |.. ."
|
||||
echo " . | | | ."
|
||||
echo " . | | | | | ."
|
||||
echo " .\" |...| .\""
|
||||
echo " .\" .\" | |."
|
||||
echo " .\" .\" | | ."
|
||||
echo " .\" .\" | .\""
|
||||
echo " .\" .\" .\""
|
||||
echo "______.\" .\" .\""
|
||||
echo " .\" .\""
|
||||
echo " .\" .\""
|
||||
echo " .\" .\" AutoGGUF Builder v1.337"
|
||||
echo " .\" .\" ~~~ Cracked by CODEX Team ~~~"
|
||||
echo " .\".\" "
|
||||
echo " .\".\" "
|
||||
echo ".\". "
|
||||
echo ""
|
||||
echo "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+"
|
||||
echo ": Release Notes :"
|
||||
echo ": - Now with 100% less Python dependency! :"
|
||||
echo ": - Added quantum entanglement for faster builds :"
|
||||
echo ": - Integrated AI to write better code than you :"
|
||||
echo ": - Free pizza with every successful compile (while stocks last) :"
|
||||
echo "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+"
|
||||
echo ": Installation :"
|
||||
echo ": 1. Run this totally legit .sh file :"
|
||||
echo ": 2. Choose your poison: RELEASE or DEV :"
|
||||
echo ": 3. ??? :"
|
||||
echo ": 4. Profit! :"
|
||||
echo "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+"
|
||||
echo ": System Requirements :"
|
||||
echo ": - A computer (duh) :"
|
||||
echo ": - Electricity (optional but recommended) :"
|
||||
echo ": - At least 3 brain cells :"
|
||||
echo "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+"
|
||||
echo ""
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "[!] ERROR: No build type specified. RTFM, n00b!"
|
||||
echo " Usage: $0 [RELEASE|DEV]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "RELEASE" ]; then
|
||||
echo "[+] Initiating RELEASE build sequence..."
|
||||
echo "[+] Compressing code until it becomes a singularity..."
|
||||
pyinstaller --windowed --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/release/dist --workpath=build/release/build --specpath=build/release src/main.py
|
||||
elif [ "$1" = "DEV" ]; then
|
||||
echo "[+] Launching DEV build missiles..."
|
||||
echo "[+] Obfuscating code to confuse even its creator..."
|
||||
pyinstaller --onefile --name=AutoGGUF --icon=../../assets/favicon_large.png --add-data "../../assets:assets" --distpath=build/dev/dist --workpath=build/dev/build --specpath=build/dev src/main.py
|
||||
else
|
||||
echo "[!] FATAL ERROR: Invalid build type. Are you even trying?"
|
||||
echo " Use RELEASE or DEV, genius."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "[-] Build failed. Blame the intern."
|
||||
exit 1
|
||||
else
|
||||
echo "[+] Build completed successfully. Time to take credit for someone else's work!"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+"
|
||||
echo ": Remember: Piracy is wrong. Unless you're really good at it. :"
|
||||
echo "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+"
|
Loading…
Reference in New Issue