mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-15 00:30:33 +03:00
Merge pull request #2227 from HullSeals/enhancement/519/add-beta
[519] Add Beta Update Track
This commit is contained in:
commit
9cd4ca5fb0
3
.github/workflows/pr-checks.yml
vendored
3
.github/workflows/pr-checks.yml
vendored
@ -13,7 +13,7 @@ on:
|
||||
|
||||
jobs:
|
||||
code-checks:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
@ -56,6 +56,7 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: '.python-version'
|
||||
cache: 'pip' # caching pip dependencies
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
3
.github/workflows/push-checks.yml
vendored
3
.github/workflows/push-checks.yml
vendored
@ -19,7 +19,7 @@ on:
|
||||
jobs:
|
||||
push_checks:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -28,6 +28,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
cache: 'pip' # caching pip dependencies
|
||||
python-version-file: '.python-version'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
24
.github/workflows/windows-build.yml
vendored
24
.github/workflows/windows-build.yml
vendored
@ -62,16 +62,16 @@ jobs:
|
||||
mv ../EDMarketConnector-release-${{ needs.variables.outputs.sem_ver }}.tar.gz .
|
||||
|
||||
- name: Upload build files
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Built files
|
||||
name: built-files-linux
|
||||
path: |
|
||||
EDMarketConnector-release-*.tar.gz
|
||||
|
||||
windows_build:
|
||||
needs: [variables]
|
||||
name: Build EDMC
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@ -105,6 +105,7 @@ jobs:
|
||||
with:
|
||||
python-version-file: '.python-version'
|
||||
architecture: "x86"
|
||||
cache: 'pip' # caching pip dependencies
|
||||
|
||||
- name: Install python tools
|
||||
run: |
|
||||
@ -131,22 +132,31 @@ jobs:
|
||||
Get-ChildItem -Path . -Filter "EDMarketConnector_Installer_*.exe" | Rename-Item -NewName {"EDMarketConnector_Installer_Unsigned_$($_.Name -replace '^EDMarketConnector_Installer_', '')"}
|
||||
|
||||
- name: Upload build files
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Built files
|
||||
name: built-files-windows
|
||||
path: |
|
||||
EDMarketConnector_Installer_*.exe
|
||||
EDMarketConnector-release-*.zip
|
||||
Merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ windows_build, linux_build ]
|
||||
steps:
|
||||
- name: Merge Artifacts
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: Built files
|
||||
pattern: built-files-*
|
||||
|
||||
release:
|
||||
name: Release new version
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ windows_build, linux_build ]
|
||||
needs: Merge
|
||||
if: "${{ github.event_name != 'workflow_dispatch' }}"
|
||||
|
||||
steps:
|
||||
- name: Download binary
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: Built files
|
||||
path: ./
|
||||
|
@ -1 +1 @@
|
||||
3.11.7
|
||||
3.11.9
|
||||
|
@ -15,8 +15,9 @@ We now sign our code! This does mean that built EXEs are now slightly modified o
|
||||
For information on what this means, and opt-out options, please visit https://github.com/EDCD/EDMarketConnector/wiki/Code-Signing-and-EDMC
|
||||
|
||||
**Changes and Enhancements**
|
||||
* Added new SCO Module Details
|
||||
* Added new SCO and Python Armor Module Details
|
||||
* Reverted a change from the prior release due to breaking some consumers.
|
||||
|
||||
**Plugin Developers**
|
||||
* modules.p and ships.p are deprecated, and slated for removal in 5.11+!
|
||||
* The `openurl()` function in ttkHyperlinkLabel has been deprecated,
|
||||
@ -175,7 +176,7 @@ for removal in the next major release! Please look for that change coming soon.
|
||||
|
||||
**Changes and Enhancements**
|
||||
* Added new `modules.json` and `ships.json` files to improve security and readability
|
||||
* Added a core Spanch URL provider plugin
|
||||
* Added a core Spansh URL provider plugin
|
||||
* Added a new auth response page for successful FDEV authentication
|
||||
* Added a new Open Log Folder option to the Help menu
|
||||
* Added a new `--start_min` command flag to force the application to start minimized
|
||||
@ -241,7 +242,7 @@ Known Issues
|
||||
|
||||
Release 5.9.3
|
||||
===
|
||||
This release is identical to 5.9.3, except reverts a bad change.
|
||||
This release is identical to 5.9.2, except reverts a bad change.
|
||||
|
||||
- REVERTS Deprecated load_module() is now retired (#1462)
|
||||
|
||||
|
@ -105,7 +105,7 @@ def copy_sys_report(root: tk.Tk, report: str) -> None:
|
||||
"""Copy the system info to the keyboard."""
|
||||
root.clipboard_clear()
|
||||
root.clipboard_append(report)
|
||||
messagebox.showinfo("System Profiler", "System Report copied to Clipboard")
|
||||
messagebox.showinfo("System Profiler", "System Report copied to Clipboard", parent=root)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
@ -801,7 +801,7 @@ class AppWindow:
|
||||
self.suit.grid_forget()
|
||||
self.suit_shown = False
|
||||
|
||||
def postprefs(self, dologin: bool = True):
|
||||
def postprefs(self, dologin: bool = True, **postargs):
|
||||
"""Perform necessary actions after the Preferences dialog is applied."""
|
||||
self.prefsdialog = None
|
||||
self.set_labels() # in case language has changed
|
||||
@ -825,6 +825,29 @@ class AppWindow:
|
||||
if dologin and monitor.cmdr:
|
||||
self.login() # Login if not already logged in with this Cmdr
|
||||
|
||||
if postargs.get('Update') and postargs.get('Track'):
|
||||
track = postargs.get('Track')
|
||||
# LANG: Inform the user the Update Track has changed
|
||||
self.status['text'] = tr.tl('Update Track Changed to {TRACK}').format(TRACK=track)
|
||||
self.updater.check_for_updates()
|
||||
if track == "Stable":
|
||||
# LANG: Inform the user the Update Track has changed
|
||||
title = tr.tl('Update Track Changed to {TRACK}').format(TRACK=track)
|
||||
update_msg = tr.tl( # LANG: Inform User of Beta -> Stable Transition Risks
|
||||
'Update track changed to Stable from Beta. '
|
||||
'You will no longer receive Beta updates. You will stay on your current Beta '
|
||||
r'version until the next Stable release.\r\n\r\n'
|
||||
'You can manually revert to the latest Stable version. To do so, you must download and install '
|
||||
'the latest Stable version manually. Note that this may introduce bugs or break completely'
|
||||
r' if downgrading between major versions with significant changes.\r\n\r\n'
|
||||
'Do you want to open GitHub to download the latest release?'
|
||||
)
|
||||
update_msg = update_msg.replace('\\n', '\n')
|
||||
update_msg = update_msg.replace('\\r', '\r')
|
||||
stable_popup = tk.messagebox.askyesno(title=title, message=update_msg, parent=postargs.get('Parent'))
|
||||
if stable_popup:
|
||||
webbrowser.open("https://github.com/edCD/eDMarketConnector/releases/latest")
|
||||
|
||||
def set_labels(self):
|
||||
"""Set main window labels, e.g. after language change."""
|
||||
self.cmdr_label['text'] = tr.tl('Cmdr') + ':' # LANG: Label for commander name in main window
|
||||
@ -2045,7 +2068,8 @@ def validate_providers():
|
||||
tk.messagebox.showinfo(
|
||||
# LANG: Popup window title for Reset Providers
|
||||
tr.tl('EDMC: Default Providers Reset'),
|
||||
popup_text
|
||||
popup_text,
|
||||
parent=root
|
||||
)
|
||||
|
||||
|
||||
@ -2214,7 +2238,8 @@ sys.path: {sys.path}'''
|
||||
detail = detail.replace('\\n', '\n')
|
||||
detail = detail.replace('\\r', '\r')
|
||||
msg = tk.messagebox.askyesno(
|
||||
title=title, message=message, detail=detail, icon=tkinter.messagebox.ERROR, type=tkinter.messagebox.YESNO
|
||||
title=title, message=message, detail=detail, icon=tkinter.messagebox.ERROR, type=tkinter.messagebox.YESNO,
|
||||
parent=root
|
||||
)
|
||||
if msg:
|
||||
webbrowser.open(
|
||||
@ -2248,7 +2273,8 @@ sys.path: {sys.path}'''
|
||||
tk.messagebox.showinfo(
|
||||
# LANG: Popup window title for list of 'broken' plugins that failed to load
|
||||
tr.tl('EDMC: Broken Plugins'),
|
||||
popup_text
|
||||
popup_text,
|
||||
parent=root
|
||||
)
|
||||
|
||||
def messagebox_not_py3():
|
||||
@ -2278,7 +2304,8 @@ sys.path: {sys.path}'''
|
||||
tk.messagebox.showinfo(
|
||||
# LANG: Popup window title for list of 'enabled' plugins that don't work with Python 3.x
|
||||
tr.tl('EDMC: Plugins Without Python 3.x Support'),
|
||||
popup_text
|
||||
popup_text,
|
||||
parent=root
|
||||
)
|
||||
config.set('plugins_not_py3_last', int(time()))
|
||||
|
||||
|
@ -792,6 +792,19 @@
|
||||
/* update.py: Update Available Text; In files: update.py:229; */
|
||||
"{NEWVER} is available" = "{NEWVER} is available";
|
||||
|
||||
/* prefs.py: Stable Version of EDMC; */
|
||||
"Stable" = "Stable";
|
||||
|
||||
/* prefs.py: Select the Update Track (Beta, Stable); */
|
||||
"Update Track" = "Update Track";
|
||||
|
||||
/* EDMarketConnector.py: Inform the user the Update Track has changed; */
|
||||
"Update Track Changed to {TRACK}" = "Update Track Changed to {TRACK}";
|
||||
|
||||
|
||||
/* EDMarketConnector.py: Inform User of Beta -> Stable Transition Risks; */
|
||||
"Update track changed to Stable from Beta. You will no longer receive Beta updates. You will stay on your current Beta version until the next Stable release.\r\n\r\nYou can manually revert to the latest Stable version. To do so, you must download and install the latest Stable version manually. Note that this may introduce bugs or break completely if downgrading between major versions with significant changes.\r\n\r\nDo you want to open GitHub to download the latest release?" = "Update track changed to Stable from Beta. You will no longer receive Beta updates. You will stay on your current Beta version until the next Stable release.\r\n\r\nYou can manually revert to the latest Stable version. To do so, you must download and install the latest Stable version manually. Note that this may introduce bugs or break completely if downgrading between major versions with significant changes.\r\n\r\nDo you want to open GitHub to download the latest release?";
|
||||
|
||||
/* myNotebook.py: Can't Paste Images or Files in Text; */
|
||||
"Cannot paste non-text content." = "Cannot paste non-text content.";
|
||||
|
||||
|
@ -17,7 +17,6 @@ __all__ = [
|
||||
'applongname',
|
||||
'appcmdname',
|
||||
'copyright',
|
||||
'update_feed',
|
||||
'update_interval',
|
||||
'debug_senders',
|
||||
'trace_on',
|
||||
@ -29,7 +28,9 @@ __all__ = [
|
||||
'user_agent',
|
||||
'appversion_nobuild',
|
||||
'AbstractConfig',
|
||||
'config'
|
||||
'config',
|
||||
'get_update_feed',
|
||||
'update_feed'
|
||||
]
|
||||
|
||||
import abc
|
||||
@ -57,7 +58,7 @@ _static_appversion = '5.11.0-alpha3'
|
||||
_cached_version: semantic_version.Version | None = None
|
||||
copyright = '© 2015-2019 Jonathan Harris, 2020-2024 EDCD'
|
||||
|
||||
update_feed = 'https://raw.githubusercontent.com/EDCD/EDMarketConnector/releases/edmarketconnector.xml'
|
||||
|
||||
update_interval = 8*60*60 # 8 Hours
|
||||
# Providers marked to be in debug mode. Generally this is expected to switch to sending data to a log file
|
||||
debug_senders: list[str] = []
|
||||
@ -478,3 +479,15 @@ def get_config(*args, **kwargs) -> AbstractConfig:
|
||||
|
||||
|
||||
config = get_config()
|
||||
|
||||
|
||||
# Wiki: https://github.com/EDCD/EDMarketConnector/wiki/Participating-in-Open-Betas-of-EDMC
|
||||
def get_update_feed() -> str:
|
||||
"""Select the proper update feed for the current update track."""
|
||||
if config.get_bool('beta_optin'):
|
||||
return 'https://raw.githubusercontent.com/EDCD/EDMarketConnector/beta/edmarketconnector.xml'
|
||||
return 'https://raw.githubusercontent.com/EDCD/EDMarketConnector/releases/edmarketconnector.xml'
|
||||
|
||||
|
||||
# WARNING: update_feed is deprecated, and will be removed in 6.0 or later. Please migrate to get_update_feed()
|
||||
update_feed = get_update_feed()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -108,7 +108,8 @@ class EntryMenu(ttk.Entry):
|
||||
# Hijack existing translation, yes it doesn't exactly match here.
|
||||
messagebox.showwarning(
|
||||
tr.tl('Error'), # LANG: Generic error prefix - following text is from Frontier auth service;
|
||||
tr.tl('Cannot paste non-text content.') # LANG: Can't Paste Images or Files in Text
|
||||
tr.tl('Cannot paste non-text content.'), # LANG: Can't Paste Images or Files in Text
|
||||
parent=self.master
|
||||
)
|
||||
return
|
||||
text = self.clipboard_get()
|
||||
|
31
prefs.py
31
prefs.py
@ -514,10 +514,29 @@ class PreferencesDialog(tk.Toplevel):
|
||||
|
||||
self.hotkey_play_btn.grid(columnspan=4, padx=self.BUTTONX, pady=self.PADY, sticky=tk.W, row=row.get())
|
||||
|
||||
# Option to disabled Automatic Check For Updates whilst in-game
|
||||
# Options to select the Update Path and Disable Automatic Checks For Updates whilst in-game
|
||||
ttk.Separator(config_frame, orient=tk.HORIZONTAL).grid(
|
||||
columnspan=4, padx=self.PADX, pady=self.SEPY, sticky=tk.EW, row=row.get()
|
||||
)
|
||||
|
||||
with row as curr_row:
|
||||
nb.Label(config_frame, text=tr.tl('Update Track')).grid( # LANG: Select the Update Track (Beta, Stable)
|
||||
padx=self.PADX, pady=self.PADY, sticky=tk.W, row=curr_row
|
||||
)
|
||||
self.curr_update_track = "Beta" if config.get_bool('beta_optin') else "Stable"
|
||||
self.update_paths = tk.StringVar(value=self.curr_update_track)
|
||||
|
||||
update_paths = [
|
||||
tr.tl("Stable"), # LANG: Stable Version of EDMC
|
||||
tr.tl("Beta") # LANG: Beta Version of EDMC
|
||||
]
|
||||
self.update_track = nb.OptionMenu(
|
||||
config_frame, self.update_paths, self.update_paths.get(), *update_paths
|
||||
)
|
||||
|
||||
self.update_track.configure(width=15)
|
||||
self.update_track.grid(column=1, pady=self.BOXY, padx=self.PADX, sticky=tk.W, row=curr_row)
|
||||
|
||||
self.disable_autoappupdatecheckingame = tk.IntVar(value=config.get_int('disable_autoappupdatecheckingame'))
|
||||
self.disable_autoappupdatecheckingame_btn = nb.Checkbutton(
|
||||
config_frame,
|
||||
@ -1216,7 +1235,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
config.set('hotkey_mods', self.hotkey_mods)
|
||||
config.set('hotkey_always', int(not self.hotkey_only.get()))
|
||||
config.set('hotkey_mute', int(not self.hotkey_play.get()))
|
||||
|
||||
config.set('beta_optin', 0 if self.update_paths.get() == "Stable" else 1)
|
||||
config.set('shipyard_provider', self.shipyard_provider.get())
|
||||
config.set('system_provider', self.system_provider.get())
|
||||
config.set('station_provider', self.station_provider.get())
|
||||
@ -1240,9 +1259,15 @@ class PreferencesDialog(tk.Toplevel):
|
||||
config.set('dark_highlight', self.theme_colors[1])
|
||||
theme.apply(self.parent)
|
||||
|
||||
# Send to the Post Config if we updated the update branch
|
||||
post_flags = {
|
||||
'Update': True if self.curr_update_track != self.update_paths.get() else False,
|
||||
'Track': self.update_paths.get(),
|
||||
'Parent': self
|
||||
}
|
||||
# Notify
|
||||
if self.callback:
|
||||
self.callback()
|
||||
self.callback(**post_flags)
|
||||
|
||||
plug.notify_prefs_changed(monitor.cmdr, monitor.is_beta)
|
||||
|
||||
|
@ -15,7 +15,7 @@ from typing import TYPE_CHECKING
|
||||
from xml.etree import ElementTree
|
||||
import requests
|
||||
import semantic_version
|
||||
from config import appname, appversion_nobuild, config, update_feed
|
||||
from config import appname, appversion_nobuild, config, get_update_feed
|
||||
from EDMCLogging import get_main_logger
|
||||
from l10n import translations as tr
|
||||
|
||||
@ -123,7 +123,7 @@ class Updater:
|
||||
self.updater: ctypes.CDLL | None = ctypes.cdll.WinSparkle
|
||||
|
||||
# Set the appcast URL
|
||||
self.updater.win_sparkle_set_appcast_url(update_feed.encode())
|
||||
self.updater.win_sparkle_set_appcast_url(get_update_feed().encode())
|
||||
|
||||
# Set the appversion *without* build metadata, as WinSparkle
|
||||
# doesn't do proper Semantic Version checks.
|
||||
@ -181,7 +181,7 @@ class Updater:
|
||||
newversion = None
|
||||
items = {}
|
||||
try:
|
||||
request = requests.get(update_feed, timeout=10)
|
||||
request = requests.get(get_update_feed(), timeout=10)
|
||||
|
||||
except requests.RequestException as ex:
|
||||
logger.exception(f'Error retrieving update_feed file: {ex}')
|
||||
|
Loading…
x
Reference in New Issue
Block a user