Commit b01c7a874b84d10ecb051022ec2d6539f32abdd8

Authored by Perry Werneck
1 parent 6c1f706b

Updating runtime builder.

Showing 1 changed file with 57 additions and 3 deletions   Show diff stats
win/makeruntime.sh.in
... ... @@ -36,6 +36,7 @@ GTK_PREFIX=$($PKG_CONFIG --variable=prefix ${GTK_VERSION})
36 36 GDK_LOADERS=$(${PKG_CONFIG} --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0 | sed -e "s@${prefix}@@g")
37 37  
38 38 TARGET="@BASEDIR@/.bin/runtime"
  39 +BINDIR="@BASEDIR@/.bin/Release/"
39 40  
40 41 # Change to bin path
41 42 mkdir -p ${TARGET}
... ... @@ -49,8 +50,8 @@ copy_dll() {
49 50 SOURCES=$(mktemp)
50 51 REQUIRES=$(mktemp)
51 52  
52   - find "@BASEDIR@/.bin/Release/" -iname "*.dll" > ${SOURCES}
53   - find "@BASEDIR@/.bin/Release/" -iname "*.exe" >> ${SOURCES}
  53 + find "${BINDIR}" -iname "*.dll" > ${SOURCES}
  54 + find "${BINDIR}" -iname "*.exe" >> ${SOURCES}
54 55 find "${TARGET}" -iname *.dll >> ${SOURCES}
55 56  
56 57 while read FILENAME
... ... @@ -122,7 +123,7 @@ copy_dll() {
122 123 do
123 124 if [ ! -e "${TARGET}/${FILENAME}" ]; then
124 125  
125   - COUNT=$(find "@BASEDIR@/.bin/Release/" -iname ${FILENAME} | wc --lines)
  126 + COUNT=$(find "${BINDIR}" -iname ${FILENAME} | wc --lines)
126 127 if [ "${COUNT}" == "0" ]; then
127 128  
128 129 echo ${FILENAME}
... ... @@ -136,6 +137,17 @@ copy_dll() {
136 137 if [ "$?" != "0" ]; then
137 138 exit -1
138 139 fi
  140 +
  141 + elif [ -e ${prefix}/lib/${FILENAME} ]; then
  142 +
  143 + echo "Copiando $(basename ${FILENAME})..."
  144 +
  145 + AGAIN=1
  146 + cp -v "${prefix}/lib/${FILENAME}" "${TARGET}/${FILENAME}"
  147 + if [ "$?" != "0" ]; then
  148 + exit -1
  149 + fi
  150 +
139 151 else
140 152  
141 153 echo "Can't find ${FILENAME}"
... ... @@ -261,6 +273,48 @@ copy_theme() {
261 273  
262 274 }
263 275  
  276 +#
  277 +# Check command line parameters
  278 +#
  279 +until [ -z "$1" ]
  280 +do
  281 + if [ ${1:0:2} = '--' ]; then
  282 + tmp=${1:2}
  283 + parameter=${tmp%%=*}
  284 + parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]")
  285 + value=${tmp##*=}
  286 +
  287 + case "$parameter" in
  288 + PATH)
  289 + TARGET=$value
  290 + ;;
  291 +
  292 + BINDIR)
  293 + BINDIR=$value
  294 + ;;
  295 +
  296 + HELP)
  297 + echo "${0} [options]"
  298 + echo ""
  299 + echo "Options:"
  300 + echo ""
  301 + echo " --path Set runtime instalation path (default is $TARGET)"
  302 + echo " --bindir Set binaries source path (default is $BINDIR)"
  303 + echo ""
  304 + exit 0
  305 +
  306 + ;;
  307 +
  308 + esac
  309 + fi
  310 +
  311 + shift
  312 +
  313 +done
  314 +
  315 +#
  316 +# Make runtime
  317 +#
264 318 copy_dll
265 319 copy_locale
266 320 copy_loaders
... ...