Commit 69b4aa53 authored by Scott Duensing's avatar Scott Duensing

Several bug fixes in installer.

parent 0315c830
......@@ -52,19 +52,21 @@ function buildPCDeps() {
fi
mkdir -p ${PREFIX}
pushd deps >& /dev/null
pushd deps &> /dev/null
export CC="${CC_EXPORT}"
export CXX="${CXX_EXPORT}"
# SDL2
echo ""
tBoldBox tPURPLE "Building SDL2"
echo ""
if [[ ! -d SDL ]]; then
echo ""
tBoldBox tPURPLE "Building SDL2"
echo ""
hg clone http://hg.libsdl.org/SDL
fi
if [[ ! -e "${PREFIX}/lib/libSDL2.a" ]]; then
clearPCDepsBuild
pushd build >& /dev/null
pushd build &> /dev/null
../SDL/configure \
--target="${CROSS}" \
--host="${CROSS}" \
......@@ -74,24 +76,26 @@ function buildPCDeps() {
--prefix=${PREFIX}
make
make install
popd >& /dev/null
popd &> /dev/null
fi
# libModPlug
echo ""
tBoldBox tPURPLE "Building libModPlug"
echo ""
if [[ ! -d libmodplug ]]; then
echo ""
tBoldBox tPURPLE "Building libModPlug"
echo ""
git clone https://github.com/Konstanty/libmodplug.git
pushd libmodplug >& /dev/null
pushd libmodplug &> /dev/null
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
popd >& /dev/null
popd &> /dev/null
fi
if [[ ! -e "${PREFIX}/lib/libmodplug.a" ]]; then
clearPCDepsBuild
pushd build >& /dev/null
pushd build &> /dev/null
../libmodplug/configure \
--target="${CROSS}" \
--host="${CROSS}" \
......@@ -101,17 +105,19 @@ function buildPCDeps() {
--prefix=${PREFIX}
make
make install
popd >& /dev/null
popd &> /dev/null
fi
# SDL_mixer
echo ""
tBoldBox tPURPLE "Building SDL_mixer"
echo ""
if [[ ! -d SDL_mixer ]]; then
echo ""
tBoldBox tPURPLE "Building SDL_mixer"
echo ""
hg clone http://hg.libsdl.org/SDL_mixer
fi
if [[ ! -e "${PREFIX}/lib/libSDL2_mixer.a" ]]; then
clearPCDepsBuild
pushd build >& /dev/null
pushd build &> /dev/null
MODPLUG_CFLAGS="-I${PREFIX}/include -DMODPLUG_STATIC" \
MODPLUG_LIBS="-L${PREFIX}/lib -lmodplug -lstdc++ -lm" \
../SDL_mixer/configure \
......@@ -135,7 +141,7 @@ function buildPCDeps() {
--disable-music-mp3-mpg123
make
make install
popd >& /dev/null
popd &> /dev/null
fi
export CC="${CC_OLD}"
......@@ -150,7 +156,7 @@ function buildPCDeps() {
fi
mkdir -p "${DIST}"
clearPCDepsBuild
pushd build >& /dev/null
pushd build &> /dev/null
${CC_EXPORT} ${G_CFLAGS} -o jPC.o ${SRC}/jPC.c
${CC_EXPORT} ${G_CFLAGS} -o joey.o ${SRC}/joey.c
ar x ${PREFIX}/lib/libSDL2.a
......@@ -160,9 +166,9 @@ function buildPCDeps() {
cp -f ${SRC}/joey.h ${DIST}/../..
cp -f ${SRC}/../joey.pri ${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
echo "export GOLDEN_GATE=\"\${JOEY}/sdks/IIgs/ORCA\"" >> "${O}"
echo "export PATH=\"\${JOEY}/sdks/IIgs:\${PATH}\"" >> "${O}"
echo "mountORCA.sh" >> "${O}"
fi
chmod +x "${O}"
}
......@@ -291,7 +298,7 @@ function installIIgs() {
echo "See: https://goldengate.gitlab.io/about/"
exit 1
fi
pushd GoldenGate >& /dev/null
pushd GoldenGate &> /dev/null
git submodule init
git submodule update
mkdir -p build
......@@ -308,7 +315,7 @@ function installIIgs() {
msiextract "${GGATE}"
find -name ".*" -delete
cp -rf GoldenGate/* "${IIGS}/ORCA/."
popd >& /dev/null
popd &> /dev/null
fi
if [[ ! -e "${IIGS}/ORCA/Languages/cc" ]]; then
......@@ -324,7 +331,7 @@ function installIIgs() {
fetchGitHubRelease RESULT byteworksinc ORCA-C 2mg
"${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 f -exec chmod 644 {} \;
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/m2defs/* ; do if [ -f "${O}" ] ; then iix chtyp -t 0x5e -a 0x8006 "${O}" ; fi ; done ;
popd >& /dev/null
popd &> /dev/null
fi
if [[ ! -d gsplus ]]; then
......@@ -358,7 +365,7 @@ function installIIgs() {
echo ""
git clone https://github.com/digarok/gsplus.git
mkdir gsplus/build
pushd gsplus/build >& /dev/null
pushd gsplus/build &> /dev/null
cmake ..
make
if [[ ! -e bin/GSplus ]]; then
......@@ -367,7 +374,7 @@ function installIIgs() {
fi
mkdir -p "${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\ns7d2 = /tmp/IIgs/import.po\n" > "${IIGS}/gsplus/IIgsTest.cfg"
fi
......@@ -401,7 +408,7 @@ function installIIgs() {
tBoldBox tPURPLE "Building Cadius"
echo ""
git clone https://github.com/mach-kernel/cadius.git
pushd cadius >& /dev/null
pushd cadius &> /dev/null
make
if [[ ! -e bin/release/cadius ]]; then
tBoldBox tRED "Failed to build Cadius."
......@@ -409,7 +416,7 @@ function installIIgs() {
fi
mkdir -p "${IIGS}/cadius"
cp -f bin/release/cadius "${IIGS}/cadius/."
popd >& /dev/null
popd &> /dev/null
fi
if [[ ! -e "${IIGS}/ntconverter/ntconverter.php" ]]; then
......@@ -447,7 +454,7 @@ function installIIgs() {
rm -rf "${O}"
fi
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 compile jIIgs.c keep=31:/out/joey/jIIgsc
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/jIIgsc.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 "${JOEY}/joeylib/joeylib/src/joey.h" "${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?
if [[ "$(which git || true)" == "" ]]; then
echo "Installing git..."
sudo apt-get -y install git >& /dev/null
sudo apt-get -y install git &> /dev/null
fi
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
# Load Towel
......@@ -572,7 +579,7 @@ source installerWork/towel/towel.sh
G_PARENT=$(pwd)
# Don't change directories until Towel is loaded.
pushd installerWork >& /dev/null
pushd installerWork &> /dev/null
:<<'SKIP'
# See if all the packages we need are installed
......@@ -596,7 +603,7 @@ if [[ "${MISSING}" != "" ]]; then
for PACKAGE in ${MISSING}; do
PERCENT=$(( 100*(++COUNT)/TOTAL ))
echo ${PERCENT}
sudo apt-get -y install ${PACAKGE} >& /dev/null
sudo apt-get -y install ${PACKAGE} &> /dev/null
done
} | whiptail --title "${G_TITLE}" --gauge "\nInstalling packages..." 7 50 0
else
......@@ -615,7 +622,7 @@ SKIP
if [[ ! -f ${G_PARENT}/joeylib/LICENSE ]]; then
echo ""
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
mainMenu
......@@ -626,4 +633,4 @@ tBoldBox tBLUE "Goodbye!"
echo ""
# --- EXIT
popd >& /dev/null
popd &> /dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment