Author: rmeggins
Update of /cvs/dirsec/fedora-idm-console/win
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29683
Modified Files:
Makefile
Added Files:
unzip.vbs
Log Message:
added unzip.vbs ; cleaned up/simplified Makefile
--- NEW FILE unzip.vbs ---
' unzip a zip file
Sub Usage()
WScript.Echo "Usage: cscript unzip.vbs \path\to\file.zip
[destinationfolder]"
WScript.Echo "Example: cscript unzip.vbs ..\src\foo.zip ..\dest"
WScript.Echo "NOTE: The .zip file must have a .zip extension, so if"
WScript.Echo "it does not, a temporary copy will be made with a .zip
extension"
WScript.Echo "If the destinationfolder does not exist, it will be created"
WScript.Echo "Use '.' for the current directory"
WScript.Echo "If the destinationfolder is not specified, '.' will be
used"
End Sub
' see if args are correct
Set objArgs = WScript.Arguments
If objArgs.Count < 1 then
Usage
WScript.Quit(1)
End If
' get our FSO object
Set objFSO = CreateObject("Scripting.FileSystemObject")
' src zip file is arg 0
SRC = objFSO.GetAbsolutePathName(objArgs(0))
' dest folder is arg 1 or "."
If objArgs.Count < 2 then
DEST = objFSO.GetAbsolutePathName(".")
Else
DEST = objFSO.GetAbsolutePathName(objArgs(1))
End If
' debugging - print args
' For I = 0 to objArgs.Count - 1
' WScript.Echo "arg ", I, " ", objArgs(I)
' Next
' create dest folder if it does not exist
If not objFSO.FolderExists(DEST) Then
objFSO.CreateFolder(DEST)
WScript.Echo "Created new folder", DEST
End If
' see if file ends in .zip - if not (e.g. .jar) make temp copy
' that ends in .zip
Dim newSRC
newSRC = ""
If not Right(SRC, 4) = ".zip" Then
newSRC = SRC & ".zip"
objFSO.CopyFile SRC, newSRC, true
SRC = newSRC
End If
' get the shell application object used to do the unzip
Set objShell = CreateObject("Shell.Application")
Set objSrc = objShell.Namespace(SRC)
Set objDest = objShell.Namespace(DEST)
' For Each item in objSrc.Items
' WScript.Echo "item = ", item
' Next
objDest.CopyHere(objSrc.Items)
' remove temp zip, if any
If Len(newSrc) > 0 Then
objFSO.DeleteFile(newSRC)
End If
WScript.Stdout.Write "Done. Copied contents of " & SRC & " to
" & DEST
' Set WshShell = WScript.CreateObject("WScript.Shell")
' WScript.Echo "CD =", WshShell.CurrentDirectory
' Set objFolder = objFSO.GetFolder(".")
' WScript.Echo "name = ", objFolder.Name
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/fedora-idm-console/win/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile 3 Feb 2009 16:19:07 -0000 1.3
+++ Makefile 10 Mar 2009 16:49:31 -0000 1.4
@@ -46,8 +46,10 @@
# could also use wget or curl
DOWNLOAD="c:\program files\support tools\bitsadmin" /wrap /transfer
consolebuild /download /priority normal
-SBC=http://tsunami.dsdev.sjc.redhat.com/share/builds/components
-SBV=http://tsunami.dsdev.sjc.redhat.com/share/builds/verification
+SBC=http://filer/components
+SBV=http://filer/components
+
+UNZIP=cscript //nologo unzip.vbs
NSPRVER=4.7.3
NSSVER=3_12_2
@@ -57,98 +59,101 @@
JSSVERDIR=JSS_$(JSSVER)_RTM/20090122.1
IDMVER=1.1
IDMVERDIR=$(IDMVER)/20090122.1
+WIXVER=2.0.5805.0
PLAT=WINNT5.0_OPT.OBJ
-PKGDIR="$(BASEDIR)\fedora-idm-console\win\build.$(PLAT)"
+# where to stage the package layout
+PKGDIR=build.$(PLAT)
+# where to find components to package
+COMPDIR=$(PKGDIR)
-#BASEDIR=E:\cygwin\home\rich
# where to find nspr dlls
-NSPRLIBDIR="$(BASEDIR)\nspr-4.7.3\lib"
+NSPRDIR=$(COMPDIR)\nspr
+NSPRLIBDIR=$(NSPRDIR)\lib
# where to find nss dlls
-NSSLIBDIR="$(BASEDIR)\nss-3.12.2\lib"
+NSSDIR=$(COMPDIR)\nss
+NSSLIBDIR=$(NSSDIR)\lib
# where to find nss exes
-NSSBINDIR="$(BASEDIR)\nss-3.12.2\bin"
+NSSBINDIR=$(NSSDIR)\bin
# where to find jss jar and dll
-JSSDIR="$(BASEDIR)\jss-4.2.5"
+JSSDIR=$(COMPDIR)\jss
# where to find the ldapjdk.jar
-LDAPDIR="$(BASEDIR)\console"
-#LDAPDIR=$(BASEDIR)\ldapjdk-4.18
+LDAPDIR=$(COMPDIR)\console
+#LDAPDIR=$(COMPDIR)\ldapjdk-4.18
# where to find the idm-console-framework jars
-IDMDIR="$(BASEDIR)\console"
+IDMDIR=$(COMPDIR)\console
# where to find the fedora-idm-console jar and other files
FEDORACONSOLEDIR=.
-WIXDIR="$(BASEDIR)\wix"
-CANDLE=$(WIXDIR)\candle
-LIGHT=$(WIXDIR)\light
+WIXURL=$(SBC)/wix
+WIXDIR=$(COMPDIR)\wix
+CANDLE=$(WIXDIR)\candle.exe
+LIGHT=$(WIXDIR)\light.exe
-ALL : $(BRAND_PKGNAME).msi
+ALL : $(PKGDIR)\$(BRAND_PKGNAME).msi
$(PKGDIR) :
mkdir $@
mkdir $@\Bitmaps
-LAYOUT : $(PKGDIR)
-# copy /Y $(NSPRLIBDIR)\*.dll $(PKGDIR)
-# copy /Y $(NSSLIBDIR)\*.dll $(PKGDIR)
-# copy /Y $(NSSBINDIR)\certutil.exe $(PKGDIR)
-# copy /Y $(NSSBINDIR)\pk12util.exe $(PKGDIR)
-# copy /Y $(JSSDIR)\jss4.jar $(PKGDIR)
-# copy /Y $(JSSDIR)\jss4.dll $(PKGDIR)
-# copy /Y $(LDAPDIR)\ldapjdk.jar $(PKGDIR)
-# copy /Y $(IDMDIR)\*.jar $(PKGDIR)
+$(NSPRDIR) $(NSSDIR) $(JSSDIR) $(LDAPDIR) $(IDMDIR) $(FEDORACONSOLEDIR) $(WIXDIR):
+ mkdir $@
+
+$(NSPRDIR)\mdbinary.jar : $(NSPRDIR)
+ if not exist $@ $(DOWNLOAD) $(SBC)/nspr/v$(NSPRVER)/$(PLAT)/$(@F) %%CD%%\$@
+
+$(NSPRLIBDIR)\libnspr4.dll : $(NSPRDIR)\mdbinary.jar
+ $(UNZIP) $? $(?D)
+
+$(NSSDIR)\mdbinary.jar : $(NSSDIR)
+ if not exist $@ $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/$(@F) %%CD%%\$@
+
+$(NSSLIBDIR)\nss3.dll : $(NSSDIR)\mdbinary.jar
+ $(UNZIP) $? $(?D)
+
+$(JSSDIR)\jss4.dll : $(JSSDIR)
+ if not exist $@ $(DOWNLOAD) $(SBV)/jss/$(JSSVERDIR)/$(PLAT)/lib/$(@F) %%CD%%\$@
+
+$(JSSDIR)\jss4.jar :
+ if not exist $@ $(DOWNLOAD) $(SBV)/jss/$(JSSVERDIR)/$(@F) %%CD%%\$@
+
+$(LDAPDIR)\ldapjdk.jar : $(LDAPDIR)
+ if not exist $@ $(DOWNLOAD) $(SBV)/ldapjdk/$(LDAPJDKVERDIR)/$(@F) %%CD%%\$@
+
+$(IDMDIR)\idm-console-base.jar $(IDMDIR)\idm-console-mcc.jar
$(IDMDIR)\idm-console-mcc_en.jar $(IDMDIR)\idm-console-nmclf.jar
$(IDMDIR)\idm-console-nmclf_en.jar : $(IDMDIR)
+ if not exist $@ $(DOWNLOAD) $(SBV)/idm-console-framework/$(IDMVERDIR)/$(@F) %%CD%%\$@
+
+$(FEDORACONSOLEDIR)\fedora-idm-console_en.jar : $(FEDORACONSOLEDIR)
+ echo where is $@
+
+$(WIXDIR)\wix-$(WIXVER).zip : $(WIXDIR)
+ if not exist $@ $(DOWNLOAD) $(WIXURL)/$(@F) %%CD%%\$@
+
+$(CANDLE) : $(WIXDIR)\wix-$(WIXVER).zip
+ $(UNZIP) $? $(?D)
+
+LAYOUT : $(PKGDIR) $(NSPRLIBDIR)\libnspr4.dll $(NSSLIBDIR)\nss3.dll $(JSSDIR)\jss4.dll
$(JSSDIR)\jss4.jar $(LDAPDIR)\ldapjdk.jar $(IDMDIR)\idm-console-base.jar
$(IDMDIR)\idm-console-mcc.jar $(IDMDIR)\idm-console-mcc_en.jar
$(IDMDIR)\idm-console-nmclf.jar $(IDMDIR)\idm-console-nmclf_en.jar
$(FEDORACONSOLEDIR)\fedora-idm-console_en.jar
+ copy /Y $(NSPRLIBDIR)\*.dll $(PKGDIR)
+ copy /Y $(NSSLIBDIR)\*.dll $(PKGDIR)
+ copy /Y $(NSSBINDIR)\certutil.exe $(PKGDIR)
+ copy /Y $(NSSBINDIR)\pk12util.exe $(PKGDIR)
+ copy /Y $(JSSDIR)\jss4.jar $(PKGDIR)
+ copy /Y $(JSSDIR)\jss4.dll $(PKGDIR)
+ copy /Y $(LDAPDIR)\ldapjdk.jar $(PKGDIR)
+ copy /Y $(IDMDIR)\*.jar $(PKGDIR)
copy /Y $(FEDORACONSOLEDIR)\*.jar $(PKGDIR)
# directory should already contain the bat file, icon, and bitmaps
- copy /Y $(FEDORACONSOLEDIR)\*.bat $(PKGDIR)
- copy /Y $(FEDORACONSOLEDIR)\*.ico $(PKGDIR)
- copy /Y $(FEDORACONSOLEDIR)\Bitmaps\* $(PKGDIR)\Bitmaps\*
- copy /Y $(FEDORACONSOLEDIR)\License.rtf $(PKGDIR)
-
-DOWNLOAD : $(PKGDIR)
-# NSPR
- $(DOWNLOAD) $(SBC)/nspr/v$(NSPRVER)/$(PLAT)/lib/libnspr4.dll $(PKGDIR)/libnspr4.dll
- $(DOWNLOAD) $(SBC)/nspr/v$(NSPRVER)/$(PLAT)/lib/libplc4.dll $(PKGDIR)/libplc4.dll
- $(DOWNLOAD) $(SBC)/nspr/v$(NSPRVER)/$(PLAT)/lib/libplds4.dll $(PKGDIR)/libplds4.dll
-# NSS
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/nss3.dll $(PKGDIR)/nss3.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/ssl3.dll $(PKGDIR)/ssl3.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/smime3.dll $(PKGDIR)/smime3.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/nssutil3.dll
$(PKGDIR)/nssutil3.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/freebl3.dll $(PKGDIR)/freebl3.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/softokn3.dll
$(PKGDIR)/softokn3.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/sqlite3.dll $(PKGDIR)/sqlite3.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/nssdbm3.dll $(PKGDIR)/nssdbm3.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/lib/nssckbi.dll $(PKGDIR)/nssckbi.dll
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/bin/certutil.exe
$(PKGDIR)/certutil.exe
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/bin/pk12util.exe
$(PKGDIR)/pk12util.exe
- $(DOWNLOAD) $(SBC)/nss/NSS_$(NSSVER)_RTM/$(PLAT)/bin/certutil.exe
$(PKGDIR)/certutil.exe
-# JSS
- $(DOWNLOAD) $(SBV)/jss/$(JSSVERDIR)/$(PLAT)/lib/jss4.dll $(PKGDIR)/jss4.dll
- $(DOWNLOAD) $(SBV)/jss/$(JSSVERDIR)/jss4.jar $(PKGDIR)/jss4.jar
-# LDAPJDK
- $(DOWNLOAD) $(SBV)/ldapjdk/$(LDAPJDKVERDIR)/ldapjdk.jar $(PKGDIR)/ldapjdk.jar
-# IDM
- $(DOWNLOAD) $(SBV)/idm-console-framework/$(IDMVERDIR)/idm-console-base.jar
$(PKGDIR)/idm-console-base.jar
- $(DOWNLOAD) $(SBV)/idm-console-framework/$(IDMVERDIR)/idm-console-mcc.jar
$(PKGDIR)/idm-console-mcc.jar
- $(DOWNLOAD) $(SBV)/idm-console-framework/$(IDMVERDIR)/idm-console-mcc_en.jar
$(PKGDIR)/idm-console-mcc_en.jar
- $(DOWNLOAD) $(SBV)/idm-console-framework/$(IDMVERDIR)/idm-console-nmclf.jar
$(PKGDIR)/idm-console-nmclf.jar
- $(DOWNLOAD) $(SBV)/idm-console-framework/$(IDMVERDIR)/idm-console-nmclf_en.jar
$(PKGDIR)/idm-console-nmclf_en.jar
-
-#$(PKGNAME).msi : LAYOUT DOWNLOAD
-$(PKGNAME).msi :
- cd $(PKGDIR)
- cd
- dir ..\$(PKGNAME).wxs
- $(CANDLE) ..\$(PKGNAME).wxs
- $(LIGHT) -out $(PKGNAME).msi $(PKGNAME).wixobj $(WIXDIR)\wixui.wixlib -loc
$(WIXDIR)\WixUI_en-us.wxl
-
-$(BRAND_PKGNAME).msi: $(PKGNAME).msi
- cd $(PKGDIR)
- del /F /Q $(BRAND_PKGNAME).msi
- rename $(PKGNAME).msi $(BRAND_PKGNAME).msi
+ copy /Y *.bat $(PKGDIR)
+ copy /Y *.ico $(PKGDIR)
+ copy /Y Bitmaps\* $(PKGDIR)\Bitmaps\*
+ copy /Y License.rtf $(PKGDIR)
+
+$(PKGDIR)\$(BRAND_PKGNAME).msi : $(PKGDIR) LAYOUT $(CANDLE) $(PKGNAME).wxs
+ $(CANDLE) -nologo -out $(PKGDIR)\$(PKGNAME).wixobj $(PKGNAME).wxs
+ $(LIGHT) -nologo -out $@ -b $(PKGDIR) $(PKGDIR)\$(PKGNAME).wixobj $(WIXDIR)\wixui.wixlib
-loc $(WIXDIR)\WixUI_en-us.wxl
clean:
- del /F /Q $(PKGDIR)
+ rmdir /S /Q $(PKGDIR)
help:
@echo You must define the following paths: