Several bug fixes in installer.

This commit is contained in:
Scott Duensing 2019-07-13 17:44:56 -05:00
parent 0315c83012
commit 69b4aa5347

View file

@ -52,19 +52,21 @@ function buildPCDeps() {
fi fi
mkdir -p ${PREFIX} mkdir -p ${PREFIX}
pushd deps >& /dev/null pushd deps &> /dev/null
export CC="${CC_EXPORT}" export CC="${CC_EXPORT}"
export CXX="${CXX_EXPORT}" export CXX="${CXX_EXPORT}"
# SDL2 # SDL2
if [[ ! -d SDL ]]; then
echo "" echo ""
tBoldBox tPURPLE "Building SDL2" tBoldBox tPURPLE "Building SDL2"
echo "" echo ""
if [[ ! -d SDL ]]; then
hg clone http://hg.libsdl.org/SDL hg clone http://hg.libsdl.org/SDL
fi
if [[ ! -e "${PREFIX}/lib/libSDL2.a" ]]; then
clearPCDepsBuild clearPCDepsBuild
pushd build >& /dev/null pushd build &> /dev/null
../SDL/configure \ ../SDL/configure \
--target="${CROSS}" \ --target="${CROSS}" \
--host="${CROSS}" \ --host="${CROSS}" \
@ -74,24 +76,26 @@ function buildPCDeps() {
--prefix=${PREFIX} --prefix=${PREFIX}
make make
make install make install
popd >& /dev/null popd &> /dev/null
fi fi
# libModPlug # libModPlug
if [[ ! -d libmodplug ]]; then
echo "" echo ""
tBoldBox tPURPLE "Building libModPlug" tBoldBox tPURPLE "Building libModPlug"
echo "" echo ""
if [[ ! -d libmodplug ]]; then
git clone https://github.com/Konstanty/libmodplug.git git clone https://github.com/Konstanty/libmodplug.git
pushd libmodplug >& /dev/null pushd libmodplug &> /dev/null
libtoolize --force libtoolize --force
aclocal aclocal
autoheader autoheader
automake --force-missing --add-missing automake --force-missing --add-missing
autoconf autoconf
popd >& /dev/null popd &> /dev/null
fi
if [[ ! -e "${PREFIX}/lib/libmodplug.a" ]]; then
clearPCDepsBuild clearPCDepsBuild
pushd build >& /dev/null pushd build &> /dev/null
../libmodplug/configure \ ../libmodplug/configure \
--target="${CROSS}" \ --target="${CROSS}" \
--host="${CROSS}" \ --host="${CROSS}" \
@ -101,17 +105,19 @@ function buildPCDeps() {
--prefix=${PREFIX} --prefix=${PREFIX}
make make
make install make install
popd >& /dev/null popd &> /dev/null
fi fi
# SDL_mixer # SDL_mixer
if [[ ! -d SDL_mixer ]]; then
echo "" echo ""
tBoldBox tPURPLE "Building SDL_mixer" tBoldBox tPURPLE "Building SDL_mixer"
echo "" echo ""
if [[ ! -d SDL_mixer ]]; then
hg clone http://hg.libsdl.org/SDL_mixer hg clone http://hg.libsdl.org/SDL_mixer
fi
if [[ ! -e "${PREFIX}/lib/libSDL2_mixer.a" ]]; then
clearPCDepsBuild clearPCDepsBuild
pushd build >& /dev/null pushd build &> /dev/null
MODPLUG_CFLAGS="-I${PREFIX}/include -DMODPLUG_STATIC" \ MODPLUG_CFLAGS="-I${PREFIX}/include -DMODPLUG_STATIC" \
MODPLUG_LIBS="-L${PREFIX}/lib -lmodplug -lstdc++ -lm" \ MODPLUG_LIBS="-L${PREFIX}/lib -lmodplug -lstdc++ -lm" \
../SDL_mixer/configure \ ../SDL_mixer/configure \
@ -135,7 +141,7 @@ function buildPCDeps() {
--disable-music-mp3-mpg123 --disable-music-mp3-mpg123
make make
make install make install
popd >& /dev/null popd &> /dev/null
fi fi
export CC="${CC_OLD}" export CC="${CC_OLD}"
@ -150,7 +156,7 @@ function buildPCDeps() {
fi fi
mkdir -p "${DIST}" mkdir -p "${DIST}"
clearPCDepsBuild clearPCDepsBuild
pushd build >& /dev/null pushd build &> /dev/null
${CC_EXPORT} ${G_CFLAGS} -o jPC.o ${SRC}/jPC.c ${CC_EXPORT} ${G_CFLAGS} -o jPC.o ${SRC}/jPC.c
${CC_EXPORT} ${G_CFLAGS} -o joey.o ${SRC}/joey.c ${CC_EXPORT} ${G_CFLAGS} -o joey.o ${SRC}/joey.c
ar x ${PREFIX}/lib/libSDL2.a ar x ${PREFIX}/lib/libSDL2.a
@ -160,9 +166,9 @@ function buildPCDeps() {
cp -f ${SRC}/joey.h ${DIST}/../.. cp -f ${SRC}/joey.h ${DIST}/../..
cp -f ${SRC}/../joey.pri ${DIST}/../.. cp -f ${SRC}/../joey.pri ${DIST}/../..
cp -f ${SRC}/../../scripts/build-PC.helper.sh ${DIST}/../.. cp -f ${SRC}/../../scripts/build-PC.helper.sh ${DIST}/../..
popd >& /dev/null popd &> /dev/null
popd >& /dev/null popd &> /dev/null
} }
@ -193,6 +199,7 @@ function configWrite() {
# IIgs Runtime & ORCA Compilers # IIgs Runtime & ORCA Compilers
echo "export GOLDEN_GATE=\"\${JOEY}/sdks/IIgs/ORCA\"" >> "${O}" echo "export GOLDEN_GATE=\"\${JOEY}/sdks/IIgs/ORCA\"" >> "${O}"
echo "export PATH=\"\${JOEY}/sdks/IIgs:\${PATH}\"" >> "${O}" echo "export PATH=\"\${JOEY}/sdks/IIgs:\${PATH}\"" >> "${O}"
echo "mountORCA.sh" >> "${O}"
fi fi
chmod +x "${O}" chmod +x "${O}"
} }
@ -291,7 +298,7 @@ function installIIgs() {
echo "See: https://goldengate.gitlab.io/about/" echo "See: https://goldengate.gitlab.io/about/"
exit 1 exit 1
fi fi
pushd GoldenGate >& /dev/null pushd GoldenGate &> /dev/null
git submodule init git submodule init
git submodule update git submodule update
mkdir -p build mkdir -p build
@ -308,7 +315,7 @@ function installIIgs() {
msiextract "${GGATE}" msiextract "${GGATE}"
find -name ".*" -delete find -name ".*" -delete
cp -rf GoldenGate/* "${IIGS}/ORCA/." cp -rf GoldenGate/* "${IIGS}/ORCA/."
popd >& /dev/null popd &> /dev/null
fi fi
if [[ ! -e "${IIGS}/ORCA/Languages/cc" ]]; then if [[ ! -e "${IIGS}/ORCA/Languages/cc" ]]; then
@ -324,7 +331,7 @@ function installIIgs() {
fetchGitHubRelease RESULT byteworksinc ORCA-C 2mg fetchGitHubRelease RESULT byteworksinc ORCA-C 2mg
"${IIGS}/opus-extractor" -v -s / ${RESULT} "${IIGS}/ORCA" "${IIGS}/opus-extractor" -v -s / ${RESULT} "${IIGS}/ORCA"
pushd ${GOLDEN_GATE} >& /dev/null pushd ${GOLDEN_GATE} &> /dev/null
#find . -type d -exec chmod 755 {} \; #find . -type d -exec chmod 755 {} \;
#find . -type f -exec chmod 644 {} \; #find . -type f -exec chmod 644 {} \;
for O in etc/* ; do iix chtyp -t txt "${O}" ; done for O in etc/* ; do iix chtyp -t txt "${O}" ; done
@ -349,7 +356,7 @@ function installIIgs() {
for O in Libraries/ORCAPascalDefs/* ; do if [ -f "${O}" ] ; then iix chtyp -t 0x5e -a 0x8009 "${O}" ; fi ; done ; for O in Libraries/ORCAPascalDefs/* ; do if [ -f "${O}" ] ; then iix chtyp -t 0x5e -a 0x8009 "${O}" ; fi ; done ;
for O in Libraries/m2defs/* ; do if [ -f "${O}" ] ; then iix chtyp -t 0x5e -a 0x8006 "${O}" ; fi ; done ; for O in Libraries/m2defs/* ; do if [ -f "${O}" ] ; then iix chtyp -t 0x5e -a 0x8006 "${O}" ; fi ; done ;
popd >& /dev/null popd &> /dev/null
fi fi
if [[ ! -d gsplus ]]; then if [[ ! -d gsplus ]]; then
@ -358,7 +365,7 @@ function installIIgs() {
echo "" echo ""
git clone https://github.com/digarok/gsplus.git git clone https://github.com/digarok/gsplus.git
mkdir gsplus/build mkdir gsplus/build
pushd gsplus/build >& /dev/null pushd gsplus/build &> /dev/null
cmake .. cmake ..
make make
if [[ ! -e bin/GSplus ]]; then if [[ ! -e bin/GSplus ]]; then
@ -367,7 +374,7 @@ function installIIgs() {
fi fi
mkdir -p "${IIGS}/gsplus" mkdir -p "${IIGS}/gsplus"
cp -f bin/{GSplus,partls,to_pro} "${IIGS}/gsplus/." cp -f bin/{GSplus,partls,to_pro} "${IIGS}/gsplus/."
popd >& /dev/null popd &> /dev/null
echo -e "s7d1 = System601.po\n\ng_limit_speed = 0\n" > "${IIGS}/gsplus/config.txt" echo -e "s7d1 = System601.po\n\ng_limit_speed = 0\n" > "${IIGS}/gsplus/config.txt"
echo -e "s7d1 = System601.po\ns7d2 = /tmp/IIgs/import.po\n" > "${IIGS}/gsplus/IIgsTest.cfg" echo -e "s7d1 = System601.po\ns7d2 = /tmp/IIgs/import.po\n" > "${IIGS}/gsplus/IIgsTest.cfg"
fi fi
@ -401,7 +408,7 @@ function installIIgs() {
tBoldBox tPURPLE "Building Cadius" tBoldBox tPURPLE "Building Cadius"
echo "" echo ""
git clone https://github.com/mach-kernel/cadius.git git clone https://github.com/mach-kernel/cadius.git
pushd cadius >& /dev/null pushd cadius &> /dev/null
make make
if [[ ! -e bin/release/cadius ]]; then if [[ ! -e bin/release/cadius ]]; then
tBoldBox tRED "Failed to build Cadius." tBoldBox tRED "Failed to build Cadius."
@ -409,7 +416,7 @@ function installIIgs() {
fi fi
mkdir -p "${IIGS}/cadius" mkdir -p "${IIGS}/cadius"
cp -f bin/release/cadius "${IIGS}/cadius/." cp -f bin/release/cadius "${IIGS}/cadius/."
popd >& /dev/null popd &> /dev/null
fi fi
if [[ ! -e "${IIGS}/ntconverter/ntconverter.php" ]]; then if [[ ! -e "${IIGS}/ntconverter/ntconverter.php" ]]; then
@ -447,7 +454,7 @@ function installIIgs() {
rm -rf "${O}" rm -rf "${O}"
fi fi
mkdir -p "${O}" mkdir -p "${O}"
pushd "${JOEY}/joeylib/joeylib/src" >& /dev/null pushd "${JOEY}/joeylib/joeylib/src" &> /dev/null
iix assemble +L jIIgs.asm keep=31:/out/joey/jIIgsasm > jIIgs.asm.dis iix assemble +L jIIgs.asm keep=31:/out/joey/jIIgsasm > jIIgs.asm.dis
iix compile jIIgs.c keep=31:/out/joey/jIIgsc iix compile jIIgs.c keep=31:/out/joey/jIIgsc
iix compile joey.c keep=31:/out/joey/joey iix compile joey.c keep=31:/out/joey/joey
@ -455,7 +462,7 @@ function installIIgs() {
iix makelib 31:/out/joey/joeylib +31:/out/joey/jIIgsasm.ROOT iix makelib 31:/out/joey/joeylib +31:/out/joey/jIIgsasm.ROOT
iix makelib 31:/out/joey/joeylib +31:/out/joey/jIIgsc.a iix makelib 31:/out/joey/joeylib +31:/out/joey/jIIgsc.a
iix makelib 31:/out/joey/joeylib +31:/out/joey/joey.a iix makelib 31:/out/joey/joeylib +31:/out/joey/joey.a
popd >& /dev/null popd &> /dev/null
cp -f "${O}/joeylib" "${JOEY}/dist/IIgs/joeylib#b20000" cp -f "${O}/joeylib" "${JOEY}/dist/IIgs/joeylib#b20000"
cp -f "${JOEY}/joeylib/joeylib/src/joey.h" "${JOEY}/dist/." cp -f "${JOEY}/joeylib/joeylib/src/joey.h" "${JOEY}/dist/."
cp -f "${JOEY}/joeylib/scripts/build-IIgs.helper.sh" "${JOEY}/dist/." cp -f "${JOEY}/joeylib/scripts/build-IIgs.helper.sh" "${JOEY}/dist/."
@ -559,10 +566,10 @@ if [[ ! -f installerWork/towel/towel.sh ]]; then
# Do we have GIT? # Do we have GIT?
if [[ "$(which git || true)" == "" ]]; then if [[ "$(which git || true)" == "" ]]; then
echo "Installing git..." echo "Installing git..."
sudo apt-get -y install git >& /dev/null sudo apt-get -y install git &> /dev/null
fi fi
echo "Downloading towel.sh support library..." echo "Downloading towel.sh support library..."
git clone https://skunkworks.kangaroopunch.com/skunkworks/towel.git installerWork/towel >& /dev/null git clone https://skunkworks.kangaroopunch.com/skunkworks/towel.git installerWork/towel &> /dev/null
fi fi
# Load Towel # Load Towel
@ -572,7 +579,7 @@ source installerWork/towel/towel.sh
G_PARENT=$(pwd) G_PARENT=$(pwd)
# Don't change directories until Towel is loaded. # Don't change directories until Towel is loaded.
pushd installerWork >& /dev/null pushd installerWork &> /dev/null
:<<'SKIP' :<<'SKIP'
# See if all the packages we need are installed # See if all the packages we need are installed
@ -596,7 +603,7 @@ if [[ "${MISSING}" != "" ]]; then
for PACKAGE in ${MISSING}; do for PACKAGE in ${MISSING}; do
PERCENT=$(( 100*(++COUNT)/TOTAL )) PERCENT=$(( 100*(++COUNT)/TOTAL ))
echo ${PERCENT} echo ${PERCENT}
sudo apt-get -y install ${PACAKGE} >& /dev/null sudo apt-get -y install ${PACKAGE} &> /dev/null
done done
} | whiptail --title "${G_TITLE}" --gauge "\nInstalling packages..." 7 50 0 } | whiptail --title "${G_TITLE}" --gauge "\nInstalling packages..." 7 50 0
else else
@ -615,7 +622,7 @@ SKIP
if [[ ! -f ${G_PARENT}/joeylib/LICENSE ]]; then if [[ ! -f ${G_PARENT}/joeylib/LICENSE ]]; then
echo "" echo ""
tBoldBox tBLUE "Downloading JoeyLib source..." tBoldBox tBLUE "Downloading JoeyLib source..."
git clone https://skunkworks.kangaroopunch.com/skunkworks/joeylib.git ${G_PARENT}/joeylib >& /dev/null git clone https://skunkworks.kangaroopunch.com/skunkworks/joeylib.git ${G_PARENT}/joeylib &> /dev/null
fi fi
mainMenu mainMenu
@ -626,4 +633,4 @@ tBoldBox tBLUE "Goodbye!"
echo "" echo ""
# --- EXIT # --- EXIT
popd >& /dev/null popd &> /dev/null