mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 00:00:22 +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
|
#!/bin/bash
|
||||||
#QB64 Installer -- Shell Script -- Matt Kilgore 2013
|
# QB64 Installer
|
||||||
#Version 5 -- January 2020
|
# 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
|
#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
|
#And runs the package manager to install them if that is the case
|
||||||
|
@ -164,8 +166,11 @@ Path=$_pwd
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "Running QB64..."
|
if [ -z "$dont_run" ]; then
|
||||||
./qb64 &
|
echo "Running QB64..."
|
||||||
|
./qb64 &
|
||||||
|
fi
|
||||||
|
|
||||||
echo "QB64 is located in this folder:"
|
echo "QB64 is located in this folder:"
|
||||||
echo "`pwd`"
|
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."
|
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()
|
Pause()
|
||||||
{
|
{
|
||||||
OLDCONFIG=`stty -g`
|
OLDCONFIG=`stty -g`
|
||||||
|
@ -28,7 +33,7 @@ if [ -z "$(which clang++)" ]; then
|
||||||
echo "Attempting to install Apple's Command Line Tools for Xcode..."
|
echo "Attempting to install Apple's Command Line Tools for Xcode..."
|
||||||
echo "After installation is finished, run this setup script again."
|
echo "After installation is finished, run this setup script again."
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
Pause
|
[ -z "$dont_run" ] && Pause
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -38,7 +43,7 @@ rm -f libqb_setup.o
|
||||||
./setup_build.command
|
./setup_build.command
|
||||||
if [ ! -f ./libqb_setup.o ]; then
|
if [ ! -f ./libqb_setup.o ]; then
|
||||||
echo "Compilation of ./internal/c/libqb/os/osx/libqb_setup.o failed!"
|
echo "Compilation of ./internal/c/libqb/os/osx/libqb_setup.o failed!"
|
||||||
Pause
|
[ -z "$dont_run" ] && Pause
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
@ -49,7 +54,7 @@ rm -f src.o
|
||||||
./setup_build.command
|
./setup_build.command
|
||||||
if [ ! -f ./src.o ]; then
|
if [ ! -f ./src.o ]; then
|
||||||
echo "Compilation of ./internal/c/parts/video/font/ttf/os/osx/src.o failed!"
|
echo "Compilation of ./internal/c/parts/video/font/ttf/os/osx/src.o failed!"
|
||||||
Pause
|
[ -z "$dont_run" ] && Pause
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
@ -62,14 +67,17 @@ popd >/dev/null
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
if [ -f ./qb64 ]; then
|
if [ -f ./qb64 ]; then
|
||||||
echo "Launching 'QB64'"
|
if [ -z "$dont_run" ]; then
|
||||||
./qb64
|
echo "Launching 'QB64'"
|
||||||
|
./qb64
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "Note: 'qb64' is located in same folder as this setup program."
|
echo "Note: 'qb64' is located in same folder as this setup program."
|
||||||
echo "Press any key to continue..."
|
echo "Press any key to continue..."
|
||||||
Pause
|
[ -z "$dont_run" ] && Pause
|
||||||
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Compilation of QB64 failed!"
|
echo "Compilation of QB64 failed!"
|
||||||
Pause
|
[ -z "$dont_run" ] && Pause
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -22,12 +22,12 @@ case "$2" in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
lnx)
|
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"
|
assert_success_named "Linux setup" cat "$RESULTS_DIR/linux-setup.txt"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
osx)
|
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"
|
assert_success_named "OSX setup" cat "$RESULTS_DIR/osx-setup.txt"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue