diff --git a/joeylib/src/jSDL2.c b/joeylib/src/jSDL2.c index f89b865..07f8495 100644 --- a/joeylib/src/jSDL2.c +++ b/joeylib/src/jSDL2.c @@ -414,13 +414,16 @@ void jlUtilTitleSet(char *title) { } -int main(void) { +int main(int argc, char *argv[]) { int flags; int result; int joysticks; int x; + (void)argc; + (void)argv; + // Start low-level tools if (SDL_Init(SDL_INIT_EVERYTHING) == -1) { jlUtilDie(SDL_GetError()); diff --git a/scripts/installer.sh b/scripts/installer.sh index 4ad2c74..98604f4 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -58,11 +58,6 @@ function buildMacOSXSDK() { mkdir -p "${G_PARENT}/sdks" - G_IS_INSTALLED[$G_MAC32]=1 - G_IS_INSTALLED[$G_MAC64]=1 - configWrite - configRead - if [[ ! -z ${G_AUTOMATED} ]]; then XCODE=${G_XCODE_FILE} if [[ ! -e "${XCODE}" ]]; then @@ -87,6 +82,11 @@ function buildMacOSXSDK() { mv -f target "${OSX}" popd &> /dev/null fi + + G_IS_INSTALLED[$G_MAC32]=1 + G_IS_INSTALLED[$G_MAC64]=1 + configWrite + configRead } @@ -208,8 +208,11 @@ function buildPCDeps() { export CXX="${CXX_OLD}" export LD_LIBRARY_PATH="${LD_OLD}" + configWrite + configRead + purple "Building JoeyLib" - "${G_PARENT}/joeylib/joeylib/build.sh" ${TARGET} &> /dev/null + $(. "${G_PARENT}/joeyDev.sh" && "${G_PARENT}/joeylib/joeylib/build.sh" ${TARGET}) &> /dev/null popd &> /dev/null } @@ -419,10 +422,6 @@ function installAmiga() { local RESULT= local AMIGA="${G_PARENT}/sdks/amiga" - G_IS_INSTALLED[$G_AMIGA]=1 - configWrite - configRead - purple "Installing Amiga GCC" if [[ ! -d amiga-gcc ]]; then git clone https://github.com/bebbo/amiga-gcc.git @@ -437,6 +436,10 @@ function installAmiga() { "${G_PARENT}/joeylib/joeylib/build.sh" amiga &> /dev/null #***TODO*** Needs emulator + + G_IS_INSTALLED[$G_AMIGA]=1 + configWrite + configRead } @@ -447,10 +450,6 @@ function installIIgs() { local GGATE= local IIGS="${G_PARENT}/sdks/IIgs" - G_IS_INSTALLED[$G_IIGS]=1 - configWrite - configRead - if [[ -e "${IIGS}/unmountORCA.sh" ]]; then "${IIGS}/unmountORCA.sh" fi @@ -641,6 +640,10 @@ function installIIgs() { cp -f Tool222#BA0000 "${IIGS}/Tool222#ba0000" fi + G_IS_INSTALLED[$G_IIGS]=1 + configWrite + configRead + mkdir -p "${JOEY}/dist/IIgs" purple "Building JoeyLib" @@ -705,10 +708,6 @@ function installST() { local ST="${G_PARENT}/sdks/st" local ST_GCC="m68k-atari-mint-base-20190606-linux.tar" - G_IS_INSTALLED[$G_ATARIST]=1 - configWrite - configRead - mkdir -p "${ST}" if [[ ! -e "${ST}/tos104us.img" ]]; then @@ -783,6 +782,10 @@ function installST() { buildSDL12 "m68k-atari-mint" "${ST}" + G_IS_INSTALLED[$G_ATARIST]=1 + configWrite + configRead + purple "Building JoeyLib" "${G_PARENT}/joeylib/joeylib/build.sh" st &> /dev/null } @@ -1018,16 +1021,20 @@ function start() { fi fi if [[ "${DOINSTALL}" == "1" ]]; then - TEMP=" ${MISSING//[^ ]}" - TOTAL=${#TEMP} - COUNT=0 - { - for PACKAGE in ${MISSING}; do - PERCENT=$(( 100*(++COUNT)/TOTAL )) - echo ${PERCENT} - doSudo apt-get -y install ${PACKAGE} &> /dev/null - done - } | whiptail --title "${G_TITLE}" --gauge "\nInstalling packages..." 7 50 0 + if [[ ! -z ${G_AUTOMATED} ]]; then + doSudo apt-get -y install ${MISSING} + else + TEMP=" ${MISSING//[^ ]}" + TOTAL=${#TEMP} + COUNT=0 + { + for PACKAGE in ${MISSING}; do + PERCENT=$(( 100*(++COUNT)/TOTAL )) + echo ${PERCENT} + doSudo apt-get -y install ${PACKAGE} &> /dev/null + done + } | whiptail --title "${G_TITLE}" --gauge "\nInstalling packages..." 7 50 0 + fi else tBoldBox tRED "Canceled!" echo ""