eclipse plugin: create build script for bash aswell
This commit is contained in:
parent
01c81cef29
commit
5a90d7cdf4
2 changed files with 65 additions and 3 deletions
|
@ -3,15 +3,25 @@
|
|||
set ECLIPSEBIN=%1
|
||||
set BUILDDIR=%TEMP%\eclipse_build
|
||||
|
||||
mkdir %BUILDDIR%
|
||||
mkdir -p %BUILDDIR%
|
||||
|
||||
REM get path to equinox jar inside ECLIPSEBIN folder
|
||||
for /f "delims= tokens=1" %%c in ('dir /B /S /OD %ECLIPSEBIN%\plugins\org.eclipse.equinox.launcher_*.jar') do set EQUINOXJAR=%%c
|
||||
echo "Found equinox jar: " %EQUINOXJAR%
|
||||
echo Found equinox jar: %EQUINOXJAR%
|
||||
|
||||
IF NOT EXIST %EQUINOXJAR% DO (
|
||||
echo Couldn't find the equinox launcher jar
|
||||
goto end
|
||||
)
|
||||
|
||||
REM find pde build folder
|
||||
for /f "delims= tokens=1" %%c in ('dir /B /S /OD %ECLIPSEBIN%\plugins\org.eclipse.pde.build_*') do set PDEBUILD_DIR=%%c
|
||||
echo "Found pde folder: " %PDEBUILD_DIR%
|
||||
echo Found pde folder: %PDEBUILD_DIR%
|
||||
|
||||
IF NOT EXIST %PDEBUILD_DIR% DO (
|
||||
echo Couldn't find the pde build plugin. Are you using a RCP eclipse version?
|
||||
goto end
|
||||
)
|
||||
|
||||
java -cp %EQUINOXJAR% org.eclipse.core.launcher.Main -data workspace -application org.eclipse.ant.core.antRunner -DbuildDirectory=%BUILDDIR% -Dbase=%ECLIPSEBIN% -DbaseLocation=%ECLIPSEBIN% -Ddeltapack=%ECLIPSEBIN% -Declipse.pdebuild.scripts=%PDEBUILD_DIR%\scripts -Declipse.pdebuild.templates=%PDEBUILD_DIR%\templates -buildfile build.xml
|
||||
|
||||
|
|
52
utils/java/org.wesnoth.build/build.sh
Normal file
52
utils/java/org.wesnoth.build/build.sh
Normal file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
|
||||
eclipse_dir=$1
|
||||
build_dir=/tmp/eclipse_build
|
||||
|
||||
mkdir -p "$build_dir"
|
||||
if [[ -z "$eclipse_dir" ]]
|
||||
then
|
||||
echo Please set the eclipse installation directory as the first parameter.
|
||||
exit
|
||||
fi
|
||||
|
||||
echo Using $eclipse_dir directory as eclipse installation.
|
||||
echo Using $build_dir as temporary directory.
|
||||
|
||||
echo Searching for eclipse launcher...
|
||||
launcher_jar=`find "$eclipse_dir/plugins/" -type f -name 'org.eclipse.equinox.launcher_*.jar' -print0`
|
||||
if [[ -f "$launcher_jar" ]]
|
||||
then
|
||||
echo Found eclipse launcher jar: $launcher_jar
|
||||
else
|
||||
echo Could not find eclipse launcher, exiting.
|
||||
exit
|
||||
fi
|
||||
|
||||
echo Searching for eclipse pde build directory...
|
||||
pdebuild_dir=`find "$eclipse_dir/plugins/" -type d -name 'org.eclipse.pde.build_*' -print0`
|
||||
if [[ -d "$pdebuild_dir" ]]
|
||||
then
|
||||
echo Found pde build directory: $pdebuild_dir
|
||||
else
|
||||
echo Could not find pde build directory, exiting.
|
||||
exit
|
||||
fi
|
||||
|
||||
echo Everything set-up. Starting the build...
|
||||
|
||||
java -cp $launcher_jar org.eclipse.core.launcher.Main -data workspace -application org.eclipse.ant.core.antRunner -DbuildDirectory=$build_dir -Dbase=$eclipse_dir -DbaseLocation=$eclipse_dir -Ddeltapack=$eclipse_dir -Declipse.pdebuild.scripts=$pdebuild_dir/scripts -Declipse.pdebuild.templates=$pdebuild_dir/templates -buildfile build.xml
|
||||
|
||||
echo Cleaning up...
|
||||
if [[ -f "../org.wesnoth/build.xml" ]]
|
||||
then
|
||||
rm ../org.wesnoth/build.xml
|
||||
fi
|
||||
if [[ -f "../org.wesnoth.wml/build.xml" ]]
|
||||
then
|
||||
rm ../org.wesnoth.wml/build.xml
|
||||
fi
|
||||
if [[ -f "../org.wesnoth.wml.ui/build.xml" ]]
|
||||
then
|
||||
rm ../org.wesnoth.wml.ui/build.xml
|
||||
fi
|
Loading…
Add table
Reference in a new issue