[Fedora-directory-commits] winsync/passwordsync unzip.vbs, NONE, 1.1 build.bat, 1.10, 1.11 package.mak, 1.1, 1.2

Richard Allen Megginson rmeggins at fedoraproject.org
Mon Feb 16 22:37:34 UTC 2009


Author: rmeggins

Update of /cvs/dirsec/winsync/passwordsync
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32256/passwordsync

Modified Files:
	build.bat package.mak 
Added Files:
	unzip.vbs 
Log Message:
Resolves: bug 426421 245630 476095
Description: Windows Console uses nss libraries from \windows\system32
Fix Description: Windows Console still uses nss libraries from system32, but now passsync uses the same NSS version as Windows Console, so there should be no conflict
Description: install LDAP SDK DLLs in sync service dir, not system32
Fix Description: only files that need to go in system32 are installed there - everything else is installed in the passync home directory
Description: upgrade/build components bug
Fix Description: Now using NSPR 4.7.3, NSS 3.12.2, Mozldap 6.0.5
In addition, you can now build passsync in a Windows only environmnet - uses bitsadmin instead of wget for downloading, and uses unzip.vbs instead of unzip - this should simplify the build environment so that you don't have to figure out which combination of mks/cygwin/msys needs to be installed.
I also upgraded to the latest version of wix and had to upgrade a couple of wxs elements.
I also added the ability to upgrade passsync in the future with the use of the Upgrade element.
Platforms tested: Windows Server 2003



--- 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 "you are trying to unzip a .jar file, you must copy or rename it"
    WScript.Echo "to have 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

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)

WScript.Echo "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: build.bat
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/build.bat,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- build.bat	10 Nov 2005 00:04:05 -0000	1.10
+++ build.bat	16 Feb 2009 22:37:32 -0000	1.11
@@ -39,10 +39,20 @@
 
 @echo off
 
+rem set DOWNLOAD=echo DOWNLOAD
+set DOWNLOAD="c:\program files\support tools\bitsadmin" /wrap /transfer passsyncbuild /download /priority normal
+set UNZIP=cscript //nologo "%CD%\unzip.vbs"
+ at rem set DOWNLOAD=wget --no-directories
+ at rem set UNZIP=unzip -q
+
 if [%BUILD_DEBUG%] == [optimize] (
     set FLAVOR=WINNT5.0_OPT.OBJ
+    set CFG1="passsync - Win32 Release"
+    set CFG2="passhook - Win32 Release"
 ) else (
     set FLAVOR=WINNT5.0_DBG.OBJ
+    set CFG1="passsync - Win32 Debug"
+    set CFG2="passhook - Win32 Debug"
 )
 
 rem ======== Set Various Build Directories ========
@@ -53,70 +63,91 @@
 set LIBROOT=..\components\%FLAVOR%
 rem   ------ Convert LIBROOT to absolute ------
 call :relative %LIBROOT% LIBROOT
-mkdir %LIBROOT%
+mkdir "%LIBROOT%"
 
 set PKGDIR=%OBJDEST%\package\passsync
-mkdir %PKGDIR%
+mkdir "%PKGDIR%"
 
 set DISTDIR=..\dist\%FLAVOR%
 rem   ------ Convert DISTDIR to absolute ------
 call :relative %DISTDIR% DISTDIR
-mkdir %DISTDIR%
+mkdir "%DISTDIR%"
+
+set WIXVER=2.0.5805.0
+set WIXDIR=..\wix
+rem   ------ Convert WIXDIR to absolute ------
+call :relative %WIXDIR% WIXDIR
 
 set WXSDIR=%CD%\wix
 
 rem ======== Fetch Components ========
 if [%INTERNAL_BUILD%] == [1] (
-    set COMPONENT_URL=http://ftp-rel.sfbay.redhat.com/share/builds/components
+    set COMPONENT_URL=http://tsunami.dsdev.sjc.redhat.com/share/builds/components
+    set COMPONENT_URL2=http://tsunami.dsdev.sjc.redhat.com/share/builds/verification
 ) else (
-    set COMPONENT_URL=http://directory.fedora.redhat.com/built/components
+    set COMPONENT_URL=http://directory.fedoraproject.org/built/components
 )
 
 rem   ------ NSPR ------
-set NSPR_LOCATION=%COMPONENT_URL%/nspr/v4.6
-if NOT EXIST %LIBROOT%\nspr (
-    pushd %CD%
-    mkdir %LIBROOT%\nspr
-    cd %LIBROOT%\nspr
+set NSPR_LOCATION=%COMPONENT_URL%/nspr/v4.7.3
+if NOT EXIST "%LIBROOT%\nspr" (
+    mkdir "%LIBROOT%\nspr"
+    mkdir "%LIBROOT%\nspr\include"
+    pushd "%LIBROOT%\nspr"
     echo %NSPR_LOCATION%/%FLAVOR% > version.txt
-    wget --no-directories %NSPR_LOCATION%/%FLAVOR%/mdbinary.jar
-    wget --no-directories -Pinclude %NSPR_LOCATION%/%FLAVOR%/mdheader.jar
-    unzip -q mdbinary.jar
+    %DOWNLOAD% %NSPR_LOCATION%/%FLAVOR%/mdbinary.jar "%LIBROOT%\nspr\mdbinary.jar"
+    %DOWNLOAD% %NSPR_LOCATION%/%FLAVOR%/mdheader.jar "%LIBROOT%\nspr\mdheader.jar"
+
+    ren mdbinary.jar mdbinary.zip
+    ren mdheader.jar mdheader.zip
+    %UNZIP% mdbinary.zip
     cd include
-    unzip -q mdheader.jar
+    %UNZIP% ..\mdheader.zip
     popd
 )
 
 rem   ------ NSS ------
-set NSS_LOCATION=%COMPONENT_URL%/nss/NSS_3_10_2_RTM
-if NOT EXIST %LIBROOT%\nss (
-    pushd %CD%
-    mkdir %LIBROOT%\nss
-    cd %LIBROOT%\nss
+set NSS_LOCATION=%COMPONENT_URL%/nss/NSS_3_12_2_RTM
+if NOT EXIST "%LIBROOT%\nss" (
+    mkdir "%LIBROOT%\nss"
+    mkdir "%LIBROOT%\nss\include"
+    pushd "%LIBROOT%\nss"
     echo %NSS_LOCATION%/%FLAVOR% > version.txt
-    wget --no-directories %NSS_LOCATION%/%FLAVOR%/mdbinary.jar
-    wget --no-directories -Pinclude %NSS_LOCATION%/xpheader.jar
-    unzip -q mdbinary.jar
+    %DOWNLOAD% %NSS_LOCATION%/%FLAVOR%/mdbinary.jar "%LIBROOT%\nss\mdbinary.jar"
+    %DOWNLOAD% %NSS_LOCATION%/include/xpheader.jar "%LIBROOT%\nss\xpheader.jar"
+    ren mdbinary.jar mdbinary.zip
+    ren xpheader.jar xpheader.zip
+    %UNZIP% mdbinary.zip
     cd include
-    unzip -q xpheader.jar
+    %UNZIP% ..\xpheader.zip
     popd
 )
 
 rem   ------ LDAPSDK ------
-set LDAPSDK_LOCATION=%COMPONENT_URL%/ldapsdk50/v5.16
-if NOT EXIST %LIBROOT%\ldapsdk (
-    pushd %CD%
-    mkdir %LIBROOT%\ldapsdk
-    cd %LIBROOT%\ldapsdk
+set LDAPSDK_LOCATION=%COMPONENT_URL2%/ldapcsdk/v6.0.5/20090128.1
+if NOT EXIST "%LIBROOT%\ldapsdk" (
+    mkdir "%LIBROOT%\ldapsdk"
+    pushd "%LIBROOT%\ldapsdk"
     echo %LDAPSDK_LOCATION%/%FLAVOR% > version.txt
-    wget --no-directories %LDAPSDK_LOCATION%/%FLAVOR%/ldapcsdk516.zip
-    unzip -q ldapcsdk516.zip
+    %DOWNLOAD% %LDAPSDK_LOCATION%/%FLAVOR%/ldapcsdk.zip "%LIBROOT%\ldapsdk\ldapcsdk.zip"
+    %UNZIP% ldapcsdk.zip
+    popd
+)
+
+rem   ------ WIX ------
+set WIX_LOCATION=%COMPONENT_URL%/wix
+if NOT EXIST "%WIXDIR%" (
+    mkdir "%WIXDIR%"
+    pushd "%WIXDIR%"
+    echo %WIX_LOCATION% > version.txt
+    %DOWNLOAD% %WIX_LOCATION%/wix-%WIXVER%.zip "%WIXDIR%\wix-%WIXVER%.zip"
+    %UNZIP% wix-%WIXVER%.zip
     popd
 )
 
 set OK=0
 
-pushd %CD%
+pushd "%CD%"
 
 rem ======== Build ========
 rem   ------ Set Build Paths ------
@@ -127,7 +158,10 @@
 cd passsync
 echo -------- Beginning PassSync Build --------
 
-nmake /f passsync.mak
+rem nmake CFG=%CFG1% /nologo /d /p /g /f passsync.mak
+rem /d /p /g are debugging flags
+rem /nologo is the shut up flag
+nmake CFG=%CFG1% /nologo /f passsync.mak
 set /a OK=%OK% + %ERRORLEVEL%
 
 if [%OK%] GTR [1] (
@@ -141,7 +175,7 @@
 cd ..\passhook
 echo -------- Beginning Passhook Build --------
 
-nmake /f passhook.mak
+nmake /nologo CFG=%CFG2% /f passhook.mak
 set /a OK=%OK% + %ERRORLEVEL%
 
 if [%OK%] GTR [1] (
@@ -155,11 +189,11 @@
 cd ..
 echo -------- Beginning Packaging --------
 
-nmake /f package.mak
+nmake /nologo CFG=%CFG1% /f package.mak
 set /a OK=%OK% + %ERRORLEVEL%
 
-if EXIST %PKGDIR%\PassSync.msi (
-    copy /Y %PKGDIR%\PassSync.msi %DISTDIR%
+if EXIST "%PKGDIR%\PassSync.msi" (
+    copy /Y "%PKGDIR%\PassSync.msi" "%DISTDIR%"
     set /a OK=%OK% + %ERRORLEVEL%
 )
 


Index: package.mak
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/package.mak,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- package.mak	10 Nov 2005 19:28:45 -0000	1.1
+++ package.mak	16 Feb 2009 22:37:32 -0000	1.2
@@ -38,28 +38,23 @@
 # END COPYRIGHT BLOCK
 #
 # Packaging nmake Makefile for PassSync.msi
+CANDLE=$(WIXDIR)\candle
+LIGHT=$(WIXDIR)\light
 
 ALL : PassSync.msi
 
 LAYOUT :
 	copy /Y "$(OBJDEST)\passsync\passsync.exe" "$(PKGDIR)"
 	copy /Y "$(OBJDEST)\passhook\passhook.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\ldapsdk\lib\nsldap32v50.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\ldapsdk\lib\nsldapssl32v50.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\ldapsdk\lib\nsldappr32v50.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\nspr\lib\libnspr4.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\nspr\lib\libplds4.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\nspr\lib\libplc4.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\nss\lib\nss3.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\nss\lib\ssl3.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\nss\lib\softokn3.dll" "$(PKGDIR)"
-	copy /Y "$(LIBROOT)\nss\lib\smime3.dll" "$(PKGDIR)"
+	copy /Y "$(LIBROOT)\ldapsdk\lib\*.dll" "$(PKGDIR)"
+	copy /Y "$(LIBROOT)\nspr\lib\*.dll" "$(PKGDIR)"
+	copy /Y "$(LIBROOT)\nss\lib\*.dll" "$(PKGDIR)"
 	copy /Y "$(LIBROOT)\nss\bin\certutil.exe" "$(PKGDIR)"
 	copy /Y "$(LIBROOT)\nss\bin\pk12util.exe" "$(PKGDIR)"
 
 PassSync.msi : LAYOUT
-	mkdir "$(PKGDIR)\Binary"
+	if not exist "$(PKGDIR)\Binary" mkdir "$(PKGDIR)\Binary"
 	copy /Y wix\Binary "$(PKGDIR)\Binary"
 	cd "$(PKGDIR)"
-	candle "$(WXSDIR)\PassSync.wxs"
-	light PassSync.wixobj
+	"$(CANDLE)" "$(WXSDIR)\PassSync.wxs"
+	"$(LIGHT)" PassSync.wixobj




More information about the Fedora-directory-commits mailing list