mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-05-12 12:00:13 +00:00
Add ability to avoid starting QB64 after script is run
This commit is contained in:
parent
4635b3de59
commit
5031de2cd6
13
setup_lnx.sh
13
setup_lnx.sh
|
@ -1,6 +1,8 @@
|
|||
#!/bin/bash
|
||||
#QB64 Installer -- Shell Script -- Matt Kilgore 2013
|
||||
#Version 5 -- January 2020
|
||||
# QB64 Installer
|
||||
# Argument 1: If not blank, qb64 will not be started after compilation
|
||||
|
||||
dont_run="$1"
|
||||
|
||||
#This checks the currently installed packages for the one's QB64 needs
|
||||
#And runs the package manager to install them if that is the case
|
||||
|
@ -164,8 +166,11 @@ Path=$_pwd
|
|||
StartupNotify=false
|
||||
EOF
|
||||
|
||||
echo "Running QB64..."
|
||||
./qb64 &
|
||||
if [ -z "$dont_run" ]; then
|
||||
echo "Running QB64..."
|
||||
./qb64 &
|
||||
fi
|
||||
|
||||
echo "QB64 is located in this folder:"
|
||||
echo "`pwd`"
|
||||
echo "There is a ./run_qb64.sh script in this folder that should let you run qb64 if using the executable directly isn't working."
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
cd "$(dirname "$0")"
|
||||
# Argument 1: Location of qb64 (blank means current directory
|
||||
# Argument 2: If not blank, qb64 will not be started after compiltaion
|
||||
|
||||
cd "$(dirname "$1")"
|
||||
dont_run="$2"
|
||||
|
||||
Pause()
|
||||
{
|
||||
OLDCONFIG=`stty -g`
|
||||
|
@ -28,7 +33,7 @@ if [ -z "$(which clang++)" ]; then
|
|||
echo "Attempting to install Apple's Command Line Tools for Xcode..."
|
||||
echo "After installation is finished, run this setup script again."
|
||||
xcode-select --install
|
||||
Pause
|
||||
[ -z "$dont_run" ] && Pause
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -38,7 +43,7 @@ rm -f libqb_setup.o
|
|||
./setup_build.command
|
||||
if [ ! -f ./libqb_setup.o ]; then
|
||||
echo "Compilation of ./internal/c/libqb/os/osx/libqb_setup.o failed!"
|
||||
Pause
|
||||
[ -z "$dont_run" ] && Pause
|
||||
exit 1
|
||||
fi
|
||||
popd >/dev/null
|
||||
|
@ -49,7 +54,7 @@ rm -f src.o
|
|||
./setup_build.command
|
||||
if [ ! -f ./src.o ]; then
|
||||
echo "Compilation of ./internal/c/parts/video/font/ttf/os/osx/src.o failed!"
|
||||
Pause
|
||||
[ -z "$dont_run" ] && Pause
|
||||
exit 1
|
||||
fi
|
||||
popd >/dev/null
|
||||
|
@ -62,14 +67,17 @@ popd >/dev/null
|
|||
|
||||
echo ""
|
||||
if [ -f ./qb64 ]; then
|
||||
echo "Launching 'QB64'"
|
||||
./qb64
|
||||
if [ -z "$dont_run" ]; then
|
||||
echo "Launching 'QB64'"
|
||||
./qb64
|
||||
fi
|
||||
echo ""
|
||||
echo "Note: 'qb64' is located in same folder as this setup program."
|
||||
echo "Press any key to continue..."
|
||||
Pause
|
||||
[ -z "$dont_run" ] && Pause
|
||||
exit 0
|
||||
else
|
||||
echo "Compilation of QB64 failed!"
|
||||
Pause
|
||||
[ -z "$dont_run" ] && Pause
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -22,12 +22,12 @@ case "$2" in
|
|||
;;
|
||||
|
||||
lnx)
|
||||
./setup_lnx.sh 1>"$RESULTS_DIR/linux-setup.txt"
|
||||
./setup_lnx.sh "dont_run" 1>"$RESULTS_DIR/linux-setup.txt"
|
||||
assert_success_named "Linux setup" cat "$RESULTS_DIR/linux-setup.txt"
|
||||
;;
|
||||
|
||||
osx)
|
||||
./setup_osx.command 1>"$RESULTS_DIR/osx-setup.txt"
|
||||
./setup_osx.command "." "dont_run" 1>"$RESULTS_DIR/osx-setup.txt"
|
||||
assert_success_named "OSX setup" cat "$RESULTS_DIR/osx-setup.txt"
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue