aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/lazres-UltraStar.sh
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-05 16:26:40 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-05 16:26:40 +0000
commit2eb92f1b07828c0631d297bd26cfb249ccbd20ef (patch)
treeeca6ada4b5e347438f4cab4226e6e174d2ef9361 /Game/Code/lazres-UltraStar.sh
parent18aef1647d6801456b65f893789414ecd24dc268 (diff)
downloadusdx-2eb92f1b07828c0631d297bd26cfb249ccbd20ef.tar.gz
usdx-2eb92f1b07828c0631d297bd26cfb249ccbd20ef.tar.xz
usdx-2eb92f1b07828c0631d297bd26cfb249ccbd20ef.zip
- DirWatch-support with FPC (windows only)
- added UAudioCore_Bass.pas git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@823 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rwxr-xr-xGame/Code/lazres-UltraStar.sh94
1 files changed, 0 insertions, 94 deletions
diff --git a/Game/Code/lazres-UltraStar.sh b/Game/Code/lazres-UltraStar.sh
deleted file mode 100755
index bd3f130d..00000000
--- a/Game/Code/lazres-UltraStar.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/bash
-
-##
-# Creates an .lrs resource-file.
-# This script reads an rc resource definition file
-# and uses lazres to compile it into an lrs-file.
-##
-
-RCFILE=UltraStar.rc
-OUTFILE=UltraStar.lrs
-# set this to your lazarus directory if autodetection fails
-LAZDIR_DEFAULT=/usr/local/share/lazarus
-
-LAZDIR=`whereis -b lazarus | cut -s -d ' ' -f2`
-if [ ! -d "${LAZDIR}" ]; then
- if [ ! -d "${LAZDIR_DEFAULT}" ]; then
- echo "Autodetecting Lazarus-directory failed!"
- echo "Set LAZDIR_DEFAULT to your Lazarus directory in this script."
- exit 1
- fi
- LAZDIR="${LAZDIR_DEFAULT}"
-fi
-
-LAZRES="${LAZDIR}/tools/lazres"
-LAZRES_SRC="${LAZRES}.pp"
-LAZRES_PROJ="${LAZRES}.lpi"
-LAZBUILD="${LAZDIR}/lazbuild"
-UNIT_PATH=-Fu${LAZDIR}/lcl/units/i386-linux
-
-# check if lazres is available
-if [ ! -x "${LAZRES}" ]; then
- # lazres not available -> build it
- echo -e "Building of lazres required...\n"
- # check if lazres project-file exists
- if [ ! -f "${LAZRES_SRC}" ]; then
- echo -e "\n${LAZRES_SRC} not found!"
- exit 1
- fi
- # build lazres
- fpc -dRELEASE "${UNIT_PATH}" "${LAZRES_SRC}"
- #"${LAZBUILD}" "${LAZRES_PROJ}"
- # did it fail?
- if [ $? -ne 0 ]; then
- echo -e "\nBuilding lazres failed!"
- exit 1
- fi
- echo -e "\nBuilding lazres finished!"
-fi
-
-# create temp-dir for file renaming (do not use varname TMPDIR!)
-RENAME_DIR=`mktemp -t -d usdxresXXXXXXXXXX` || exit 1
-echo "Temporary directory for file-renaming created! (${RENAME_DIR})"
-
-# read each line of RC-file and add resource-path to parameter-list
-LAZRES_PARAMS=""
-echo "Reading RC-file..."
-{
-while read -r res_name res_type res_path; do
- # check if line is commented out
- if (echo ${res_name} | grep "^//" >/dev/null) ; then
- echo "Skip resource: ${res_name}"
- continue
- fi
- # add non-empty paths to parameter-list
- if [ ! -z "${res_path}" ]; then
- # replace backslashes (\\) and carriage return (\r) (MS-DOS line-ending)
- RES_PATH=`echo "${res_path}" | tr '\r\\' '\0/'`
- RES_NEW_PATH="${RENAME_DIR}/${res_name}.${res_type}"
- eval cp "${RES_PATH}" "${RES_NEW_PATH}"
- # append to parameter-list
- LAZRES_PARAMS="${LAZRES_PARAMS} ${RES_NEW_PATH}"
- fi
-done
-} < "${RCFILE}"
-
-# create resource file
-rm -f ${OUTFILE}
-echo "Creating resource file..."
-"${LAZRES}" "${OUTFILE}" ${LAZRES_PARAMS}
-RES=0
-if [ -f "${OUTFILE}" ]; then
- echo -e "\nResource file successfully created!"
- RES=1
-else
- echo -e "\nCreation of resource file failed!"
-fi
-
-# remove temp-directory
-echo "Removing temporary directory..."
-rm -rf "${RENAME_DIR}"
-
-if [ $RES -eq 1 ]; then
- echo -e "\nReady."
-fi