1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 23:37:14 +03:00

26 Commits

Author SHA1 Message Date
Athanasius
3c47b6c782 Fix semantic_version appversion issues in update.py and setup.py 2021-04-01 14:46:43 +01:00
Athanasius
5de4950fba Change config.appversion() to return semantic_version.Version
As we're changing it to a function at this stage anyway, it might as
well return this type, not a str.
2021-04-01 14:46:43 +01:00
Athanasius
2f9789afdd Update all code to use config.appversion() as a function
This *also* caught some instances where appversion_nobuild should
already have been used, so those were both changed and updated to a
function call.
2021-04-01 14:45:52 +01:00
Athanasius
501f34836a update.py: Need to from config import config to access shutting_down 2021-01-11 17:48:47 +00:00
Athanasius
462cd25312 config: Make config.shutting_down() a property, and change 'callers' 2021-01-11 16:54:09 +00:00
Athanasius
fb1c9fc034 update: Avoid Tk event_generate() calls during shutdown. 2021-01-11 16:44:11 +00:00
Athanasius
bd81f05514 Utilise 'return None' to reduce check_appcast() indentation 2020-07-19 12:06:59 +01:00
Athanasius
739dfec114 Only import tkinter if we're type checking. 2020-07-19 12:05:37 +01:00
Athanasius
35f573bc14 Updater class now used for all updates checking
* Updater.__init__() now takes 'provider' argument to specify if we use
 the internal checking code, or the available external code.
* EDMC.py changed to utilise this with internal provider.
* EDMarketConnector.py changed to use internal provider if not frozen,
 else the internal provider.
* Corrected the darwin/MacOS toggling of auto updates checking to actually
 use the Sparkle, not WinSparkle, API call.
* Updater.check_appcast() does the internal checking:
    * class EDMCVersion to hold the information.
    * Returns None on any error, or if it didn't find a newer version.
    * Returns an EDMCVersion object if it found a newer version.
2020-07-19 11:45:07 +01:00
Athanasius
76a6eec69d Updater.check_appcast() added to 'run from source' version
Tested as working with EDMarketConnector.py.
2020-07-19 11:45:07 +01:00
Athanasius
af1c313dc3 update.py: Note to redo 'manual' version check 2020-07-19 11:45:07 +01:00
Athanasius
ef3f14daaa Define appversion_nobuild in config.py for use elsewhere
Already need this in update.py, but will also adjust the 'Release Notes'
URL to use this, not full version.
2020-07-19 11:45:06 +01:00
Athanasius
560ac5f81a Semantic Version support: py2exe & WinSparkle
* py2exe only supports Major.Minor.Patch(.Revision), so pass only
Major.Minor.Patch to it.  'File version' of generated EXEs will have
a `.0` appended as .Revision.

* Set 'product_version' in py2exe with the full version string.  This
ends up in the EXE 'Product version' property.

* WinSparkle accidentally suppoorts semver -prerelease correctly, but
not +buildmetadata.  So trim the latter off and set that as the version
for checks.
2020-07-19 11:45:06 +01:00
Athanasius
259bb3bbd6 Merge branch 'release-final-python27' into python3 2020-06-21 16:43:02 +01:00
Jonathan Harris
6e8f667daa Fixes for Sparkle & WinSparkle updating 2020-06-21 16:32:08 +01:00
Athanasius
71e5f10457 Minor cleanup. 2020-06-21 16:23:01 +01:00
Athanasius
78073790df update.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
90b05d22c5 Now runs without console errors so far as pressing 'Update' is concerned.
There's an error on the console about an iterator when doing so
though.
2020-06-21 16:23:00 +01:00
Athanasius
4d5fa590af New option to NOT check for app updates automatically if in-game.
* Stores disable_autoappupdatecheckingame in settings.
  * If 'disable' is active then once you're in-game WinSparkle auto
    check for updates is disabled.
  * Whatever the state of the option WinSparkle auto updates are
    (re-)enabled when you exit the game to Main Menu or fully.
  * Using 'Help' > 'Check for updates' manually will still always work.

It has been difficult to test the code fully because it isn't easy to
get WinSparkle's registry data about last update check time set just right
to not check immediately, but to do so some reasonable time after you're
in-game and have confirmed the new option setting isn't easy.
  Worst case people won't learn about an update until the next time they
run EDMC.
2020-06-20 20:46:05 +01:00
Jonathan Harris
929bd82684 Allow executable and plugins to be run from non-ASCII paths
Fixes #234
2017-08-19 16:03:39 +01:00
Jonathan Harris
2f206d528b Verify SSL certs only if Python supports SNI
http://docs.python-requests.org/en/master/community/faq/#what-are-hostname-doesn-t-match-errors
2016-03-27 18:54:37 +01:00
Jonathan Harris
c9d585849c Don't need to explicitly set WinSparkle language 2016-01-28 12:32:26 +00:00
Jonathan Harris
4eefbd4ca9 Close WinSparkle nicely on exit. 2016-01-28 12:32:25 +00:00
Jonathan Harris
0a2019937f Also check for new versions when running from source. 2015-12-18 05:20:31 +00:00
Jonathan Harris
b2a0545771 Add support for localization. 2015-09-03 00:21:12 +01:00
Jonathan Harris
b635fbb048 Sparkle & WinSparkle integration for automatic updates. 2015-06-08 15:35:00 +01:00