>From a91b35d5fabf3540e4b99e21769c372b0f0b3835 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Wed, 12 Aug 2009 21:25:22 +0200 Subject: [PATCH] Move parse script to the php directory to overcome include issues --- transl/README | 12 ----- transl/{scripts => php}/parse_resfiles.php | 4 +- transl/scripts/Master.sh | 63 ---------------------------- transl/scripts/config-example | 23 ---------- winetest/make-winetest | 2 +- 5 files changed, 3 insertions(+), 101 deletions(-) delete mode 100644 transl/README rename transl/{scripts => php}/parse_resfiles.php (99%) delete mode 100755 transl/scripts/Master.sh delete mode 100644 transl/scripts/config-example diff --git a/transl/README b/transl/README deleted file mode 100644 index 7c66b10..0000000 --- a/transl/README +++ /dev/null @@ -1,12 +0,0 @@ -To run the scripts, copy scripts/config-example to scripts/config and edit it -to setup the paths. Then, in scripts/, run ./Master.sh to generate the -statistics. If, in scripts/config, you have set to store results in the -directory with PHP scripts from php/, they should be able to display the -statistics. If you want to keep the generated data in a different directory -than the PHP scripts, edit php/config.php so that they can to find it. - -You can create files scripts/local-prehook.sh and scripts/local-posthook.sh if -you want to automate e.g. fetching the Git tree before generating the statistics -or push the results to a server after it. Running the scripts with the -environment variable NOVERBOSE set should make them silent enough to make them -usable as a cron job. diff --git a/transl/scripts/parse_resfiles.php b/transl/php/parse_resfiles.php similarity index 99% rename from transl/scripts/parse_resfiles.php rename to transl/php/parse_resfiles.php index 41ed364..a9fcb33 100644 --- a/transl/scripts/parse_resfiles.php +++ b/transl/php/parse_resfiles.php @@ -1,6 +1,6 @@ >"$WORKDIR/run.log" - cat "$WORKDIR/run.log" - exit 1 -} - -mv -f $WORKDIR/run.log $WORKDIR/run.log.old - -if [ "$PREPARE_TREES" -eq 1 ]; then - # Prepare the trees (they may be the same or different) - if [ "x$NOVERBOSE" = "x" ]; then - echo -n "Preparing tree(s)..." - fi - if [ ! -f "$WRCROOT/Makefile" ]; then - (cd $WRCROOT && $SOURCEROOT/configure) - fi - make -C "$WRCROOT" depend >/dev/null 2>>"$WORKDIR/run.log" || die "make depend in wrc tree failed" - make -C "$WRCROOT" tools >/dev/null 2>>"$WORKDIR/run.log" || die "make tools in wrc tree failed" - make -C "$BUILDROOT" depend >/dev/null 2>>"$WORKDIR/run.log" || die "make depend in build tree failed" - make -C "$BUILDROOT" include/stdole2.tlb >/dev/null 2>>"$WORKDIR/run.log" || die "make depend in build tree failed" - if [ "x$NOVERBOSE" = "x" ]; then - echo " done" - fi -fi - -# Do cleanup for new run -rm -Rf $WORKDIR/data -mkdir $WORKDIR/data -mkdir $WORKDIR/data/res - -# Analyze all the Makefiles -php ./parse_resfiles.php -S "$SOURCEROOT" -T "$BUILDROOT" -t "$WRCROOT" -w "$WORKDIR/data" 2>>"$WORKDIR/run.log" || exit - -# Show any changes in the log -diff -u $WORKDIR/run.log.old $WORKDIR/run.log - -# Copy the new data from the working directory to the PHP scripts input -mv -f $DESTDIR/data $DESTDIR/data.old -mv -f $WORKDIR/data $DESTDIR/data -cp -f $WORKDIR/run.log $DESTDIR/data/run.log - -# Deleting can take a bit longer so we do it after the new version is set up -rm -Rf $DESTDIR/data.old - -# Optional hooks -if [ -x ./local-posthook.sh ]; then - ./local-posthook.sh -fi diff --git a/transl/scripts/config-example b/transl/scripts/config-example deleted file mode 100644 index 2409d13..0000000 --- a/transl/scripts/config-example +++ /dev/null @@ -1,23 +0,0 @@ -# Config file. The meaning of the fields is as follows: - -# Path to the Wine source tree to analyze -SOURCEROOT=/path/to/wine-src - -# Path to the Wine build tree (if different from SOURCEROOT) -BUILDROOT=/path/to/wine-src - -# Path to the Wine tree to take wrc from. Usually the same as SOURCEROOT. -WRCROOT=/path/to/wine-src - -# The directory where to store the generated langs/ and dumps/. Usually the -# directory with the PHP scripts. -DESTDIR=../php - -# Temporary directory for some scratch files. Must be writable. -WORKDIR=../work - -# If set to '1' the script will do a minimal build of the SOURCEROOT and WRCROOT -# making the script work even for a just downloaded tree with only ./configure -# executed in it. If you are running the script on trees that are already fully -# built you may set this to '0' to save time. -PREPARE_TREES=1 diff --git a/winetest/make-winetest b/winetest/make-winetest index 6494a5e..9211c38 100755 --- a/winetest/make-winetest +++ b/winetest/make-winetest @@ -132,7 +132,7 @@ umask 022 rm -rf data mkdir data data/res - php $toolsdir/transl/scripts/parse_resfiles.php -S ./wine -T ./build-mingw -t ./build-native -w ./data 2>>data/run.log + php $toolsdir/transl/php/parse_resfiles.php -S ./wine -T ./build-mingw -t ./build-native -w ./data 2>>data/run.log mv -f $transldir/data $transldir/data.old mv -f data $transldir/data rm -rf $transldir/data.old -- 1.6.0.6