Patch #1951 2007-04-09 11:28
julienlecomte
crossplatform script "update"- Download
- 1951-crossplatform.patch (2.6 KB)
diff U3 T:/TEMP/update-revBASE.svn003.tmp D:/devroot/codeblocks/src/update
--- T:/TEMP/update-revBASE.svn003.tmp Mon Apr 09 13:28:48 2007
+++ D:/devroot/codeblocks/src/update Mon Apr 09 13:27:10 2007
@@ -1,5 +1,13 @@
#!/bin/sh
+if [ "x$MSYSTEM" != "x" ] ; then
+ EXEEXT=".exe"
+ LIBEXT="dll"
+else
+ EXEEXT=""
+ LIBEXT="so"
+fi
+
echo Creating output directory tree
mkdir -p output/share/codeblocks/lexers
@@ -69,29 +77,32 @@
cp -f scripts/*.script output/share/codeblocks/scripts > /dev/null
cp -f tips.txt devel/share/codeblocks > /dev/null
cp -f tips.txt output/share/codeblocks > /dev/null
-cp -f tools/ConsoleRunner/cb_console_runner output > /dev/null
-cp -f tools/ConsoleRunner/cb_console_runner devel > /dev/null
-cp -f devel/codeblocks output > /dev/null
-cp -f devel/*.so output > /dev/null
-cp -f ${RESDIR}/plugins/*.so output/share/codeblocks/plugins > /dev/null
-echo Stripping debug info from output tree
-#strip output/codeblocks
-#strip output/*.so
-#strip output/share/codeblocks/plugins/*.so
+cp -f tools/ConsoleRunner/cb_console_runner${EXEEXT} output > /dev/null
+cp -f tools/ConsoleRunner/cb_console_runner${EXEEXT} devel > /dev/null
+cp -f devel/codeblocks${EXEEXT} output > /dev/null
+cp -f devel/*.${LIBEXT} output > /dev/null
+cp -f ${RESDIR}/plugins/*.${LIBEXT} output/share/codeblocks/plugins > /dev/null
-echo Creating launch-scripts
-echo "#!/bin/sh" > output/run.sh
-echo -n "APP_DIR=" >> output/run.sh
-echo `pwd`/output >> output/run.sh
-echo "export LD_LIBRARY_PATH=\$APP_DIR:\$LD_LIBRARY_PATH" >> output/run.sh
-echo "\$APP_DIR/codeblocks \$@" >> output/run.sh
-chmod +x output/run.sh
-echo "#!/bin/sh" > devel/run.sh
-echo -n "APP_DIR=" >> devel/run.sh
-echo `pwd`/devel >> devel/run.sh
-echo "export LD_LIBRARY_PATH=\$APP_DIR:\$LD_LIBRARY_PATH" >> devel/run.sh
-echo "\$APP_DIR/codeblocks \$@" >> devel/run.sh
-chmod +x devel/run.sh
+if [ "x$MSYSTEM" != "x" ] ; then
+ echo Stripping debug info from output tree
+ strip output/codeblocks${EXEEXT}
+ strip output/*.${LIBEXT}
+ strip output/share/codeblocks/plugins/*.${LIBEXT}
+else
+ echo Creating launch-scripts
+ echo "#!/bin/sh" > output/run.sh
+ echo -n "APP_DIR=" >> output/run.sh
+ echo `pwd`/output >> output/run.sh
+ echo "export LD_LIBRARY_PATH=\$APP_DIR:\$LD_LIBRARY_PATH" >> output/run.sh
+ echo "\$APP_DIR/codeblocks \$@" >> output/run.sh
+ chmod +x output/run.sh
+ echo "#!/bin/sh" > devel/run.sh
+ echo -n "APP_DIR=" >> devel/run.sh
+ echo `pwd`/devel >> devel/run.sh
+ echo "export LD_LIBRARY_PATH=\$APP_DIR:\$LD_LIBRARY_PATH" >> devel/run.sh
+ echo "\$APP_DIR/codeblocks \$@" >> devel/run.sh
+ chmod +x devel/run.sh
+fi
ZIPCMD=
RESDIR=
History
What is this supposed to do? Is it too much to ask for a description of its intentions?
lol... sorry
There's a bash script called "update" in "src" which copies the compiled executables/plugins in directory "output" (to later make a release)
There's also a "update.bat" file for those under "command.com".
When using MSYS/MINGW, calling the "update.bat" is a pain and using the bash script "update" is easier. But the latter only behaves (currently) for executables without extensions and libraries as .so and not .dll.
My patch of "update" first checks existence of shell variable "MSYSTEM" (which only exists on MSYS/MINGW) and then does the same than update.bat/update but correctly for a MSYS system (that is use the correct extensions).
Patch applied, thank you :)