if not defined FQDN goto guess_fqdn\r
\r
:generate\r
+set PATH=%PATH%;%ProgramFiles%\Shibboleth\SP\lib\\r
set CNF="%PREFIX%sp-cert.cnf"\r
echo # OpenSSL configuration file for creating sp-cert.pem >%CNF%\r
echo [req] >>%CNF%\r
wixcop -indent:2 ShibbolethSP-main-x64.wxs
candle ShibbolethSP-main-x64.wxs
-light -sw1055 -sice:ICE82 -o ShibbolethSP-main-x64.msi ShibbolethSP-main-x64.wixobj ShibbolethSP-exe-x64.wixobj ShibbolethSP-registry-x64.wixobj ShibbolethSP-noarch.wixobj ShibbolethSP-exe-x86.wixobj ShibbolethSP-registry-x86.wixobj
+light -sw1055 -sice:ICE82 -o ShibbolethSP-main-x64.msi ShibbolethSP-main-x64.wixobj ShibbolethSP-exe-x64.wixobj ShibbolethSP-registry-x64.wixobj ShibbolethSP-noarch.wixobj ShibbolethSP-exe-x86.wixobj ShibbolethSP-registry-x86.wixobj -ext WixUtilExtension.dll
wixcop -indent:2 ShibbolethSP-main-x86.wxs
candle ShibbolethSP-main-x86.wxs
-light -sw1055 -sice:ICE82 -o ShibbolethSP-main-x86.msi ShibbolethSP-main-x86.wixobj ShibbolethSP-noarch.wixobj ShibbolethSP-exe-x86.wixobj ShibbolethSP-registry-x86.wixobj
+light -sw1055 -sice:ICE82 -o ShibbolethSP-main-x86.msi ShibbolethSP-main-x86.wixobj ShibbolethSP-noarch.wixobj ShibbolethSP-exe-x86.wixobj ShibbolethSP-registry-x86.wixobj -ext WixUtilExtension.dll
<?xml version='1.0' encoding='UTF-8'?>\r
\r
+<!-- TODO roll in xmltooling, make subsidiary to Shib -->\r
<!-- Licensed to the University Corporation for Advanced Internet\r
Development, Inc. (UCAID) under one or more contributor license\r
agreements. See the NOTICE file distributed with this work for\r
<?xml version='1.0' encoding='UTF-8'?>\r
-\r
+<!-- TODO roll in xmltooling, make subsidiary to Shib Ad documentation -->\r
<!-- Licensed to the University Corporation for Advanced Internet\r
Development, Inc. (UCAID) under one or more contributor license\r
agreements. See the NOTICE file distributed with this work for\r
<?xml version='1.0' encoding='UTF-8'?>\r
+<!-- TODO roll in xmltooling make subsidiary to Shib -->\r
\r
<!-- Licensed to the University Corporation for Advanced Internet\r
Development, Inc. (UCAID) under one or more contributor license\r
<?xml version='1.0' encoding='UTF-8'?>\r
-\r
+<!-- TODO etc is uninstallable, etc\dist isn't -->\r
<!-- Licensed to the University Corporation for Advanced Internet\r
Development, Inc. (UCAID) under one or more contributor license\r
agreements. See the NOTICE file distributed with this work for\r
</Directory><!-- var_run -->\r
</Directory><!-- var -->\r
</DirectoryRef>\r
- \r
+\r
<Binary Id='EditConfigFileSrc' SourceFile='$(var.BuildDirectory)\cvs\2.0\cpp-sp\msi\scripts\shib_edit_config_files.vbs-wix' />\r
- <Binary Id='KeyGenSrc' SourceFile='$(var.BuildDirectory)\cvs\2.0\cpp-sp\msi\scripts\shib_keygen.vbs' />\r
+\r
<CustomAction Id='EditConfigFiles' \r
BinaryKey='EditConfigFileSrc' VBScriptCall='' Execute='deferred' Impersonate='no' />\r
- <CustomAction Id='SetEditConfigFiles' Property='EditConfigFiles' Value='[INSTALLDIR];@;[SHIBD_PORT];@;[CommonAppDataFolder]' />\r
- <!-- TODO use QtExecCmdLine -->\r
- <CustomAction Id='KeyGen' BinaryKey='KeyGenSrc' VBScriptCall='' Execute='deferred' Impersonate='no' />\r
- <CustomAction Id='SetKeyGen' Property='KeyGen' Value='[INSTALLDIR]' />\r
+ <CustomAction Id='SetEditConfigFiles' Property='EditConfigFiles' Value='[INSTALLDIR];@;[SHIBD_PORT];@;[OUR_DLL_PATH]' />\r
+\r
+ <CustomAction Id='KeyGen' BinaryKey='WixCA' DllEntry='CAQuietExec' Execute='deferred' Impersonate='no' />\r
+ <CustomAction Id='SetKeyGen' Property='KeyGen' Value='"[INSTALLDIR]etc\shibboleth\keygen.bat"' />\r
\r
<!-- TODO IIS Install (if not ALREADYINSTALLED)\r
TODO IIS Uninstalll (if UGRADINGPRODUCTCODE) -->\r
--- /dev/null
+Function ReadFile( filePath )\r
+ Dim theFile\r
+\r
+ 'OpenTextFile args: <path>, 1 = ForReading\r
+ 'If you read an empty file, VBScript throws an error for some reason\r
+ if (FileSystemObj.FileExists(filePath)) then\r
+ Set theFile = FileSystemObj.GetFile(filePath)\r
+ if (theFile.size > 0) then\r
+ Set theFile = FileSystemObj.OpenTextFile(filePath, 1)\r
+ ReadFile = theFile.ReadAll\r
+ else\r
+ ReadFile = ""\r
+ end if\r
+ else\r
+ ReadFile = ""\r
+ end if\r
+End Function\r
+\r
+Sub WriteFile( filePath, contents )\r
+ Dim theFile\r
+\r
+ 'OpenTextFile args: <path>, 2 = ForWriting, True = create if not exist\r
+ Set theFile = FileSystemObj.OpenTextFile(filePath, 2, True)\r
+ theFile.Write contents\r
+End Sub\r
+\r
+Sub ReplaceInFile( filePath, lookForStr, replaceWithStr )\r
+ Dim buffer\r
+\r
+ buffer = ReadFile(filePath)\r
+ if (buffer <> "") then\r
+ buffer = Replace(buffer, lookForStr, replaceWithStr)\r
+ WriteFile filePath, buffer\r
+ end if\r
+End Sub\r
+\r
+\r
+Dim FileSystemObj, ConfigFile, ConfigFileName, XMLDir, WshShell\r
+\r
+on error resume next\r
+Set FileSystemObj = CreateObject("Scripting.FileSystemObject")\r
+if (Err = 0) then\r
+\r
+ 'Get the parameters via CustomActionData\r
+ customData = Session.Property("CustomActionData")\r
+ msiProperties = split(customData,";@;")\r
+ XMLDir = msiProperties(0) ' \programdata\shibboleth\sp\xml\opensaml\\r
+ ConfigFileName = msiProperties(1) 'catalog\r
+\r
+ ConfigFile = XMLDir & ConfigFileName\r
+ ReplaceInFile ConfigFile, "@-PKGXMLDIR-@/", XMLDir\r
+\r
+'Last End If\r
+End If
\ No newline at end of file
msiProperties = split(customData,";@;")\r
InstallDir = msiProperties(0)\r
ShibdPort = msiProperties(1)\r
- ProgramFiles = msiProperties(2)\r
+ ProgramData = msiProperties(2)\r
\r
'Remove all trailing backslashes to normalize\r
do while (mid(InstallDir,Len(InstallDir),1) = "\")\r
'Afterwards, if the config file doesn't already exist, copy up to etc/shibboleth\r
'Also strip *.in for files in dist\r
\r
- 'Keygen.bat is updated in placehowever\r
- Keygen = ConfigDir & "keygen.bat"\r
- ReplaceInFile Keygen, "@-PROGRAMFILES-@", ProgramFiles\r
-\r
-\r
ConfigFile = DistDir & "shibd.logger.in"\r
ReplaceInFile ConfigFile, "@-PKGLOGDIR-@", ConvertedDir & "/var/log/shibboleth"\r
If (NOT FileSystemObj.FileExists(ConfigDir & "shibd.logger")) then\r
FileSystemObj.CopyFile DistDir & "protocols.xml", ConfigDir, false\r
End If\r
\r
- 'Finally, fix up schema catalogs.\r
- \r
- XMLDir = InstallDir & "\share\xml\xmltooling\"\r
- ConfigFile = XMLDir & "catalog.xml"\r
- ReplaceInFile ConfigFile, "@-PKGXMLDIR-@/", XMLDir\r
-\r
- XMLDir = InstallDir & "\share\xml\opensaml\"\r
- ConfigFile = XMLDir & "saml20-catalog.xml"\r
- ReplaceInFile ConfigFile, "@-PKGXMLDIR-@/", XMLDir\r
- ConfigFile = XMLDir & "saml11-catalog.xml"\r
- ReplaceInFile ConfigFile, "@-PKGXMLDIR-@/", XMLDir\r
- ConfigFile = XMLDir & "saml10-catalog.xml"\r
- ReplaceInFile ConfigFile, "@-PKGXMLDIR-@/", XMLDir\r
-\r
- XMLDir = InstallDir & "\share\xml\shibboleth\"\r
- ConfigFile = XMLDir & "catalog.xml"\r
- ReplaceInFile ConfigFile, "@-PKGXMLDIR-@/", XMLDir\r
-\r
'Last End If\r
End If
\ No newline at end of file