[java-identity-provider COMMIT] /trunk/idp-installer/src/main/wix/IdP.bat

noreply at shibboleth.net noreply at shibboleth.net
Fri Jul 8 05:56:05 EDT 2016


Author: rdw
Date: Fri Jul  8 05:56:03 2016
New Revision: 8287

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8287&view=rev
Log:
IDP-983 use the java-base from our separate project

https://issues.shibboleth.net/jira/browse/IDP-983

wheile we constructure the to be installed tree we remove the old
embedded stuff and in its place insert the contents of the jetty-base
zip file.


Modified:
    trunk/idp-installer/src/main/wix/IdP.bat

Modified: trunk/idp-installer/src/main/wix/IdP.bat
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-installer/src/main/wix/IdP.bat?rev=8287&r1=8286&r2=8287&view=diff
==============================================================================
--- trunk/idp-installer/src/main/wix/IdP.bat	(original)
+++ trunk/idp-installer/src/main/wix/IdP.bat	Fri Jul  8 05:56:03 2016
@@ -4,8 +4,8 @@
 
 REM Preconditions
 
-if "%1%" == "" (
-  Echo Idp PATH_TO_IDP_DISTRIBUTION
+if "%2%" == "" (
+  Echo Idp PATH_TO_IDP_DISTRIBUTION PATH_TO_JETTY_BASE_DISTRO
   goto done
 )
 
@@ -32,6 +32,10 @@
 
 if exist idp-extract (
    rd /q /s idp-extract
+)
+
+if exist idp-jetty-base-extract (
+   rd /q /s idp-jetty-base-extract
 )
 
 REM Set up environment
@@ -64,7 +68,7 @@
 
 if not exist %1.asc (
    echo Error: Could not locate signature for Idp zip %1%.asc
-   goto xxxdone
+   goto noIdPSig
 )
 
 gpg --verify %1.asc %1
@@ -72,7 +76,7 @@
    echo Error: Signature check failed on %1%
    goto done
 )
-:xxxdone
+:noIdPSig
 mkdir idp-extract
 cd idp-extract
 if exist "%1" (
@@ -88,7 +92,43 @@
   echo Could not find idp.properties in IdP package
   goto done;
 )
-
+cd ..
+
+REM Now do the same again for jetty-base
+if not exist %2% (
+   echo Error: Could not locate jetty base zip %2%
+   goto done
+)
+
+if not exist %2.asc (
+   echo Error: Could not locate signature for jetty base zip %2%.asc
+   goto noJettyBaseSig
+)
+
+gpg --verify %2.asc %2
+if ERRORLEVEL 1 (
+   echo Error: Signature check failed on %2%
+   goto done
+)
+:noJettyBaseSig
+mkdir idp-jetty-base-extract
+cd idp-jetty-base-extract
+if exist "%2" (
+  "%JARCMD%" xf %2 
+) else (
+  "%JARCMD%" xf ..\%2
+)
+rem is this a real package?
+dir /s idp.ini 1> nl:a 2> nl:b
+if ERRORLEVEL 1 (
+  cd ..
+  echo Could not find idp.ini in Jetty Base package
+  goto done;
+)
+for /D %%X in (*) do set jettyBaseEx=%%X
+rename %jettyBaseEx% JettyBase
+
+cd ..\idp-extract
 for /D %%X in (*) do set idpex=%%X
 
 rem we do not want to populate conf/flows/view/messages
@@ -123,14 +163,19 @@
 rename %idpex% IdPEx
 set idpex=IdPEx
 
-rem we Want to call embedded/jetty-base-9.3 jetty-base
-move %idpex%\embedded\jetty-base-9.3 %idpex%\jetty-base
-if ERRORLEVEL 1 (
-  cd ..
-  echo embedded/jetty-base-9.3 directory not found?
-  goto done;
-)
-rd /s /q %idpex%\embedded
+rem remove any old embedded detritus
+if exist %idpex%\embedded (
+   rd /q /s %idpex%\embedded
+)
+
+copy the appropriate jetty base
+
+move ..\idp-jetty-base-extract\JettyBase %idpex%\jetty-base
+if ERRORLEVEL 1 (
+  cd ..
+  echo jetty-base directory not found?
+  goto done;
+)
 
 rem We want to call jetty-base/start.d jetty-base/start.d.dist
 
@@ -141,8 +186,6 @@
   goto done;
 )
 cd ..
-
-
 
 "%WIX%/BIN/HEAT" dir idp-extract\%idpex% -platform -gg -dr INSTALLDIR -var var.idpSrc -cg IdPGroup -out idp_contents.wxs -srd
 if ERRORLEVEL 1 goto done
@@ -173,6 +216,7 @@
 REM Tidy up in the Sucessful exit case
    del *.wixobj *.wixpdb
    rd /s /q idp-extract
+   rd /s /q idp-jetty-base-extract
    del idp_contents.wxs
 :done
 



More information about the commits mailing list