Commit 8dc9445b authored by Christophe Demarey's avatar Christophe Demarey
Browse files

Update script file in order to have an fscript profile for the explorer and to...

Update script file in order to have an fscript profile for the explorer and to be able to load composites when the explorer starts.
parent 04128a8d
......@@ -96,6 +96,15 @@
<dependencySets>
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<excludes>
<exclude>org.ow2.frascati:frascati-explorer-fscript-plugin</exclude>
</excludes>
</dependencySet>
<dependencySet>
<outputDirectory>/lib/explorer-fscript-plugin</outputDirectory>
<includes>
<include>org.ow2.frascati:frascati-explorer-fscript-plugin</include>
</includes>
</dependencySet>
</dependencySets>
......
......@@ -38,21 +38,24 @@ set FRASCATI_HOME=%FRASCATI_HOME:~0,-5%
echo The FRASCATI_HOME variable is not set. Using %FRASCATI_HOME% as default value.
:CONFIG
set FRASCATI_VERSION=1.1-SNAPSHOT
set FRASCATI_VERSION=1.1
set FRASCATI_LIB=%FRASCATI_HOME%\lib
set FRASCATI_MAIN=org.ow2.frascati.factory.FactoryCommandLine
set LOGGING=%FRASCATI_HOME%\conf\logging.properties
set LAUNCHER_MAIN=org.ow2.frascati.Launcher
set LAUNCHER_LIB=%FRASCATI_LIB%\frascati-runtime-%FRASCATI_VERSION%.jar
set SCA_APPS_FOLDER=%FRASCATI_HOME%\sca-apps
set FRACTAL_PROVIDER=org.objectweb.fractal.julia.Julia
set JULIA_CONFIG=julia.cfg
set ADL_LAUNCHER=org.objectweb.fractal.adl.Launcher
set ADL_FILE=org.ow2.frascati.explorer.FrascatiExplorer(FraSCAti Explorer)
set FRASCATI_CMD=%1
set PARAMS=%*
rem Test if an option -s is specified or not
rem WARNING: This code can only work if there is one and only one option available for the frascati command
if "%2" == "-s" set FRASCATI_SCRIPT_FLAG=TRUE
if "%1" == "wsdl2java" (
echo Compiling ...
goto WSDL2JAVA
......@@ -65,10 +68,7 @@ if "%1" == "wsdl2java" (
echo Exiting OW2 FraSCAti ...
goto END
) else if "%1" == "explorer" (
echo Running the OW2 FraSCAti Explorer ...
"%JAVA%" %JAVA_OPTS% -Dfractal.provider=%FRACTAL_PROVIDER% -Djulia.config=%JULIA_CONFIG% -cp "%LAUNCHER_LIB%" %LAUNCHER_MAIN% %ADL_LAUNCHER% -lib "%FRASCATI_LIB%" -fractal "%ADL_FILE%" r
echo Exiting OW2 FraSCAti Explorer ...
goto END
goto EXPLORER
) else (
echo "Usage: frascati {wsdl2java|compile|run|explorer}"
goto END
......@@ -130,4 +130,33 @@ echo Usage: frascati compile [src] [name]
echo [src] = directory of the sources to compile
echo [name] = name of the jar to build
:EXPLORER
shift
set EXPLORER_LAUNCHER=org.ow2.frascati.explorer.FrascatiExplorerLauncher
set EXPLORER_FSCRIPT_LAUNCHER=org.ow2.frascati.explorer.fscript.FrascatiScriptExplorerLauncher
set EXPLORER_CLASSPATH=%FRASCATI_LIB%
echo Running the OW2 FraSCAti Explorer ...
if "%FRASCATI_SCRIPT_FLAG%" == "TRUE" (
set EXPLORER_LAUNCHER=%EXPLORER_FSCRIPT_LAUNCHER%
set EXPLORER_CLASSPATH=%FRASCATI_LIB%,%FRASCATI_LIB%\explorer-fscript-plugin
echo -^> FraSCAti Script plugin activated
)
if exist %SCA_APPS_FOLDER% (
rem update the classpath with user libraries
for /d %%X in ("%SCA_APPS_FOLDER%") do ( set EXPLORER_CLASSPATH=%EXPLORER_CLASSPATH%,%%~X )
rem search for composite files
setlocal EnableDelayedExpansion
set COMPOSITES=
for /r "%SCA_APPS_FOLDER%" %%X in (*.composite) do ( set COMPOSITES=!COMPOSITES! %%~nX )
setlocal DISABLEDELAYEDEXPANSION
)
"%JAVA%" %JAVA_OPTS% -Dfractal.provider=%FRACTAL_PROVIDER% -Djulia.config=%JULIA_CONFIG% -cp "%LAUNCHER_LIB%" %LAUNCHER_MAIN% %EXPLORER_LAUNCHER% -lib "%EXPLORER_CLASSPATH%" %COMPOSITES%
echo Exiting OW2 FraSCAti Explorer ...
:END
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment