about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@iosphe.re>2015-02-17 18:08:23 +0100
committerPaweł Jastrzębski <pawelj@iosphe.re>2015-02-17 18:08:23 +0100
commit68521f7c639d8f7675df4718c90bf5c932e82e3a (patch)
tree6f0b5dc1ced1902810c6dc51f20a3502aa6f03e3
parentGeneral refactoring and tweaks (diff)
downloadkcc-68521f7c639d8f7675df4718c90bf5c932e82e3a.tar.gz
kcc-68521f7c639d8f7675df4718c90bf5c932e82e3a.tar.bz2
kcc-68521f7c639d8f7675df4718c90bf5c932e82e3a.zip
Updated installer
-rw-r--r--kcc.iss23
-rwxr-xr-xsetup.py14
2 files changed, 26 insertions, 11 deletions
diff --git a/kcc.iss b/kcc.iss
index b767339..695af5d 100644
--- a/kcc.iss
+++ b/kcc.iss
@@ -20,6 +20,7 @@ LicenseFile=LICENSE.txt
 OutputBaseFilename=KindleComicConverter_win_{#MyAppVersion}
 SetupIconFile=icons\comic2ebook.ico
 SolidCompression=yes
+ArchitecturesInstallIn64BitMode=x64
 ShowLanguageDialog=no
 LanguageDetectionMethod=none
 WizardImageFile=icons\Wizard.bmp
@@ -41,14 +42,21 @@ Name: "CBRassociation"; Description: "CBR"; GroupDescription: "File associations
 Name: "CB7association"; Description: "CB7"; GroupDescription: "File associations:"
 
 [Files]
-Source: "dist\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion;
-Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion;
-Source: "dist\*.dll"; DestDir: "{app}"; Flags: ignoreversion;
-Source: "LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
+; x64 files
+Source: "dist_64\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Check: Is64BitInstallMode
+Source: "dist_64\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
+Source: "dist_64\*.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
+Source: "other\vcredist_x64.exe"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall; Check: Is64BitInstallMode
+; x86 files
+Source: "dist\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Check: not Is64BitInstallMode
+Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
+Source: "dist\*.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
+Source: "other\vcredist_x86.exe"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall; Check: not Is64BitInstallMode
+; Common files
+Source: "LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion solidbreak
 Source: "other\Additional-LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
 Source: "other\UnRAR.exe"; DestDir: "{app}"; Flags: ignoreversion
 Source: "other\7za.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "other\vcredist_x86.exe"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall;
 
 [Icons]
 Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
@@ -57,7 +65,8 @@ Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:
 
 [Run]
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall
-Filename: "{tmp}\vcredist_x86.exe"; Parameters: "/passive /Q:a /c:""msiexec /qb /i vcredist.msi"" "; StatusMsg: "Installing Microsoft Visual C++ 2010 Redistributable Package...";
+Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/passive /Q:a /c:""msiexec /qb /i vcredist.msi"" "; StatusMsg: "Installing Microsoft Visual C++ 2010 Redistributable Package..."; Check: Is64BitInstallMode
+Filename: "{tmp}\vcredist_x86.exe"; Parameters: "/passive /Q:a /c:""msiexec /qb /i vcredist.msi"" "; StatusMsg: "Installing Microsoft Visual C++ 2010 Redistributable Package..."; Check: not Is64BitInstallMode
 
 [Messages]
 WelcomeLabel1=Welcome to the KCC Setup Wizard
@@ -121,4 +130,4 @@ begin
       UnInstallOldVersion();
     end;
   end;
-end;
+end;
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 35afa85..f650402 100755
--- a/setup.py
+++ b/setup.py
@@ -55,17 +55,23 @@ if platform == "darwin":
 elif platform == "win32":
     # noinspection PyUnresolvedReferences
     import py2exe
+    import platform
     from distutils.core import setup
-    additional_files = [('platforms', ['C:\Python34\Lib\site-packages\PyQt5\plugins\platforms\qwindows.dll']),
+    if platform.architecture()[0] == '64bit':
+        suffix = '_64'
+    else:
+        suffix = ''
+    additional_files = [('platforms', ['C:\Python34' + suffix +
+                                       '\Lib\site-packages\PyQt5\plugins\platforms\qwindows.dll']),
                         ('', ['LICENSE.txt',
                               'other\\7za.exe',
                               'other\\UnRAR.exe',
                               'other\\Additional-LICENSE.txt',
-                              'C:\Python34\Lib\site-packages\PyQt5\libGLESv2.dll',
-                              'C:\Python34\Lib\site-packages\PyQt5\libEGL.dll'])]
+                              'C:\Python34' + suffix + '\Lib\site-packages\PyQt5\libGLESv2.dll',
+                              'C:\Python34' + suffix + '\Lib\site-packages\PyQt5\libEGL.dll'])]
     extra_options = dict(
         options={'py2exe': {"bundle_files": 1,
-                            "dist_dir": "dist",
+                            "dist_dir": "dist" + suffix,
                             "compressed": True,
                             "includes": ["sip"],
                             "excludes": ["tkinter"],