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

1421 Commits

Author SHA1 Message Date
Athanasius
8ad1201457 Translations: Add recent new strings
* Plugins Without Python 3.x Support
 * Information on migrating plugins
 * Disable Automatic Application Updates Check when in-game

Closes #529
2020-07-01 15:55:37 +01:00
Athanasius
821111284e Add translations for python 3.x warning popup 2020-07-01 15:55:37 +01:00
Athanasius
02c232c279
Merge pull request #542 from Athanasius/feature/512-eddb-urls-without-pickles
#512 Feature/512 eddb urls without pickles
2020-07-01 15:54:00 +01:00
Athanasius
cd02d1664a Change EDDB system_url to use SystemAddress
* This means storing this.system_address from both cmdr_data and journal_entry.  NB: If the current value in the event or data is 'None' it will retain the previous value.  Without this Journal entries without SystemAddress erase the stored value.
 * The station_url() fallback to system_url() similarly uses this.system_address in the call.

Addresses #512
2020-07-01 15:51:14 +01:00
Athanasius
f6b3109a09 Remove the last of the {stations,systems}.p code from EDDB plugin
There is one tiny regression for a very, very corner case.

  In 3.46 if you use EDDB as the 'Station' provider and:

	1. Dock at Station A, in System X
	2. Jump out to System Y, which is also populated
	3. Exit out of the game
	4. (Re-)Start EDMC
	5. Hit 'Update' to manually trigger CAPI data retrieval

you will see a "×" character as the Station Name, and can click on it to
take you to the EDDB *System* page.  It is only there because of EDMC
using systems.p to check if System Y is populated.

  With this version in that circumstance there's no way to know that
System Y is populated, so the code assumes not and doesn't show the
"×", and thus there's nothing to click to go to the EDDB *System* page
for System Y.

  But so long as the user is actually running the game and EDMC together
then populated status is detected from Journal events and the "×" will
be there whenever you're undocked but in a populated system.
  Caveat: We know Frontier have allowed some systems that are
technically populated, but show a Population of zero.  This code assumes
that means they're *not* populated.
2020-07-01 15:51:14 +01:00
Athanasius
0541e404ec Track system population in monitor, and use in eddb
EDDB station link now triggers off this.system_population, which is
received via monitor passing 'Population' through in Startup, Location,
FSDJump and CarrierJump events.

  One fewer use cases for systems.p (populated status in this case).
2020-07-01 15:51:14 +01:00
Athanasius
ad81339495 Check eddb.system_name is set before attempting to quote it
urllib.parse.quote does *not* like being passed None.
2020-07-01 15:51:14 +01:00
Athanasius
6ed7590ba9 Update eddb.station_marketid from CarrierJump as well
This shouldn't actually be necessary, the marketid shouln't change
because of a jump, and would have been picked up from the other events
anyway, but it should do no harm to set it again from this.
2020-07-01 15:51:14 +01:00
Athanasius
2df8610e42 eddb: Ensure system_name is quoted for URL 2020-07-01 15:51:14 +01:00
Athanasius
1a11202aea Implement tracking station MarketID, and use in eddb plugin
* Adds monitor.station_marketid, tracked at the same points as
   monitor.station (name).
 * Changes EDDB plugin to also track its own this.station_marketid so
   that it can be used in /market-id/ EDDB URL.
   This removes a use case for stations.p file.
2020-07-01 15:51:14 +01:00
Athanasius
553c7980c1 Change EDDB system_url() to using by-name URL
This removes a use case for systems.p file
2020-07-01 15:51:14 +01:00
Athanasius
e35561c96e
Merge pull request #541 from Athanasius/feature/509-Help_About
Implements 'Help > About' menu item
2020-07-01 15:47:06 +01:00
Athanasius
314fc7082d Implements 'Help > About' menu item
* Re-uses the 'About {APP}' that was defined because the MacOS version
   always had an 'About' bit.
 * As a side effect of wanting the copyright string in the popup this is
   now defined in config.py, and setup.py has been adjusted to also take
   it from there.
 * The About popup includes a link to the release notes, contingent on
   the git tag existing on github.
 * Only one instance of the popup is allowed at once.
 * There's still a 'TODO' for moving 'Check for updates' into this
   popup.

Addresses issue #509
2020-07-01 15:44:20 +01:00
Athanasius
476f7384cf
Merge pull request #540 from Athanasius/fix/407-upload_output_settings_reset
Fix/407 upload output settings reset
2020-07-01 15:42:40 +01:00
Athanasius
89f113e190 Use Preferences Save Serial Number instead of flag
* new class `PrefsVersion` in prefs.py.  A singleton `prefsSaved` (note
   case) is created.
 * When new preferences are added and require defaults on first run the
   code should use:

     `if prefsVersion.shouldSetDefaults(<prior release version>, [<optional old test>]):`

   to check if defaults should be set in preferences.  So if prior release
   was '3.4.6.0' and you've added a new preference with defaults you should
   call this with '3.4.6.0' as the first argument.
   The <optional old test> is really only for historical purposes, as a
   fallback in case no 'PrefsVersion' has yet been set in the user's
   Registry/settings file.
 * Any code that adds such a new preference **MUST** make changes to the
   `versions` dictionary in the PrefsVersion class.
     1. Add the predicted next version to the dictionary, with number one
        higher than 'current'
     2. Set 'current' equal to that new value.
   Obviously if other post-last-release code has already done this then you
   don't need to.

   Failure to update the versions dictionary in this manner will lead to an
   Exception being raised, and the code the preferences are for failing
   (i.e. EDDN means no EDDN tab on Settings).

Closes #407
2020-07-01 15:33:42 +01:00
Athanasius
d0fdfaed0b RELEASING.md is no longer shouted. 2020-06-30 16:44:29 +01:00
Athanasius
79d376953d RELEASING.md doesn't need to shout 2020-06-30 16:40:40 +01:00
Athanasius
37a0195de4 Adds Contributing.md
* Outlines everything a new contributor should know.
* There's one 'XXX' to-check items with regards to Windows Installer,
  and if it does think A.B.C.1 should be installed in place of A.B.C.0.

Closes #533
2020-06-30 16:30:05 +01:00
Athanasius
ecdd65e0ac prefs.py change for that output settings fix
Addresses #407
2020-06-30 15:22:50 +01:00
Athanasius
df09ddf4ed First full Python 3.7 release will be 4.0.0.0
Issue #526
Test/0.1.0.1
2020-06-29 15:03:49 +01:00
Athanasius
6f9d6a3a05 Ensure PLUGINS.md is all Python 3.x
* One reference to plugin_start() updated
 * Settings > Plugins > "Plugins Without Python 3.x Support" mentioned.
 * Minor formatting changes.
2020-06-29 15:01:37 +01:00
Athanasius
5e3195d4f7 Update README.md for no more Mac releases + misc
* No more Mac releases.
 * Cite Windows 10 "Apps & Features" as place to go for uninstall.
 * Add Marginal to Acknowledgements.
 * Add ", 2020 EDCD" to Copyright.
2020-06-29 14:50:04 +01:00
Athanasius
63c2ff52e9 Fix an Output/EDDN option combination causing defaults to get re-set
Change Output and EDDN options to only get set to defaults if key 'PrefsDidSave' is not present and true.  This gets a value of 0x1 saved any time preferences are applied.

The issue was that if you had sufficient options set such that the saved 'output' value was 0x0 then that would evaluate to false and cause the defaults to get set.

Fixes #407
2020-06-29 14:32:25 +01:00
Athanasius
60d58fd852 Mention updating translations in release docs. 2020-06-28 16:45:49 +01:00
Athanasius
d8a76fd085 Merge branch 'feature/525-common-changelog' into python3 2020-06-28 16:19:20 +01:00
Athanasius
c2dc5a62f1 Update RELEASING.md for using full version numbers.
I've also re-done the release actions/order to actually push the
release-A.B.C.D branch up to github, along with the rel-A.B.C.D tag on
its HEAD.  This way the final release step is a merge of release-A.B.C.D
into releases, which could even be done directly on github.
2020-06-28 16:17:14 +01:00
Athanasius
e4eb86d3b5 Switch setup.py over to using full version string throughout.
* .msi filename now uses full A.B.C.D version
 * Git tag is assumed to be rel-A.B.C.D

Switched the entire appcast.write() formatting to using named tags, no
need to remember positions now.

Addresses part of #523
2020-06-28 15:52:32 +01:00
Athanasius
70a7ef6337 Merge branch 'release-final-python27' into python3 2020-06-27 10:19:59 +01:00
Athanasius
8435f61128 Add some notes on using GitHub API to get changelogs 2020-06-27 01:38:46 +01:00
Athanasius
9d9c688c4b Add ChangeLog.md
This is based on the latest appcast edmarketconnector.xml contents.

  It looks like Marginal was in the habit of clearing it out when major
version bumped.

  Going to need something to retrieve all the prior release notes from
github, starting with rel-100.
2020-06-26 13:25:07 +01:00
Athanasius
4dcdcf5c3f Merge branch 'python3' of https://github.com/EDCD/EDMarketConnector into python3 2020-06-22 00:20:34 +01:00
Athanasius
fa9ed8cc81 docs: RELEASING: Update pip/modules requirements
* Confirmed requirements,txt contents work, NB: Need to have already
   installed py2exe as pip won't find a valid version.
 * Document using requirements.txt, now that it's up to date.
 * So that isn't part of the py2exe section now.
2020-06-22 00:18:47 +01:00
Athanasius
65a2c4c1d5 Update requirements.txt
* Removed modules we don't seem to use any more.
  * Went through *all* the imports (including 'from X import Y') and
    checked every module was one of: builtin, stock in win32 python
    3.7.7 or a known dependency of another we do list.
  * As we still have the sqlite3.dll hack in setup.py I've only
    specified: +py2exe>=0.9.3.2
  * certifi==2019.9.11 to work around py2exe issues the current latest
  * keyring==19.2.0 to work around py2exe issues the current latest

This still needs testing to see if it's enough to setup an
only-just-installed Python-32 of 3.7.7
2020-06-21 23:40:16 +01:00
Athanasius
2416fa6e88
Merge pull request #524 from bgol/bugfix-522
Bugfix #522
2020-06-21 22:21:44 +01:00
Bernd Gollesch
77a2a1b533 Use the after method of root to open the messagebox inside the mainloop (fixes #522). 2020-06-21 22:05:12 +02:00
Athanasius
b829c1bbd1 Remove the 'plugins not py 3.x' warning popup from EDMarketConnector.py
This *was* moved to plug.py, and it executing there prevents this
version from actually causing a popup, but it doesn't belong here.
2020-06-21 20:15:33 +01:00
Athanasius
c5adb3bbb9 Merge branch 'python3' of https://github.com/EDCD/EDMarketConnector into python3 2020-06-21 20:10:22 +01:00
Athanasius
20aaca3bb2 docs: RELEASING: You REALLY need to update that install URL 2020-06-21 19:24:37 +01:00
Athanasius
8d940a8870 We don't need to have the installer log after all. pub-346 2020-06-21 19:21:37 +01:00
Athanasius
52801c762e Merge branch 'releases' of https://github.com/EDCD/EDMarketConnector into releases 2020-06-21 19:16:34 +01:00
Athanasius
e209935f5f Actually change the URL of the release to 346 2020-06-21 19:15:55 +01:00
Athanasius
ba61563e80 Attempt to make installer log verbosely 2020-06-21 19:13:45 +01:00
Athanasius
07af891551 Update sparkle:version to 3.4.6.0
And now 3.46 will actually be fully published.
release-final-python27
2020-06-21 18:32:52 +01:00
Athanasius
3562de9e62 release-346: Finalise changelog
* Document the "Disable Automatic Application Updates Check when
   in-game" option.
 * Add 'dummy' section for 3.45.
final-python27
2020-06-21 18:04:30 +01:00
Athanasius
9be67224c1 Merge branch 'release-final-python27' into release-346 2020-06-21 17:59:32 +01:00
Athanasius
ca4b448ce2 Merge branch 'python3' of https://github.com/EDCD/EDMarketConnector into python3 rel-351-0 2020-06-21 17:19:38 +01:00
Athanasius
558392d21b Move "plugins need migrating" popup to plug.py
Where it was in EDMarketConnector.py caused issues because then the
main thread was blocking on the popup when other threads expected it to
be running:

---------------------------------------------------------------------
Exception in thread Journal worker:
Traceback (most recent call last):
  File "C:\Users\Athan\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\Athan\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Athan\Documents\Devel\EDMarketConnector-python3\monitor.py", line 273, in worker
    self.root.event_generate('<<JournalEvent>>', when="tail")
  File "C:\Users\Athan\AppData\Local\Programs\Python\Python37-32\lib\tkinter\__init__.py", line 1673, in event_generate
    self.tk.call(args)
RuntimeError: main thread is not in main loop
---------------------------------------------------------------------

However *now* it pops up before the main UI is running properly at all,
so the EDMC window is likely out of position, and won't be
painted/themed yet.
  This is deemed acceptable for a 'once a day at most' popup.

  The popup title now has 'EDMC: ' at the start to be sure users know
what it's talking about.
  It also has some brief advice about how to disable a plugin.
2020-06-21 17:14:16 +01:00
Athanasius
3178ad1b6f Remove dangling 'imp.release_lock()' that's no longer required 2020-06-21 16:58:50 +01:00
Athanasius
8690f1bb83 Fix old style 'print ' statements 2020-06-21 16:58:21 +01:00
Athanasius
a40b0e33ca Detect plugins without Python 3.x support and warn user.
To allow users to sort out their plugins before EDMC itself moves to
Python 3.x warn them if any of their enabled, non-stock, plugins do not
have a plugin_start3() method.

  * If any are found without support there's a popup triggered at the
    end of AppWindow initialisation.
  * Then the user can check Settings > Plugins to see a list of the
    plugins without Python 3.x support.
2020-06-21 16:57:37 +01:00