[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:42:10 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=7dd72b3

The following commit has been merged in the master branch:
commit 7dd72b33b5f623a2fb6d16dfd68a283c4b00c0f0
Author: Robin Mills <robin at clanmills.com>
Date:   Sun Jan 2 20:48:21 2011 +0000

    msvc64: added setbuild.py script to simplify building Win32 (or x64) only.
---
 msvc64/ReadMe.txt               |  30 +-
 msvc64/exiv2lib/exiv2lib.vcproj |  16 -
 msvc64/expat/expat.vcproj       | 322 -----------------
 msvc64/setbuild.py              | 187 ++++++++++
 msvc64/zlib/zlib.vcproj         | 720 -------------------------------------
 msvc64/zlib123/zlib.vcproj      | 768 ----------------------------------------
 msvc64/zlib125/zlib.vcproj      | 720 -------------------------------------
 7 files changed, 205 insertions(+), 2558 deletions(-)

diff --git a/msvc64/ReadMe.txt b/msvc64/ReadMe.txt
index 0f66299..aec6bb1 100644
--- a/msvc64/ReadMe.txt
+++ b/msvc64/ReadMe.txt
@@ -1,7 +1,7 @@
 exiv2\msvc64\ReadMe.txt
 -----------------------
 
-Updated: 2010-12-24 
+Updated: 2011-01-02 
 This is work in progress.
 However this is sufficiently robust to be in current use by a commercial licensee of exiv2.
 
@@ -10,12 +10,12 @@ However this is sufficiently robust to be in current use by a commercial license
      Builds with VS2005, 2008 and 2010.
      Supports zlib-1.2.5 or zlib-1.2.3
      Notes added about building with VS2010 Express
+     setbuild.py "doctors" the project files for DevStudio Express
 
 2)   TODO (in priority order)
      a) Provide a "runner.bat" build verification test script
      b) Build sample/test applications (exifprint etc)
      c) Use .vsprop files to hold "common" project settings
-     d) python script to "doctor" the project files for DevStudio Express
    
      Assistance appreciated if you wish to become involved.
 
@@ -32,7 +32,7 @@ T A B L E  o f  C O N T E N T S
 1.3  Open exiv2\msvc64\exiv2.sln
 1.4  What is build
 1.5  Building with zlib1.2.3
-1.6  Express editions of DevStudio
+1.6  Express editions of DevStudio (or 32 bit only builds, or 64 bit only builds)
 
 2    Design
 2.1  Architecture
@@ -51,7 +51,7 @@ T A B L E  o f  C O N T E N T S
      This has been tested with the "Pro" versions of VS 2005/08/10
      Express editions dont support 64 bit builds, however it is
      possible to build 32 bit libraries with "Express".
-     See notes below about DevStudio Express.
+     See notes below about DevStudio Express and building only Win32 or x64 builds
 
 1.2  Install zlib and expat sources.
      I use the directory c:\gnu for this purpose, however the name isn't important.
@@ -103,11 +103,20 @@ T A B L E  o f  C O N T E N T S
      c:\gnu>
      Please see exiv2\msvc\README-MSVC.txt for information about obtaining zlib-1.2.3
 
-1.6  Express editions of DevStudio
+1.6  Express editions of DevStudio (or 32 bit only builds, or 64 bit only builds)
      Express does not provide a 64bit compiler.
-     You can build 32 bit libraries with DevStudio Express (with a little effort) 
-     The project conversion wizard will fail on any mention of 64 bit configurations.
-     You can "doctor" to project files to remove this using a editor:
+     You can build 32 bit libraries with DevStudio Express (with a little effort)
+     
+     Before loading the project, use the python script setbuild.py to select Win32:
+     
+     	c:\gnu\exiv2\msvc64>setbuild Win32
+     	
+     setbuild.py is none destructive.  If you have a 64 bit compiler, you can:
+     1)	Restore the build environment with:   setbuild all
+     2) Select x64 bit builds only with:      setbuild.py x64
+     
+     If you don't have python available (it's a free download from ActiveState.com), 
+     you can "doctor" to project files manually to remove mentiosn of X64 using an editor:
      
      Cleanup your tree and edit the files.
      cd exiv2\msvc64
@@ -116,16 +125,13 @@ T A B L E  o f  C O N T E N T S
      for /r %f in (*.sln)    do notepad %f
      
      I personally don't recomment notepad for any purpose at all.
-     I use TextPad http://www.textpad.com/
+     I use TextPad http://www.textpad.com/  Notepad++ is also good.
      
      DevStudio Express 2010 (and presumably 2005 and 2008) do not have the "Batch Build" feature.
      Select "exiv2" right-click "Set as Startup Project" and
      Select Platform="Win32" Configuration="Debug|DebugDLL|Release|ReleaseDLL"  Build.
      Build the Configurations you need.  Build time is about 2 minutes/Configuration.
      
-     I don't want to create an msvc32 directory with seperate project files as this introduces
-     more maintenance work.  I might (no promises) write a python script to edit the project files.
-
 2    Design
 
      expat and zlib do not provide 64bit builds for DevStudio,
diff --git a/msvc64/exiv2lib/exiv2lib.vcproj b/msvc64/exiv2lib/exiv2lib.vcproj
index e0e4f65..c21063a 100644
--- a/msvc64/exiv2lib/exiv2lib.vcproj
+++ b/msvc64/exiv2lib/exiv2lib.vcproj
@@ -764,22 +764,6 @@
 			<File
 				RelativePath="..\..\src\pngchunk.cpp"
 				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						GeneratePreprocessedFile="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						GeneratePreprocessedFile="0"
-					/>
-				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\..\src\pngimage.cpp"
diff --git a/msvc64/expat/expat.vcproj b/msvc64/expat/expat.vcproj
index ea6c231..99bce45 100644
--- a/msvc64/expat/expat.vcproj
+++ b/msvc64/expat/expat.vcproj
@@ -689,344 +689,22 @@
 			<File
 				RelativePath="..\..\..\expat-2.0.1\lib\xmlparse.c"
 				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-						ExceptionHandling="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-						ExceptionHandling="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\..\..\expat-2.0.1\lib\xmlrole.c"
 				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\..\..\expat-2.0.1\lib\xmltok.c"
 				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\..\..\expat-2.0.1\lib\xmltok_impl.c"
 				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\..\..\expat-2.0.1\lib\xmltok_ns.c"
 				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DebugDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseDLL|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
 			</File>
 		</Filter>
 		<Filter
diff --git a/msvc64/setbuild.py b/msvc64/setbuild.py
new file mode 100644
index 0000000..c00af55
--- /dev/null
+++ b/msvc64/setbuild.py
@@ -0,0 +1,187 @@
+#!/usr/bin/env python
+# -*- coding: Latin-1 -*-
+
+##
+def syntax():
+    "syntax - print syntax of setbuild.py "
+    print "syntax: python setbuild.py Win32|x64|all"
+##
+
+r"""setbuild - set the build environment you require
+
+--------------------
+Revision information: 
+$Id: //depot/bin/setbuild.py#17 $ ##
+
+$Header: //depot/bin/setbuild.py#17 $ 
+$Date: 2008/07/15 $ 
+$DateTime: 2008/07/15 14:50:18 $ 
+$Change: 192 $ 
+$File: //depot/bin/setbuild.py $ 
+$Revision: #17 $ 
+$Author: rmills $
+--------------------
+"""
+
+__author__  = "Robin Mills <robin at clanmills.com>"
+__date__    = "$Date"
+__version__ = "$Id: //depot/bin/setbuild.py#17 $"
+__credits__ = """Everybody who contributed to Python.
+Especially: Guido van Rossum for creating the language.
+And: Mark Lutz (and David Ascher) for the O'Reilly Books which explain it.
+"""
+
+
+##
+# import modules
+import os.path
+import sys
+import xml.dom.minidom
+from   xml.sax.saxutils import escape
+
+##
+# from PP3E/System/Filetools/cpall.py
+maxfileload =   5 * 1024 * 1024
+blksize     = 100 * 1024
+
+##
+def cp(pathFrom, pathTo, maxfileload=maxfileload):
+    """
+    copy file pathFrom to pathTo, byte for byte
+    """
+    if os.path.getsize(pathFrom) <= maxfileload:
+        bytesFrom = open(pathFrom, 'rb').read()   # read small file all at once
+        open(pathTo, 'wb').write(bytesFrom)       # need b mode on Windows
+    else:
+        fileFrom = open(pathFrom, 'rb')           # read big files in chunks
+        fileTo   = open(pathTo,   'wb')           # need b mode here too 
+        while 1:
+            bytesFrom = fileFrom.read(blksize)    # get one block, less at end
+            if not bytesFrom: break               # empty after last chunk
+            fileTo.write(bytesFrom)
+##
+
+##
+def save(path):
+    """save - make a backup (or restore the backup)"""
+    orig = path+'.orig'
+    if os.path.exists(orig):
+        cp(orig,path)
+    else:
+        cp(path,orig)
+##
+
+##
+def sln(path,remove):
+    """sln - remove the x64 stuff from a sln"""
+
+    save(path)
+
+    if remove:
+    	f = open(path, 'r')
+    	lines = []
+    	for line in f:
+    	    if line.find(remove)<0:
+    	        lines.append(line)
+    	f.close()
+
+    	f = open(path,'w')
+    	for line in lines:
+    	    f.write(line)
+    	f.close()
+##
+
+##
+def vcproj(path,remove):
+    """vcproj - remove the x64 stuff from a vcproj"""
+    
+    save(path)
+    
+    if remove:
+		f = open(path,'r')
+		dom = xml.dom.minidom.parseString(f.read())
+		f.close()
+
+		for tag in [ 'Platform','Configuration' ]:
+			tags = dom.getElementsByTagName(tag)
+			kills = []
+			for t in tags:
+				if t.getAttribute("Name").find(remove)>=0:
+					kills.append(t)
+
+			for kill in kills:
+				kill.parentNode.removeChild(kill)
+
+		# repair the command lines!
+		for tool in dom.getElementsByTagName('Tool'):
+			cl=tool.getAttribute('CommandLine')
+			if cl:
+				cl=escape(cl)
+				cl=cl.replace('
','__CR__')
+				cl=cl.replace('
','__LF__')
+				tool.setAttribute('CommandLine',cl)
+				# print '-----------',cl,'----------'
+
+		code=dom.toxml()
+		code=code.replace('__CR__','&#x0d;')
+		code=code.replace('__LF__','&#x0a;')
+		f = open(path,'w')
+		f.write(code)
+		f.close()
+##
+
+##
+def visit(myData, directoryName, filesInDirectory):          # called for each dir 
+    """visit - called by os.path.walk"""
+	# print "in visitor",directoryName, "myData = ",myData
+	# print "filesInDirectory => ",filesInDirectory
+    for filename in filesInDirectory:                        # do non-dir files here
+        pathname = os.path.join(directoryName, filename)
+        if not os.path.isdir(pathname):
+            global paths
+            paths.append(pathname)
+##
+
+##
+def setbuild(remove):
+    """setbuild - remove == None, means both x64 and Win32"""
+    if remove in set(['x64','Win32',None]):
+        directory = os.path.abspath(os.path.dirname(sys.argv[0]))
+        print "directory = ",directory
+        global paths
+
+        paths=[]
+        os.path.walk(directory, visit, None)
+        for path in paths:
+            # print path
+            handlers =  { '.sln'    : sln
+                        , '.vcproj' : vcproj
+                        } ;
+            ext=os.path.splitext(path)[1]
+            if handlers.has_key(ext):
+                handlers[ext](path,remove)
+    else:
+        syntax()
+##
+
+##
+if __name__ == '__main__':
+    
+    argc     = len(sys.argv)
+    syntaxError = argc < 2
+    
+    if not syntaxError:
+        option=sys.argv[1].lower()
+        removes  = 	{ 'x64' 	: 'Win32' 
+        			, 'win32' 	: 'x64'
+        			, 'all' 	: None
+        			}
+        syntaxError = not removes.has_key(option)
+        if not syntaxError:
+            setbuild(removes[option])
+
+    if syntaxError:
+        syntax()
+
+# That's all Folks!
+##
diff --git a/msvc64/zlib/zlib.vcproj b/msvc64/zlib/zlib.vcproj
index bff2505..feeac49 100644
--- a/msvc64/zlib/zlib.vcproj
+++ b/msvc64/zlib/zlib.vcproj
@@ -655,274 +655,18 @@
 			<File
 				RelativePath="..\..\..\zlib-1.2.5dler32.c"
 				>
-				<FileConfiguration
-					Name="DLL Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="LIB Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DLL Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="LIB Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DLL Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="LIB Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="DLL Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="LIB Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\..\..\zlib-1.2.5
-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list