mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-03 17:10:59 +03:00
Merge pull request #2049 from Rixxan/fix/2046/5.9.1-Auth-Issues
5.9.2 Collective Roundup - Frontier Auth Registry Keys LGTM
This commit is contained in:
commit
2038e36bf3
30
.github/workflows/submodule-update.yml
vendored
30
.github/workflows/submodule-update.yml
vendored
@ -1,11 +1,10 @@
|
|||||||
---
|
|
||||||
name: Submodule Updates
|
name: Submodule Updates
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [develop]
|
branches: [develop]
|
||||||
# schedule:
|
schedule:
|
||||||
# - cron: '0 12 * * *'
|
- cron: '0 12 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_submodules:
|
check_submodules:
|
||||||
@ -45,19 +44,37 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
- name: Create submodules changes branch
|
- name: Create or Update submodules changes branch
|
||||||
if: steps.check_for_changes.outputs.changes == 'true'
|
if: steps.check_for_changes.outputs.changes == 'true'
|
||||||
run: |
|
run: |
|
||||||
git checkout -b "submodule-change/$GITHUB_RUN_ID" $CHECKOUT_BRANCH
|
git fetch origin "submodule-change/$GITHUB_RUN_ID" || git checkout -b "submodule-change/$GITHUB_RUN_ID" $CHECKOUT_BRANCH
|
||||||
git commit -am "updating submodules"
|
git commit -am "updating submodules"
|
||||||
git push --set-upstream origin "submodule-change/$GITHUB_RUN_ID"
|
git push --set-upstream origin "submodule-change/$GITHUB_RUN_ID"
|
||||||
|
|
||||||
- name: Create pull request against target branch
|
- name: Create or Update pull request against target branch
|
||||||
if: steps.check_for_changes.outputs.changes == 'true'
|
if: steps.check_for_changes.outputs.changes == 'true'
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
script: |
|
script: |
|
||||||
|
const { data: pulls } = await github.rest.pulls.list({
|
||||||
|
owner: '${{ github.repository_owner }}',
|
||||||
|
repo: '${{ github.repository }}'.split('/')[1].trim(),
|
||||||
|
head: 'submodule-change/${{ github.run_id }}',
|
||||||
|
base: '${{ env.PR_AGAINST_BRANCH }}',
|
||||||
|
state: 'open',
|
||||||
|
});
|
||||||
|
if (pulls.length > 0) {
|
||||||
|
// If an open pull request exists, update it
|
||||||
|
const pull_number = pulls[0].number;
|
||||||
|
await github.rest.pulls.update({
|
||||||
|
owner: '${{ github.repository_owner }}',
|
||||||
|
repo: '${{ github.repository }}'.split('/')[1].trim(),
|
||||||
|
pull_number,
|
||||||
|
body: '${{ steps.check_for_changes.outputs.changes_text }}',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// If no open pull request exists, create a new one
|
||||||
await github.rest.pulls.create({
|
await github.rest.pulls.create({
|
||||||
owner: '${{ github.repository_owner }}',
|
owner: '${{ github.repository_owner }}',
|
||||||
repo: '${{ github.repository }}'.split('/')[1].trim(),
|
repo: '${{ github.repository }}'.split('/')[1].trim(),
|
||||||
@ -66,3 +83,4 @@ jobs:
|
|||||||
title: `[Auto-generated] Submodule Updates ${process.env.GITHUB_RUN_ID}`,
|
title: `[Auto-generated] Submodule Updates ${process.env.GITHUB_RUN_ID}`,
|
||||||
body: '${{ steps.check_for_changes.outputs.changes_text }}',
|
body: '${{ steps.check_for_changes.outputs.changes_text }}',
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
15
ChangeLog.md
15
ChangeLog.md
@ -33,6 +33,21 @@ produce the Windows executables and installer.
|
|||||||
currently used version in a given branch.
|
currently used version in a given branch.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Release 5.9.1
|
||||||
|
===
|
||||||
|
This release updates the build system in use for EDMC to a more feature-rich installer, as well
|
||||||
|
as updating the commodity information to be up-to-date for Update 16.
|
||||||
|
|
||||||
|
NOTE: This version hands over the installer to an EXE file for Windows instead of an MSI.
|
||||||
|
This does not change any functionality or plugin capability of EDMC. You **_may_** need to
|
||||||
|
manually close EDMC during the update process if updating from version 5.9.0 or earlier.
|
||||||
|
|
||||||
|
* Removed the old WiX Build System
|
||||||
|
* Handed over the Build system to Inno Setup
|
||||||
|
* Broke apart the Build and Installer scripts for ease of development
|
||||||
|
* Updated FDevIDs to latest version
|
||||||
|
* Updated coriolis-data to latest version
|
||||||
|
* Updated some internal documentation.
|
||||||
|
|
||||||
Release 5.9.0
|
Release 5.9.0
|
||||||
===
|
===
|
||||||
|
@ -427,7 +427,7 @@ import tkinter as tk
|
|||||||
import tkinter.filedialog
|
import tkinter.filedialog
|
||||||
import tkinter.font
|
import tkinter.font
|
||||||
import tkinter.messagebox
|
import tkinter.messagebox
|
||||||
from tkinter import ttk
|
from tkinter import ttk, constants as tkc
|
||||||
|
|
||||||
import commodity
|
import commodity
|
||||||
import plug
|
import plug
|
||||||
@ -1844,7 +1844,11 @@ class AppWindow(object):
|
|||||||
# version <link to changelog>
|
# version <link to changelog>
|
||||||
tk.Label(frame).grid(row=row, column=0) # spacer
|
tk.Label(frame).grid(row=row, column=0) # spacer
|
||||||
row += 1
|
row += 1
|
||||||
self.appversion_label = tk.Label(frame, text=appversion())
|
self.appversion_label = tk.Text(frame, height=1, width=len(str(appversion())), wrap=tkc.NONE, bd=0)
|
||||||
|
self.appversion_label.insert("1.0", str(appversion()))
|
||||||
|
self.appversion_label.tag_configure("center", justify="center")
|
||||||
|
self.appversion_label.tag_add("center", "1.0", "end")
|
||||||
|
self.appversion_label.config(state=tkc.DISABLED, bg=frame.cget("background"), font="TkDefaultFont")
|
||||||
self.appversion_label.grid(row=row, column=0, sticky=tk.E)
|
self.appversion_label.grid(row=row, column=0, sticky=tk.E)
|
||||||
# LANG: Help > Release Notes
|
# LANG: Help > Release Notes
|
||||||
self.appversion = HyperlinkLabel(frame, compound=tk.RIGHT, text=_('Release Notes'),
|
self.appversion = HyperlinkLabel(frame, compound=tk.RIGHT, text=_('Release Notes'),
|
||||||
|
3
build.py
3
build.py
@ -143,7 +143,8 @@ def build() -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
version_info: dict = {
|
version_info: dict = {
|
||||||
"description": "Downloads commodity market and other station data from the game"
|
"description": "Elite Dangerous Market Connector (EDMC)",
|
||||||
|
"comments": "Downloads commodity market and other station data from the game"
|
||||||
" Elite Dangerous for use with all popular online and offline trading tools.",
|
" Elite Dangerous for use with all popular online and offline trading tools.",
|
||||||
"company_name": "EDCD", # Used by WinSparkle
|
"company_name": "EDCD", # Used by WinSparkle
|
||||||
"product_name": appname, # Used by WinSparkle
|
"product_name": appname, # Used by WinSparkle
|
||||||
|
@ -52,7 +52,7 @@ appcmdname = 'EDMC'
|
|||||||
# <https://semver.org/#semantic-versioning-specification-semver>
|
# <https://semver.org/#semantic-versioning-specification-semver>
|
||||||
# Major.Minor.Patch(-prerelease)(+buildmetadata)
|
# Major.Minor.Patch(-prerelease)(+buildmetadata)
|
||||||
# NB: Do *not* import this, use the functions appversion() and appversion_nobuild()
|
# NB: Do *not* import this, use the functions appversion() and appversion_nobuild()
|
||||||
_static_appversion = '5.9.1-alpha0'
|
_static_appversion = '5.9.2'
|
||||||
_cached_version: Optional[semantic_version.Version] = None
|
_cached_version: Optional[semantic_version.Version] = None
|
||||||
copyright = '© 2015-2019 Jonathan Harris, 2020-2023 EDCD'
|
copyright = '© 2015-2019 Jonathan Harris, 2020-2023 EDCD'
|
||||||
|
|
||||||
|
9
plug.py
9
plug.py
@ -58,11 +58,10 @@ class Plugin(object):
|
|||||||
try:
|
try:
|
||||||
filename = 'plugin_'
|
filename = 'plugin_'
|
||||||
filename += name.encode(encoding='ascii', errors='replace').decode('utf-8').replace('.', '_')
|
filename += name.encode(encoding='ascii', errors='replace').decode('utf-8').replace('.', '_')
|
||||||
module = importlib.machinery.SourceFileLoader(
|
spec = importlib.util.spec_from_file_location(filename, loadfile) # type: ignore
|
||||||
filename,
|
module = importlib.util.module_from_spec(spec) # type: ignore
|
||||||
loadfile
|
spec.loader.exec_module(module) # type: ignore
|
||||||
).load_module()
|
# These type-ignores will need to be looked at. MyPy is wrong.
|
||||||
|
|
||||||
if getattr(module, 'plugin_start3', None):
|
if getattr(module, 'plugin_start3', None):
|
||||||
newname = module.plugin_start3(os.path.dirname(loadfile))
|
newname = module.plugin_start3(os.path.dirname(loadfile))
|
||||||
self.name = newname and str(newname) or name
|
self.name = newname and str(newname) or name
|
||||||
|
@ -125,6 +125,7 @@ class This:
|
|||||||
|
|
||||||
|
|
||||||
this = This()
|
this = This()
|
||||||
|
show_password_var = tk.BooleanVar()
|
||||||
|
|
||||||
STATION_UNDOCKED: str = '×' # "Station" name to display when not docked = U+00D7
|
STATION_UNDOCKED: str = '×' # "Station" name to display when not docked = U+00D7
|
||||||
__cleanup = str.maketrans({' ': None, '\n': None})
|
__cleanup = str.maketrans({' ': None, '\n': None})
|
||||||
@ -275,6 +276,14 @@ def plugin_stop() -> None:
|
|||||||
logger.debug('Done.')
|
logger.debug('Done.')
|
||||||
|
|
||||||
|
|
||||||
|
def toggle_password_visibility():
|
||||||
|
"""Toggle if the API Key is visible or not."""
|
||||||
|
if show_password_var.get():
|
||||||
|
this.apikey.config(show="") # type: ignore
|
||||||
|
else:
|
||||||
|
this.apikey.config(show="*") # type: ignore
|
||||||
|
|
||||||
|
|
||||||
def plugin_prefs(parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> tk.Frame:
|
def plugin_prefs(parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> tk.Frame:
|
||||||
"""
|
"""
|
||||||
Plugin preferences setup hook.
|
Plugin preferences setup hook.
|
||||||
@ -346,11 +355,20 @@ def plugin_prefs(parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> tk.Fr
|
|||||||
# LANG: EDSM API key label
|
# LANG: EDSM API key label
|
||||||
this.apikey_label = nb.Label(frame, text=_('API Key')) # EDSM setting
|
this.apikey_label = nb.Label(frame, text=_('API Key')) # EDSM setting
|
||||||
this.apikey_label.grid(row=cur_row, padx=PADX, sticky=tk.W)
|
this.apikey_label.grid(row=cur_row, padx=PADX, sticky=tk.W)
|
||||||
this.apikey = nb.Entry(frame)
|
this.apikey = nb.Entry(frame, show="*", width=50)
|
||||||
this.apikey.grid(row=cur_row, column=1, padx=PADX, pady=PADY, sticky=tk.EW)
|
this.apikey.grid(row=cur_row, column=1, padx=PADX, pady=PADY, sticky=tk.EW)
|
||||||
|
|
||||||
prefs_cmdr_changed(cmdr, is_beta)
|
prefs_cmdr_changed(cmdr, is_beta)
|
||||||
|
|
||||||
|
show_password_var.set(False) # Password is initially masked
|
||||||
|
show_password_checkbox = nb.Checkbutton(
|
||||||
|
frame,
|
||||||
|
text="Show API Key",
|
||||||
|
variable=show_password_var,
|
||||||
|
command=toggle_password_visibility,
|
||||||
|
)
|
||||||
|
show_password_checkbox.grid(columnspan=2, padx=BUTTONX, pady=(5, 0), sticky=tk.W)
|
||||||
|
|
||||||
return frame
|
return frame
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,6 +152,8 @@ class This:
|
|||||||
|
|
||||||
|
|
||||||
this = This()
|
this = This()
|
||||||
|
show_password_var = tk.BooleanVar()
|
||||||
|
|
||||||
# last time we updated, if unset in config this is 0, which means an instant update
|
# last time we updated, if unset in config this is 0, which means an instant update
|
||||||
LAST_UPDATE_CONF_KEY = 'inara_last_update'
|
LAST_UPDATE_CONF_KEY = 'inara_last_update'
|
||||||
EVENT_COLLECT_TIME = 31 # Minimum time to take collecting events before requesting a send
|
EVENT_COLLECT_TIME = 31 # Minimum time to take collecting events before requesting a send
|
||||||
@ -242,6 +244,14 @@ def plugin_stop() -> None:
|
|||||||
logger.debug('Done.')
|
logger.debug('Done.')
|
||||||
|
|
||||||
|
|
||||||
|
def toggle_password_visibility():
|
||||||
|
"""Toggle if the API Key is visible or not."""
|
||||||
|
if show_password_var.get():
|
||||||
|
this.apikey.config(show="")
|
||||||
|
else:
|
||||||
|
this.apikey.config(show="*")
|
||||||
|
|
||||||
|
|
||||||
def plugin_prefs(parent: ttk.Notebook, cmdr: str, is_beta: bool) -> tk.Frame:
|
def plugin_prefs(parent: ttk.Notebook, cmdr: str, is_beta: bool) -> tk.Frame:
|
||||||
"""Plugin Preferences UI hook."""
|
"""Plugin Preferences UI hook."""
|
||||||
x_padding = 10
|
x_padding = 10
|
||||||
@ -281,11 +291,20 @@ def plugin_prefs(parent: ttk.Notebook, cmdr: str, is_beta: bool) -> tk.Frame:
|
|||||||
# LANG: Inara API key label
|
# LANG: Inara API key label
|
||||||
this.apikey_label = nb.Label(frame, text=_('API Key')) # Inara setting
|
this.apikey_label = nb.Label(frame, text=_('API Key')) # Inara setting
|
||||||
this.apikey_label.grid(row=12, padx=x_padding, sticky=tk.W)
|
this.apikey_label.grid(row=12, padx=x_padding, sticky=tk.W)
|
||||||
this.apikey = nb.Entry(frame)
|
this.apikey = nb.Entry(frame, show="*", width=50)
|
||||||
this.apikey.grid(row=12, column=1, padx=x_padding, pady=y_padding, sticky=tk.EW)
|
this.apikey.grid(row=12, column=1, padx=x_padding, pady=y_padding, sticky=tk.EW)
|
||||||
|
|
||||||
prefs_cmdr_changed(cmdr, is_beta)
|
prefs_cmdr_changed(cmdr, is_beta)
|
||||||
|
|
||||||
|
show_password_var.set(False) # Password is initially masked
|
||||||
|
show_password_checkbox = nb.Checkbutton(
|
||||||
|
frame,
|
||||||
|
text="Show API Key",
|
||||||
|
variable=show_password_var,
|
||||||
|
command=toggle_password_visibility,
|
||||||
|
)
|
||||||
|
show_password_checkbox.grid(columnspan=2, padx=x_padding, pady=(5, 0), sticky=tk.W)
|
||||||
|
|
||||||
return frame
|
return frame
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ OutputDir=.
|
|||||||
LicenseFile=LICENSE
|
LicenseFile=LICENSE
|
||||||
AlwaysShowDirOnReadyPage=yes
|
AlwaysShowDirOnReadyPage=yes
|
||||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||||
|
MinVersion=6.2
|
||||||
|
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
@ -65,3 +66,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
[Registry]
|
||||||
|
; Create the registry key for the custom file type
|
||||||
|
Root: HKCR; Subkey: "edmc"; Flags: uninsdeletekey
|
||||||
|
; Create the registry values for the custom file type
|
||||||
|
Root: HKCR; Subkey: "edmc"; ValueType: string; ValueName: ""; ValueData: "{#MyAppName}"; Flags: uninsdeletevalue
|
||||||
|
Root: HKCR; Subkey: "edmc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"; Flags: uninsdeletevalue
|
||||||
|
Root: HKCR; Subkey: "edmc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletevalue
|
||||||
|
|
||||||
|
; Register the URL protocol handler
|
||||||
|
Root: HKCR; Subkey: "edmc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user