geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r543589 - in /geronimo/sandbox/j2g/src/main/resources: j2g-configure.bat jdesc2g.bat jres2g.bat jsrc2g.bat
Date Fri, 01 Jun 2007 19:53:13 GMT
Author: dwoods
Date: Fri Jun  1 12:53:12 2007
New Revision: 543589

URL: http://svn.apache.org/viewvc?view=rev&rev=543589
Log:
GERONIMO-3200 Windows .bat files have hard coded assumptious paths, with no error checks
Also added the echo, pause and os check from the geronimo.bat script into these.
Erik, thanks for the patch.

Modified:
    geronimo/sandbox/j2g/src/main/resources/j2g-configure.bat
    geronimo/sandbox/j2g/src/main/resources/jdesc2g.bat
    geronimo/sandbox/j2g/src/main/resources/jres2g.bat
    geronimo/sandbox/j2g/src/main/resources/jsrc2g.bat

Modified: geronimo/sandbox/j2g/src/main/resources/j2g-configure.bat
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/src/main/resources/j2g-configure.bat?view=diff&rev=543589&r1=543588&r2=543589
==============================================================================
--- geronimo/sandbox/j2g/src/main/resources/j2g-configure.bat (original)
+++ geronimo/sandbox/j2g/src/main/resources/j2g-configure.bat Fri Jun  1 12:53:12 2007
@@ -18,4 +18,39 @@
 @REM $Rev: 381214 $ $Date: 2006-02-26 20:12:56 -0500 (Sun, 26 Feb 2006) $
 @REM --------------------------------------------------------------------
 
-java -cp configurator.jar org.apache.geronimo.j2g.Configurator %ECLIPSE_HOME%
\ No newline at end of file
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@if "%OS%" == "Windows_NT" goto okOsCheck
+@echo Error: You are running on an unsupported or unknown operating system.
+@set ERRORLEVEL=1
+@goto end
+
+:okOsCheck
+@setlocal enableextensions
+@set ERRORLEVEL=0
+
+IF NOT DEFINED ECLIPSE_HOME GOTO NO_ECLIPSE_HOME
+GOTO GO
+
+:NO_ECLIPSE_HOME
+ECHO.
+ECHO ECLIPSE_HOME not found in your environment.
+ECHO Please specify the path to your Eclipse SDK now, or define it as an environment variable
and restart this tool.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P ECLIPSE_HOME=ECLIPSE_HOME=
+
+:GO
+ECHO.
+ECHO Copying J2G plugins to %ECLIPSE_HOME%\plugins\ ...
+ECHO.
+COPY /Y ..\plugins\*.jar %ECLIPSE_HOME%\plugins\
+ECHO.
+java -cp ..\lib\configurator-1.0.0-SNAPSHOT.jar org.apache.geronimo.j2g.Configurator %ECLIPSE_HOME%
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+

Modified: geronimo/sandbox/j2g/src/main/resources/jdesc2g.bat
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/src/main/resources/jdesc2g.bat?view=diff&rev=543589&r1=543588&r2=543589
==============================================================================
--- geronimo/sandbox/j2g/src/main/resources/jdesc2g.bat (original)
+++ geronimo/sandbox/j2g/src/main/resources/jdesc2g.bat Fri Jun  1 12:53:12 2007
@@ -18,4 +18,64 @@
 @REM $Rev: 381214 $ $Date: 2006-02-26 20:12:56 -0500 (Sun, 26 Feb 2006) $
 @REM --------------------------------------------------------------------
 
-java -classpath %ECLIPSE_HOME%\startup.jar org.eclipse.core.launcher.Main -application org.apache.geronimo.j2g.descriptors.tool
-data @user.home\workspace\ -configuration @user.dir\..\eclipse\configuration %*
\ No newline at end of file
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@if "%OS%" == "Windows_NT" goto okOsCheck
+@echo Error: You are running on an unsupported or unknown operating system.
+@set ERRORLEVEL=1
+@goto end
+
+:okOsCheck
+@setlocal enableextensions
+@set ERRORLEVEL=0
+
+IF NOT DEFINED STARTUP_JAR (IF DEFINED ECLIPSE_HOME SET STARTUP_JAR=%ECLIPSE_HOME%) ELSE
ECHO.
+
+:ENV_CHECKS
+IF NOT DEFINED ECLIPSE_HOME GOTO NO_ECLIPSE_HOME 
+	
+IF NOT DEFINED WORKSPACE GOTO NO_WORKSPACE
+
+IF NOT EXIST %STARTUP_JAR%\startup.jar GOTO NO_STARTUP_JAR
+GOTO GO
+
+:NO_ECLIPSE_HOME
+ECHO.
+ECHO ERROR: ECLIPSE_HOME not found in your environment.
+ECHO Please specify the path to the Eclipse SDK now, or define it as an environment variable
and restart this tool.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P ECLIPSE_HOME=ECLIPSE_HOME=
+SET STARTUP_JAR=%ECLIPSE_HOME%
+GOTO ENV_CHECKS
+
+
+:NO_WORKSPACE
+ECHO.
+ECHO ERROR: WORKSPACE not found in your environment.
+ECHO Please specify a path for a Eclipse workspace now, or define it as an environment variable
and restart this tool.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P WORKSPACE=WORKSPACE=
+GOTO ENV_CHECKS
+
+:NO_STARTUP_JAR
+ECHO.
+ECHO ERROR: startup.jar could not be located in %STARTUP_JAR%.
+ECHO Please specify the path to directory that contains the Eclipse SDK startup.jar file.
+ECHO.
+ECHO This may be located in %ECLIPSE_HOME%\plugins\org.eclipse.platform_X.X.XXX.vXXXXXXXX,
where X indicates the version number.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P STARTUP_JAR=STARTUP_JAR=
+GOTO ENV_CHECKS
+
+:GO
+java -classpath %STARTUP_JAR%\startup.jar org.eclipse.core.launcher.Main -application org.apache.geronimo.j2g.descriptors.tool
-data %WORKSPACE% -configuration %ECLIPSE_HOME%\configuration %*
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+

Modified: geronimo/sandbox/j2g/src/main/resources/jres2g.bat
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/src/main/resources/jres2g.bat?view=diff&rev=543589&r1=543588&r2=543589
==============================================================================
--- geronimo/sandbox/j2g/src/main/resources/jres2g.bat (original)
+++ geronimo/sandbox/j2g/src/main/resources/jres2g.bat Fri Jun  1 12:53:12 2007
@@ -18,4 +18,64 @@
 @REM $Rev: 381214 $ $Date: 2006-02-26 20:12:56 -0500 (Sun, 26 Feb 2006) $
 @REM --------------------------------------------------------------------
 
-java -classpath %ECLIPSE_HOME%\startup.jar org.eclipse.core.launcher.Main -application org.apache.geronimo.j2g.resources.tool
-data @user.home\workspace\ -configuration @user.dir\..\eclipse\configuration %*
\ No newline at end of file
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@if "%OS%" == "Windows_NT" goto okOsCheck
+@echo Error: You are running on an unsupported or unknown operating system.
+@set ERRORLEVEL=1
+@goto end
+
+:okOsCheck
+@setlocal enableextensions
+@set ERRORLEVEL=0
+
+IF NOT DEFINED STARTUP_JAR (IF DEFINED ECLIPSE_HOME SET STARTUP_JAR=%ECLIPSE_HOME%) ELSE
ECHO.
+
+:ENV_CHECKS
+IF NOT DEFINED ECLIPSE_HOME GOTO NO_ECLIPSE_HOME 
+	
+IF NOT DEFINED WORKSPACE GOTO NO_WORKSPACE
+
+IF NOT EXIST %STARTUP_JAR%\startup.jar GOTO NO_STARTUP_JAR
+GOTO GO
+
+:NO_ECLIPSE_HOME
+ECHO.
+ECHO ERROR: ECLIPSE_HOME not found in your environment.
+ECHO Please specify the path to the Eclipse SDK now, or define it as an environment variable
and restart this tool.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P ECLIPSE_HOME=ECLIPSE_HOME=
+SET STARTUP_JAR=%ECLIPSE_HOME%
+GOTO ENV_CHECKS
+
+
+:NO_WORKSPACE
+ECHO.
+ECHO ERROR: WORKSPACE not found in your environment.
+ECHO Please specify a path for a Eclipse workspace now, or define it as an environment variable
and restart this tool.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P WORKSPACE=WORKSPACE=
+GOTO ENV_CHECKS
+
+:NO_STARTUP_JAR
+ECHO.
+ECHO ERROR: startup.jar could not be located in %STARTUP_JAR%.
+ECHO Please specify the path to directory that contains the Eclipse SDK startup.jar file.
+ECHO.
+ECHO This may be located in %ECLIPSE_HOME%\plugins\org.eclipse.platform_X.X.XXX.vXXXXXXXX,
where X indicates the version number.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P STARTUP_JAR=STARTUP_JAR=
+GOTO ENV_CHECKS
+
+:GO
+java -classpath %STARTUP_JAR%\startup.jar org.eclipse.core.launcher.Main -application org.apache.geronimo.j2g.resources.tool
-data %WORKSPACE% -configuration %ECLIPSE_HOME%\configuration %*
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+

Modified: geronimo/sandbox/j2g/src/main/resources/jsrc2g.bat
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/src/main/resources/jsrc2g.bat?view=diff&rev=543589&r1=543588&r2=543589
==============================================================================
--- geronimo/sandbox/j2g/src/main/resources/jsrc2g.bat (original)
+++ geronimo/sandbox/j2g/src/main/resources/jsrc2g.bat Fri Jun  1 12:53:12 2007
@@ -18,4 +18,64 @@
 @REM $Rev: 381214 $ $Date: 2006-02-26 20:12:56 -0500 (Sun, 26 Feb 2006) $
 @REM --------------------------------------------------------------------
 
-java -classpath %ECLIPSE_HOME%\startup.jar org.eclipse.core.launcher.Main -application org.apache.geronimo.j2g.sources.tool
-data @user.home\workspace\ -configuration @user.dir\..\eclipse\configuration %*
\ No newline at end of file
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@if "%OS%" == "Windows_NT" goto okOsCheck
+@echo Error: You are running on an unsupported or unknown operating system.
+@set ERRORLEVEL=1
+@goto end
+
+:okOsCheck
+@setlocal enableextensions
+@set ERRORLEVEL=0
+
+IF NOT DEFINED STARTUP_JAR (IF DEFINED ECLIPSE_HOME SET STARTUP_JAR=%ECLIPSE_HOME%) ELSE
ECHO.
+
+:ENV_CHECKS
+IF NOT DEFINED ECLIPSE_HOME GOTO NO_ECLIPSE_HOME 
+	
+IF NOT DEFINED WORKSPACE GOTO NO_WORKSPACE
+
+IF NOT EXIST %STARTUP_JAR%\startup.jar GOTO NO_STARTUP_JAR
+GOTO GO
+
+:NO_ECLIPSE_HOME
+ECHO.
+ECHO ERROR: ECLIPSE_HOME not found in your environment.
+ECHO Please specify the path to the Eclipse SDK now, or define it as an environment variable
and restart this tool.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P ECLIPSE_HOME=ECLIPSE_HOME=
+SET STARTUP_JAR=%ECLIPSE_HOME%
+GOTO ENV_CHECKS
+
+
+:NO_WORKSPACE
+ECHO.
+ECHO ERROR: WORKSPACE not found in your environment.
+ECHO Please specify a path for a Eclipse workspace now, or define it as an environment variable
and restart this tool.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P WORKSPACE=WORKSPACE=
+GOTO ENV_CHECKS
+
+:NO_STARTUP_JAR
+ECHO.
+ECHO ERROR: startup.jar could not be located in %STARTUP_JAR%.
+ECHO Please specify the path to directory that contains the Eclipse SDK startup.jar file,
or define STARTUP_JAR as an environment variable and restart this tool.
+ECHO.
+ECHO This may be located in %ECLIPSE_HOME%\plugins\org.eclipse.platform_X.X.XXX.vXXXXXXXX,
where X indicates the version number.
+ECHO (Note: This will ONLY be in effect for this command prompt session).
+ECHO.
+SET /P STARTUP_JAR=STARTUP_JAR=
+GOTO ENV_CHECKS
+
+:GO
+java -classpath %STARTUP_JAR%\startup.jar org.eclipse.core.launcher.Main -application org.apache.geronimo.j2g.sources.tool
-data %WORKSPACE% -configuration %ECLIPSE_HOME%\configuration %*
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal
+



Mime
View raw message