[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

kevino at webkit.org kevino at webkit.org
Thu Oct 29 20:49:49 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 71c3191a7bd6019fa365768a6f7e2499ea492447
Author: kevino at webkit.org <kevino at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 21 23:39:09 2009 +0000

    Reviewed by Kevin Ollivier.
    
    Update the Windows installer builder to work with Vista / Win 7 and with git.
    
    https://bugs.webkit.org/show_bug.cgi?id=30649
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49927 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ba2aaa0..ac3591f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-21  Robin Dunn  <robin at alldunn.com>
+
+        Reviewed by Kevin Ollivier.
+
+        Update the Windows installer builder to work with Vista / Win 7 and with git.
+        
+        https://bugs.webkit.org/show_bug.cgi?id=30649
+
+        * wx/build/build_utils.py:
+        * wx/packaging/build-mac-installer.py:
+        * wx/packaging/build-win-installer.py:
+        * wx/packaging/wxWebKitInstaller.iss.in:
+
 2009-10-21  Alejandro G. Castro  <alex at igalia.com>
 
         Reviewed by Gustavo Noronha.
diff --git a/WebKitTools/wx/build/build_utils.py b/WebKitTools/wx/build/build_utils.py
index 85c20c6..b767d9f 100644
--- a/WebKitTools/wx/build/build_utils.py
+++ b/WebKitTools/wx/build/build_utils.py
@@ -174,3 +174,15 @@ def get_config(wk_root):
         config = open(config_file).read()
 
     return config
+
+def svn_revision():
+    if os.system("git info") == 0:
+        info = commands.getoutput("git-svn info ../..")
+    else:
+        info = commands.getoutput("svn info")
+    
+    for line in info.split("\n"):
+        if line.startswith("Revision: "):
+            return line.replace("Revision: ", "").strip()
+    
+    return ""
diff --git a/WebKitTools/wx/packaging/build-mac-installer.py b/WebKitTools/wx/packaging/build-mac-installer.py
index c007e8e..a0c1b22 100644
--- a/WebKitTools/wx/packaging/build-mac-installer.py
+++ b/WebKitTools/wx/packaging/build-mac-installer.py
@@ -48,17 +48,7 @@ wxwebkit_dir = os.path.abspath(os.path.join(wxwk_root, "WebKitBuild", get_config
 wx_version = wx.__version__[:5]
 py_version = sys.version[:3]
 
-wxwk_version = ""
-
-if os.system("git info") == 0:
-    info = commands.getoutput("git-svn info ../..")
-else:
-    info = commands.getoutput("svn info")
-    
-for line in info.split("\n"):
-    print line
-    if line.startswith("Revision: "):
-        wxwk_version = line.replace("Revision: ", "").strip()
+wxwk_version = svn_revision()
 
 platform = "osx"
     
diff --git a/WebKitTools/wx/packaging/build-win-installer.py b/WebKitTools/wx/packaging/build-win-installer.py
index beed705..2bb8034 100644
--- a/WebKitTools/wx/packaging/build-win-installer.py
+++ b/WebKitTools/wx/packaging/build-win-installer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 # Copyright (C) 2008 Kevin Ollivier  All rights reserved.
 #
@@ -30,6 +30,14 @@ import commands
 import glob
 from subprocess import *
 
+script_dir = os.path.abspath(os.path.dirname(__file__))
+sys.path.append(os.path.abspath(os.path.join(script_dir, "..", "build")))
+
+from build_utils import *
+
+wxwk_root = os.path.abspath(os.path.join(script_dir, "..", "..", ".."))
+wxwebkit_dir = os.path.abspath(os.path.join(wxwk_root, "WebKitBuild", get_config(wxwk_root) + git_branch_name()))
+
 # Find InnoSetup executable
 def getInnoSetupPath():
     name = "ISCC.exe"
@@ -37,6 +45,7 @@ def getInnoSetupPath():
     dirs = os.environ["PATH"].split(":")
     # Add the default file path
     dirs.append("C:\\Program Files\\Inno Setup 5")
+    dirs.append("C:\\Program Files (x86)\\Inno Setup 5")
                     
     if os.environ.has_key("INNO5"):
         retval = os.environ["INNO5"]
@@ -48,40 +57,19 @@ def getInnoSetupPath():
                 retval = filepath
             
     return retval
-    
-def getWebKitOutputDir():
-    retval = ""
-    if os.environ.has_key("WEBKITOUTPUTDIR"):
-        retval = os.environ["WEBKITOUTPUTDIR"]
-        
-    if retval == "":
-        retval = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "WebKitBuild"))
-        
-    return os.path.join(retval, "Release")
-
-def getRevisionString():
-    pipe = Popen("svnversion", shell=True, stdout=PIPE).stdout
-    svnrevision = pipe.read().strip()
-    print "r" + svnrevision
-    svnrevision = string.split(svnrevision, ":")[0]
-    svnrevision = svnrevision.replace("M", "")
-    svnrevision = "r" + svnrevision
-    
-    return svnrevision
 
 if __name__ == "__main__":
     innoSetup = getInnoSetupPath()
-    buildDir = getWebKitOutputDir()
     os.chdir(sys.path[0])
 
-    svnrevision = getRevisionString()
+    svnrevision = svn_revision()
 
     if not os.path.exists(innoSetup):
         print "ERROR: Cannot find InnoSetup."
         #sys.exit(1)
         
-    if not os.path.exists(buildDir):
-        print "ERROR: Build dir %s doesn't exist." % buildDir
+    if not os.path.exists(wxwebkit_dir):
+        print "ERROR: Build dir %s doesn't exist." % wxwebkit_dir
         sys.exit(1)
 
     fileList = """
@@ -89,7 +77,7 @@ CopyMode: alwaysoverwrite; Source: *.pyd;        DestDir: "{app}"
 CopyMode: alwaysoverwrite; Source: *.py;        DestDir: "{app}"
 """
     
-    dlls = glob.glob(os.path.join(buildDir, "*.dll"))
+    dlls = glob.glob(os.path.join(wxwebkit_dir, "*.dll"))
     for dll in dlls:
         if dll.find("wxbase") == -1 and dll.find("wxmsw") == -1:
             fileList += """CopyMode: alwaysoverwrite; Source: %s;        DestDir: "{app}" \n""" % dll
@@ -97,8 +85,8 @@ CopyMode: alwaysoverwrite; Source: *.py;        DestDir: "{app}"
     installerTemplate = open("wxWebKitInstaller.iss.in", "r").read()
 
     installerTemplate = installerTemplate.replace("<<VERSION>>", svnrevision)
-    installerTemplate = installerTemplate.replace("<<ROOTDIR>>", buildDir )
-    installerTemplate = installerTemplate.replace("<<PYTHONVER>>", "2.5" )
+    installerTemplate = installerTemplate.replace("<<ROOTDIR>>", wxwebkit_dir )
+    installerTemplate = installerTemplate.replace("<<PYTHONVER>>", sys.version[0:3] )
     installerTemplate = installerTemplate.replace("<<FILES>>", fileList )
 
     outputFile = open("wxWebKitInstaller.iss", "w")
diff --git a/WebKitTools/wx/packaging/wxWebKitInstaller.iss.in b/WebKitTools/wx/packaging/wxWebKitInstaller.iss.in
index a2c808c..ebc89d4 100644
--- a/WebKitTools/wx/packaging/wxWebKitInstaller.iss.in
+++ b/WebKitTools/wx/packaging/wxWebKitInstaller.iss.in
@@ -17,7 +17,7 @@ UninstallFilesDir={app}\Uninstall
 Compression=bzip/9
 SourceDir=<<ROOTDIR>>
 OutputDir=win-installer
-OutputBaseFilename=wxWebKit-Py<<PYTHONVER>>-<<VERSION>>
+OutputBaseFilename=wxWebKit-wx2.8-Py<<PYTHONVER>>-<<VERSION>>
 DisableStartupPrompt=yes
 AllowNoIcons=yes
 DisableProgramGroupPage=yes

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list