mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 15:27:14 +03:00
Fixes for Sparkle & WinSparkle updating
This commit is contained in:
parent
0ef0f017f1
commit
6e8f667daa
@ -7,20 +7,21 @@
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<!-- https://docs.microsoft.com/en-us/windows/win32/sysinfo/targeting-your-application-at-windows-8-1 -->
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> <!-- Windows 10 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!-- Windows 8.1 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!-- Windows 8 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- Windows 7 -->
|
||||
</application>
|
||||
</compatibility>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type='win32'
|
||||
name='Microsoft.VC90.CRT'
|
||||
version='9.0.21022.8'
|
||||
processorArchitecture='*'
|
||||
publicKeyToken='1fc8b3b9a1e18e3b' />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
|
@ -167,8 +167,8 @@
|
||||
<Component Guid="{A18814B6-B491-42AB-A433-2AD66A823AD7}">
|
||||
<File KeyPath="yes" Source="SourceDir\library.zip" />
|
||||
</Component>
|
||||
<Component Id="libssl_1_1.dll" Guid="*">
|
||||
<File Id="libssl_1_1.dll" KeyPath="yes" Source="SourceDir\libssl-1_1.dll" />
|
||||
<Component Guid="*">
|
||||
<File KeyPath="yes" Source="SourceDir\libssl-1_1.dll" />
|
||||
</Component>
|
||||
<Component Guid="*">
|
||||
<File KeyPath="yes" Source="SourceDir\modules.p" />
|
||||
|
@ -326,7 +326,7 @@ Mac:
|
||||
|
||||
Windows:
|
||||
|
||||
* requires py2exe 0.9.3.2
|
||||
* requires py2exe 0.9.3.2 (currently unreleased - build from [source](https://github.com/albertosottile/py2exe))
|
||||
* winsparkle.dll & .pdb from [WinSparkle](https://github.com/vslavik/winsparkle) copied to the current directory
|
||||
* [WiX Toolset](http://wixtoolset.org/)
|
||||
* Run `setup.py py2exe`
|
||||
|
10
setup.py
10
setup.py
@ -66,7 +66,15 @@ if sys.platform=='darwin':
|
||||
OPTIONS = { 'py2app':
|
||||
{'dist_dir': dist_dir,
|
||||
'optimize': 2,
|
||||
'packages': [ 'requests', 'keyring.backends' ],
|
||||
'packages': [
|
||||
'requests',
|
||||
'keyring.backends',
|
||||
'sqlite3', # Included for plugins
|
||||
],
|
||||
'includes': [
|
||||
'shutil', # Included for plugins
|
||||
'zipfile', # Included for plugins
|
||||
],
|
||||
'frameworks': [ 'Sparkle.framework' ],
|
||||
'excludes': [ 'distutils', '_markerlib', 'PIL', 'pkg_resources', 'simplejson', 'unittest' ],
|
||||
'iconfile': '%s.icns' % APPNAME,
|
||||
|
@ -3,6 +3,7 @@ from os.path import dirname, join
|
||||
import sys
|
||||
from time import time
|
||||
import threading
|
||||
from traceback import print_exc
|
||||
|
||||
# ensure registry is set up on Windows before we start
|
||||
from config import appname, appversion, update_feed, update_interval, config
|
||||
@ -50,10 +51,11 @@ elif sys.platform=='darwin':
|
||||
|
||||
def __init__(self, master):
|
||||
try:
|
||||
objc.loadBundle('Sparkle', globals(), join(dirname(sys.executable.decode(sys.getfilesystemencoding())), os.pardir, 'Frameworks', 'Sparkle.framework'))
|
||||
objc.loadBundle('Sparkle', globals(), join(dirname(sys.executable), os.pardir, 'Frameworks', 'Sparkle.framework'))
|
||||
self.updater = SUUpdater.sharedUpdater()
|
||||
except:
|
||||
# can't load framework - not frozen or not included in app bundle?
|
||||
print_exc()
|
||||
self.updater = None
|
||||
|
||||
def checkForUpdates(self):
|
||||
@ -82,7 +84,7 @@ elif sys.platform=='win32':
|
||||
try:
|
||||
sys.frozen # don't want to try updating python.exe
|
||||
self.updater = ctypes.cdll.WinSparkle
|
||||
self.updater.win_sparkle_set_appcast_url(update_feed) # py2exe won't let us embed this in resources
|
||||
self.updater.win_sparkle_set_appcast_url(update_feed.encode()) # py2exe won't let us embed this in resources
|
||||
|
||||
# set up shutdown callback
|
||||
global root
|
||||
@ -90,11 +92,9 @@ elif sys.platform=='win32':
|
||||
self.callback_t = ctypes.CFUNCTYPE(None) # keep reference
|
||||
self.callback_fn = self.callback_t(shutdown_request)
|
||||
self.updater.win_sparkle_set_shutdown_request_callback(self.callback_fn)
|
||||
|
||||
self.updater.win_sparkle_init()
|
||||
|
||||
except:
|
||||
from traceback import print_exc
|
||||
print_exc()
|
||||
self.updater = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user