diff --git a/actioncube.sh b/actioncube.sh index 49711e63..0898f9a8 100755 --- a/actioncube.sh +++ b/actioncube.sh @@ -14,11 +14,10 @@ MACHINE_NAME=`uname -m` case ${SYSTEM_NAME} in Linux) - SYSTEM_PREFIX= + SYSTEM_PREFIX=linux_ ;; *) - echo "Your operating system does not have a pre-compiled Cube client." - exit 1 + SYSTEM_PREFIX=native_ ;; esac @@ -27,11 +26,26 @@ i486|i586|i686) MACHINE_PREFIX= ;; *) - echo "Your processor does not have a pre-compiled Cube client." - exit 1 + MACHINE_PREFIX= ;; esac -cd ${CUBE_DIR} -exec ${CUBE_DIR}/bin_unix/${MACHINE_PREFIX}${SYSTEM_PREFIX}ac_client $* +if test -x ${CUBE_DIR}/bin_unix/native_client +then + SYSTEM_PREFIX=native_ + MACHINE_PREFIX= +fi + +if test -x ${CUBE_DIR}/bin_unix/${MACHINE_PREFIX}${SYSTEM_PREFIX}client +then + cd ${CUBE_DIR} + exec ${CUBE_DIR}/bin_unix/${MACHINE_PREFIX}${SYSTEM_PREFIX}client $* +else + echo "Your processor does not have a pre-compiled Cube client." + echo "Please follow the following steps to build a native client:" + echo "1) Ensure you have the SDL, SDL-image, SDL-mixer, and OpenGL libraries installed." + echo "2) Change directory to source/src/ and type \"make install\"." + echo "3) If the build succeeds, return to this directory and run this script again." + exit 1 +fi diff --git a/actioncube_server.sh b/actioncube_server.sh index 6b7765d7..fc90212e 100755 --- a/actioncube_server.sh +++ b/actioncube_server.sh @@ -14,11 +14,10 @@ MACHINE_NAME=`uname -m` case ${SYSTEM_NAME} in Linux) - SYSTEM_PREFIX= + SYSTEM_PREFIX=linux_ ;; *) - echo "Your operating system does not have a pre-compiled Cube server." - exit 1 + SYSTEM_PREFIX=native_ ;; esac @@ -27,11 +26,26 @@ i486|i586|i686) MACHINE_PREFIX= ;; *) - echo "Your processor does not have a pre-compiled Cube server." - exit 1 + MACHINE_PREFIX= ;; esac -cd ${CUBE_DIR} -exec ${CUBE_DIR}/bin_unix/${MACHINE_PREFIX}${SYSTEM_PREFIX}ac_server $* +if test -x ${CUBE_DIR}/bin_unix/native_server +then + SYSTEM_PREFIX=native_ + MACHINE_PREFIX= +fi + +if test -x ${CUBE_DIR}/bin_unix/${MACHINE_PREFIX}${SYSTEM_PREFIX}server +then + cd ${CUBE_DIR} + exec ${CUBE_DIR}/bin_unix/${MACHINE_PREFIX}${SYSTEM_PREFIX}server $* +else + echo "Your processor does not have a pre-compiled Cube server." + echo "Please follow the following steps to build a native server:" + echo "1) Ensure you have the SDL, SDL-image, SDL-mixer, and OpenGL libraries installed." + echo "2) Change directory to source/src/ and type \"make install\"." + echo "3) If the build succeeds, return to this directory and run this script again." + exit 1 +fi