commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r10074 - trunk/gnue-navigator/packaging/win32


From: reinhard
Subject: [gnue] r10074 - trunk/gnue-navigator/packaging/win32
Date: Sat, 5 Dec 2009 09:54:58 -0600 (CST)

Author: reinhard
Date: 2009-12-05 09:54:58 -0600 (Sat, 05 Dec 2009)
New Revision: 10074

Added:
   trunk/gnue-navigator/packaging/win32/gnue-32x32.ico
   trunk/gnue-navigator/packaging/win32/gnue-navigator.iss.dist_template
   trunk/gnue-navigator/packaging/win32/setup.cmd
   trunk/gnue-navigator/packaging/win32/setup.py
Removed:
   trunk/gnue-navigator/packaging/win32/gnue-navigator.iss
Log:
Updated win32 packaging.


Added: trunk/gnue-navigator/packaging/win32/gnue-32x32.ico
===================================================================
(Binary files differ)


Property changes on: trunk/gnue-navigator/packaging/win32/gnue-32x32.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: trunk/gnue-navigator/packaging/win32/gnue-navigator.iss
===================================================================
--- trunk/gnue-navigator/packaging/win32/gnue-navigator.iss     2009-12-05 
15:33:44 UTC (rev 10073)
+++ trunk/gnue-navigator/packaging/win32/gnue-navigator.iss     2009-12-05 
15:54:58 UTC (rev 10074)
@@ -1,89 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-
-[Setup]
-AppId=GNUe-Navigator
-AppName=<application name>
-AppVerName=<application name and version>
-AppPublisher=GNU Enterprise
-AppPublisherURL=http://www.gnuenterprise.org
-AppSupportURL=http://www.gnuenterprise.org
-AppUpdatesURL=http://www.gnuenterprise.org
-DefaultDirName={pf}\GNUe\
-DefaultGroupName=GNUe
-AllowNoIcons=true
-LicenseFile=c:\gnue\LICENSE.txt
-ChangesAssociations=true
-CreateAppDir=true
-ShowLanguageDialog=yes
-OutputBaseFilename=<filename of the setup file>
-DisableDirPage=true
-
-[Tasks]
-Name: desktopicon; Description: Create a &desktop icon; GroupDescription: 
Additional icons:; MinVersion: 4,4
-
-[Components]
-Name: main; Description: Shared Program Files; Types: full compact custom; 
Flags: fixed
-Name: doc; Description: Documentation; Types: full
-Name: translations; Description: Translations; Types: full
-
-[Files]
-Source: c:\gnue\bin\gnue-navigator.exe; DestDir: {app}\bin; Components: main; 
Flags: ignoreversion
-Source: c:\gnue\bin\gnue\navigator\*.*; DestDir: {app}\bin\gnue\navigator; 
Flags: recursesubdirs ignoreversion; Components: main
-Source: c:\gnue\share\locale\de\LC_MESSAGES\gnue-navigator.mo; DestDir: 
{app}\share\locale\de\LC_MESSAGES\; Flags: recursesubdirs; Components: 
translations
-Source: c:\gnue\share\locale\es_MX\LC_MESSAGES\gnue-navigator.mo; DestDir: 
{app}\share\locale\es_MX\LC_MESSAGES\; Flags: recursesubdirs; Components: 
translations
-;Source: c:\gnue\share\locale\es_ES\LC_MESSAGES\gnue-navigator.mo; DestDir: 
{app}\share\locale\es_ES\LC_MESSAGES\; Flags: recursesubdirs; Components: 
translations
-;Source: c:\gnue\share\locale\fr\LC_MESSAGES\gnue-navigator.mo; DestDir: 
{app}\share\locale\fr\LC_MESSAGES\; Flags: recursesubdirs; Components: 
translations
-Source: c:\gnue\share\locale\hu\LC_MESSAGES\gnue-navigator.mo; DestDir: 
{app}\share\locale\hu\LC_MESSAGES\; Flags: recursesubdirs; Components: 
translations
-Source: c:\gnue\share\locale\lt\LC_MESSAGES\gnue-navigator.mo; DestDir: 
{app}\share\locale\lt\LC_MESSAGES\; Flags: recursesubdirs; Components: 
translations
-;Source: c:\gnue\share\locale\ro\LC_MESSAGES\gnue-navigator.mo; DestDir: 
{app}\share\locale\ro\LC_MESSAGES\; Flags: recursesubdirs; Components: 
translations
-Source: c:\gnue\share\locale\ru\LC_MESSAGES\gnue-navigator.mo; DestDir: 
{app}\share\locale\ru\LC_MESSAGES\; Flags: recursesubdirs; Components: 
translations
-Source: c:\gnue\share\doc\gnue-navigator\*.*; DestDir: 
{app}\share\doc\gnue-navigator; Flags: recursesubdirs; Components: doc
-
-[Icons]
-Name: {group}\GNUe Navigator Client; Filename: 
{app}\share\doc\gnue-navigator\examples\sample.gpd
-Name: {userdesktop}\GNUe Navigator Client; Filename: 
{app}\share\doc\gnue-navigator\examples\sample.gpd; WorkingDir: {app}; 
MinVersion: 4,4; Tasks: desktopicon
-
-[Registry]
-; These four associations associate GPD files with GNUe Navigator
-Root: HKCR; Subkey: .gpd; ValueType: string; ValueName: ; ValueData: 
GNUeNavigatorClient; Flags: uninsdeletekey deletekey
-Root: HKCR; Subkey: GNUeNavigatorClient; ValueType: string; ValueName: ; 
ValueData: GNUe Navigator Definition; Flags: uninsdeletekey deletekey
-;when we get a nifty icon, that's set here :)
-Root: HKCR; Subkey: GNUeNavigatorClient\DefaultIcon; ValueType: string; 
ValueName: ; ValueData: {app}\bin\GNUE-NAVIGATOR.EXE,0
-Root: HKCR; Subkey: GNUeNavigatorClient\shell\open\command; ValueType: string; 
ValueName: ; ValueData: """{app}\bin\GNUE-NAVIGATOR.EXE"" ""%1"""; Flags: 
deletekey
-
-[UninstallDelete]
-Name: {app}\bin\gnue\navigator\*.*; Type: filesandordirs
-
-[Code]
-function GetPathInstalled(AppID: String): String;
-var
-   sPrevPath: String;
-begin
-  sPrevPath := '';
-  if not RegQueryStringValue( HKLM,
-    'Software\Microsoft\Windows\CurrentVersion\Uninstall\'+AppID+'_is1',
-    'Inno Setup: App Path', sPrevpath) then
-    RegQueryStringValue( HKCU, 
'Software\Microsoft\Windows\CurrentVersion\Uninstall\'+AppID+'_is1' ,
-      'Inno Setup: App Path', sPrevpath);
-
-  Result := sPrevPath;
-end;
-
-
-function InitializeSetup(): Boolean;
-var
-       sPrevPath: String;
-       sPrevID: String;
-begin
-  sPrevID := 'GNUe-Tools';
-  sPrevPath := GetPathInstalled( sprevID );
-
-  if ( Length(sPrevPath) > 0 ) then
-    Result := true
-  else
-    begin
-      MsgBox( 'GNUe-Runtime-Environment is not installed!', mbInformation, 
MB_OK );
-      Result := false;
-    end;
-end;

Added: trunk/gnue-navigator/packaging/win32/gnue-navigator.iss.dist_template
===================================================================
--- trunk/gnue-navigator/packaging/win32/gnue-navigator.iss.dist_template       
                        (rev 0)
+++ trunk/gnue-navigator/packaging/win32/gnue-navigator.iss.dist_template       
2009-12-05 15:54:58 UTC (rev 10074)
@@ -0,0 +1,84 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+[Setup]
+AppId=GNUe-Navigator
+AppName=:TITLE:
+AppVerName=:TITLE: :VERSION:
+AppPublisher=GNU Enterprise
+AppPublisherURL=http://www.gnuenterprise.org
+AppSupportURL=http://www.gnuenterprise.org
+AppUpdatesURL=http://www.gnuenterprise.org
+DefaultDirName={pf}\GNUe\
+DefaultGroupName=GNUe
+AllowNoIcons=true
+LicenseFile=
+ChangesAssociations=true
+CreateAppDir=true
+ShowLanguageDialog=yes
+OutputDir=C:\GNUe\dist
+OutputBaseFilename=:PACKAGE:-:VERSION:
+DisableDirPage=true
+AppendDefaultDirName=false
+
+[Components]
+Name: main; Description: Shared Program Files; Types: full compact custom; 
Flags: fixed
+Name: doc; Description: Documentation; Types: full
+Name: translations; Description: Translations; Types: full
+
+[Files]
+Source: C:\GNUe\Bin\gnue-navigator.exe; DestDir: {app}\Bin; Components: main; 
Flags: ignoreversion
+Source: C:\GNUe\Bin\gnue\navigator\*.*; DestDir: {app}\Bin\gnue\forms; Flags: 
recursesubdirs ignoreversion; Components: main
+Source: C:\GNUe\share\locale\gnue-navigator.mo; DestDir: {app}\share\locale\; 
Flags: recursesubdirs createallsubdirs; Components: translations
+Source: C:\GNUe\share\doc\gnue-navigator\*.*; DestDir: 
{app}\share\doc\gnue-forms; Flags: recursesubdirs; Components: doc
+
+[Registry]
+; These four associations associate GPD files with GNUe Navigator
+Root: HKCR; Subkey: .gpd; ValueType: string; ValueName: ; ValueData: 
GNUeNavigatorClient; Flags: uninsdeletekey deletekey
+Root: HKCR; Subkey: GNUeNavigatorClient; ValueType: string; ValueName: ; 
ValueData: GNUe Navigator Definition; Flags: uninsdeletekey deletekey
+;when we get a nifty icon, that's set here :)
+Root: HKCR; Subkey: GNUeNavigatorClient\DefaultIcon; ValueType: string; 
ValueName: ; ValueData: {app}\bin\GNUE-NAVIGATOR.EXE,0
+Root: HKCR; Subkey: GNUeNavigatorClient\shell\open\command; ValueType: string; 
ValueName: ; ValueData: """{app}\bin\GNUE-NAVIGATOR.EXE"" ""%1"""; Flags: 
deletekey
+
+[UninstallDelete]
+Name: {app}\Bin\gnue\navigator\*.*; Type: filesandordirs
+
+[Code]
+function GetPathInstalled(AppID: String): String;
+var
+   sPrevPath: String;
+begin
+  sPrevPath := '';
+  if not RegQueryStringValue( HKLM,
+    'Software\Microsoft\Windows\CurrentVersion\Uninstall\'+AppID+'_is1',
+    'Inno Setup: App Path', sPrevpath) then
+    RegQueryStringValue( HKCU, 
'Software\Microsoft\Windows\CurrentVersion\Uninstall\'+AppID+'_is1' ,
+      'Inno Setup: App Path', sPrevpath);
+
+  Result := sPrevPath;
+end;
+
+
+function InitializeSetup(): Boolean;
+var
+       sPrevPath: String;
+       sPrevID: String;
+begin
+  sPrevID := 'GNUe-Tools';
+  sPrevPath := GetPathInstalled( sprevID );
+
+  if ( Length(sPrevPath) > 0 ) then
+    Result := true
+  else
+    begin
+      MsgBox( 'GNUe-Runtime-Environment is not installed!', mbInformation, 
MB_OK );
+      Result := false;
+    end;
+
+  if (Length(GetPathInstalled('GNUe-Common')) > 0) then
+      Result := true
+  else begin
+      MsgBox('GNUe-Common is not installed!  Please install the GNUe-Common 
package in order to setup GNUe-Forms.', mbInformation, MB_OK);
+      Result := false;
+  end;
+end;

Added: trunk/gnue-navigator/packaging/win32/setup.cmd
===================================================================
--- trunk/gnue-navigator/packaging/win32/setup.cmd                              
(rev 0)
+++ trunk/gnue-navigator/packaging/win32/setup.cmd      2009-12-05 15:54:58 UTC 
(rev 10074)
@@ -0,0 +1,58 @@
address@hidden OFF
+REM ---------------------------------------------------------------------------
+REM Create an Installer Package for GNUe Navigator
+REM 
+REM $Id$
+REM ---------------------------------------------------------------------------
+
+REM ---------------------------------------------------------------------------
+REM Prepare the build environment
+REM ---------------------------------------------------------------------------
+
address@hidden Setting up the build environment ...
+SET GNUE_PATH="C:\GNUe"
+
+IF EXIST %GNUE_PATH% (
+   RMDIR /S /Q %GNUE_PATH%
+)
+MKDIR %GNUE_PATH%
+MKDIR %GNUE_PATH%\Scripts
+
+COPY setup.py %GNUE_PATH%\Scripts
+COPY gnue-32x32.ico %GNUE_PATH%\Scripts
+COPY gnue-navigator.iss %GNUE_PATH%\Scripts
+
+REM ---------------------------------------------------------------------------
+REM Install the package into the build environment
+REM ---------------------------------------------------------------------------
+
+CD ..\..
address@hidden Installing the package into local build environment ...
+
+REM Note: We do *not* compile the py files here, because this would add a wrong
+REM path to the pyc-files, which in turn breaks translations later.
+
+C:\PYTHON25\PYTHON setup.py install --install-scripts=%GNUE_PATH%\Scripts 
--install-lib=%GNUE_PATH%\Bin --install-data=%GNUE_PATH% 
--install-config=%GNUE_PATH%\Config --no-compile
+
+
+REM ---------------------------------------------------------------------------
+REM Compile everything into an exe
+REM ---------------------------------------------------------------------------
+
+CD packaging\win32
+
address@hidden Building EXE-File ...
+PUSHD %GNUE_PATH%\Scripts
+
+C:\PYTHON25\PYTHON setup.py py2exe -c -d %GNUE_PATH%\Bin
+
+POPD
+
+REM Catch the built EXE and clean up the build environment
+IF EXIST %GNUE_PATH%\dist\*.exe (
+    COPY %GNUE_PATH%\dist\*.exe .
+    RMDIR /S /Q %GNUE_PATH%
+    @ECHO Package completed
+)
+
+:EXIT


Property changes on: trunk/gnue-navigator/packaging/win32/setup.cmd
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/gnue-navigator/packaging/win32/setup.py
===================================================================
--- trunk/gnue-navigator/packaging/win32/setup.py                               
(rev 0)
+++ trunk/gnue-navigator/packaging/win32/setup.py       2009-12-05 15:54:58 UTC 
(rev 10074)
@@ -0,0 +1,156 @@
+# GNU Enterprise Common - Setup Script for py2exe
+#
+# Copyright 2001-2009 Free Software Foundation
+#
+# This file is part of GNU Enterprise
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 3, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# $Id$
+
+import os
+import sys
+import py2exe
+import win32api
+import win32con
+
+from distutils.core import setup
+
+# -----------------------------------------------------------------------------
+# Constants used by this setup
+# -----------------------------------------------------------------------------
+
+# The path where we are creating the build environment for the setup compiler
+GNUE_PATH='C:\\GNUE'            
+# The InnoSetup configuration file
+ISS_FILE = 'gnue-navigator.iss'
+
+# The manifest will be inserted as resource into .exe files.  This
+# gives the controls the Windows XP appearance (if run on XP).
+manifest = '''
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+    version="5.0.0.0"
+    processorArchitecture="x86"
+    name="Controls"
+    type="win32"
+/>
+<description>GNU Enterprise</description>
+<dependency>
+    <dependentAssembly>
+        <assemblyIdentity
+            type="win32"
+            name="Microsoft.Windows.Common-Controls"
+            version="6.0.0.0"
+            processorArchitecture="X86"
+            publicKeyToken="6595b64144ccf1df"
+            language="*"
+        />
+    </dependentAssembly>
+</dependency>
+</assembly>
+'''
+
+RT_MANIFEST = 24
+
+
+# -----------------------------------------------------------------------------
+# Create a list of all modules in the standard library
+# -----------------------------------------------------------------------------
+
+def getimports(libdir):
+    """
+    Returns a list of all modules in the standard python library.
+    """
+    importlist = []
+    for entry in os.listdir(libdir):
+        if entry.startswith('_') or '-' in entry or \
+           entry.count('.')>1 or ' ' in entry:
+            continue
+    
+        if not os.path.splitext(entry)[1] == '.py':
+            continue
+
+        importlist.append(entry[:entry.find('.')])
+
+    return importlist
+
+
+# -----------------------------------------------------------------------------
+# Run the setup to create all the exe files in the gnue-common package
+# -----------------------------------------------------------------------------
+def create_exe_files():
+    """
+    Create gnue-schema.exe (which is currently the only exe supplied by
+    gnue-common.
+    """
+
+    setup( \
+        windows = [{"script": "gnue-navigator",
+                    "icon_resources": [(1, "gnue-32x32.ico")],
+                    "other_resources": [(RT_MANIFEST, 1, manifest)]}],
+        options = {"py2exe":
+            {"dll_excludes": ["msvcp60.dll",
+                              "tcl84.dll",
+                              "tk84.dll",
+                              "oci.dll"],
+             "excludes": ["gnue.navigator", "wx", "mx", "PIL"]
+            }
+        }
+    )
+
+
+# -----------------------------------------------------------------------------
+# Examine the registry to find out where the InnoSetup compiler is located
+# -----------------------------------------------------------------------------
+
+def get_istool():
+    root = win32con.HKEY_CLASSES_ROOT
+    item = "InnoSetupScriptFile\\shell\\OpenWithISTool"
+    try:
+        path = None
+        key = win32api.RegOpenKeyEx(root, item, 0, win32con.KEY_READ)
+        value = win32api.RegQueryValue(key, "command")
+        if isinstance(value, basestring):
+            path = value.split(' ', 1)[0]
+    except:
+        pass
+
+    return path
+
+# -----------------------------------------------------------------------------
+# Compile the setup
+# -----------------------------------------------------------------------------
+
+def compile_setup():
+    
+    istool = get_istool()
+    if not istool:
+        print "Cannot find ISTool.exe"
+        sys.exit(1)
+
+    cmd = '%s -compile %s' % (istool, ISS_FILE)
+    os.system(cmd)
+
+
+# =============================================================================
+# Main program
+# =============================================================================
+
+create_exe_files()
+
+compile_setup()


Property changes on: trunk/gnue-navigator/packaging/win32/setup.py
___________________________________________________________________
Name: svn:keywords
   + Id





reply via email to

[Prev in Thread] Current Thread [Next in Thread]