OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | fractal-commits List | August 2008 Index

<--  Date Index  --> <--  Thread Index  -->

[fractal-commits] [8402] trunk/fractal-distribution/libraries/src/resources/distribution/ fractal.bat: Remove the use of FRACTAL_HOME environment varible.


Title: [8402] trunk/fractal-distribution/libraries/src/resources/distribution/fractal.bat: Remove the use of FRACTAL_HOME environment varible.
Revision
8402
Author
yann_davin
Date
2008-08-28 09:47:59 +0200 (Thu, 28 Aug 2008)

Log Message

Remove the use of FRACTAL_HOME environment varible.
Use the batch path to find the fractal libraries location.

Modified Paths

Diff

Modified: trunk/fractal-distribution/libraries/src/resources/distribution/fractal.bat (8401 => 8402)


--- trunk/fractal-distribution/libraries/src/resources/distribution/fractal.bat	2008-08-27 16:39:56 UTC (rev 8401)
+++ trunk/fractal-distribution/libraries/src/resources/distribution/fractal.bat	2008-08-28 07:47:59 UTC (rev 8402)
@@ -1,15 +1,27 @@
+rem Script to facilitate Fractal application launching
+rem TODO: check arguments compatibility, check that the FRACTAL_LIBRARIES exists
+
 @echo off
 
 set CP=.
+
+rem get the path of the batch script
+set BATCH_PATH=%~dp0
+
+rem get the path of fractal libraries
+rem "~0,-5" to remove "\bin" from the BATCH_PATH
+set FRACTAL_LIBRARIES=%BATCH_PATH:~0,-5%\lib
+
 goto Start
 
+
 :AppendClasspath
 rem echo CP:%CP% - arg:%1
 set CP=%CP%;%1
 GOTO :eof
 
 :Start
-for %%i in (%FRACTAL_HOME%\lib\*.jar) do (call :AppendClasspath %%i)
+for %%i in (%FRACTAL_LIBRARIES%\*.jar) do (call :AppendClasspath %%i)
 
 if [%1]==[-h] goto Help
 if not [%1]==[-h] goto ParseArgs
@@ -30,7 +42,7 @@
 echo		examples :
 echo		To use the script you sould create a jar with your Java classes and Fractal files add 
 echo		it to the classpath with the -cp option.
-echo		By default, all jars contained in the lib folder of the FRACTAL_HOME are added to the classpath.
+echo		By default, all jars contained in the lib folder %FRACTAL_LIBRARIES%.
 echo.	
 echo		fractal.bat  -cp dist/helloworld-julia-adl.jar -fscript
 echo		Fscript is started in console mode with a custom jar added to the classpath.


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.