moonlight: 1.3.9 -> 1.3.12; moonlight: improved stuff and fixed updating

This commit is contained in:
ilys
2025-04-16 20:13:07 +02:00
parent c13d37adc3
commit 3d6298f1db
2 changed files with 100 additions and 9 deletions
@@ -0,0 +1,78 @@
diff --git a/packages/core-extensions/src/moonbase/host.ts b/packages/core-extensions/src/moonbase/host.ts
index 8903f41..e5c8709 100644
--- a/packages/core-extensions/src/moonbase/host.ts
+++ b/packages/core-extensions/src/moonbase/host.ts
@@ -79,22 +79,9 @@ electron.app.whenReady().then(() => {
if (!entries.find((e) => e.label === "moonlight")) {
const options: Electron.MenuItemConstructorOptions[] = [
- { label: "Update and restart", click: updateAndRestart },
{ label: "Reset config", click: resetConfig }
];
- if (moonlightHost.branch !== MoonlightBranch.DEV) {
- options.push({
- label: "Switch branch",
- submenu: [MoonlightBranch.STABLE, MoonlightBranch.NIGHTLY].map((branch) => ({
- label: branch,
- type: "radio",
- checked: moonlightHost.branch === branch,
- click: () => changeBranch(branch)
- }))
- });
- }
-
options.push({ label: "About", click: showAbout });
entries.splice(i + 1, 0, {
diff --git a/packages/core-extensions/src/moonbase/native.ts b/packages/core-extensions/src/moonbase/native.ts
index c6e068f..0adc765 100644
--- a/packages/core-extensions/src/moonbase/native.ts
+++ b/packages/core-extensions/src/moonbase/native.ts
@@ -39,24 +39,7 @@ export default function getNatives(): MoonbaseNatives {
return {
async checkForMoonlightUpdate() {
- try {
- if (moonlightGlobal.branch === MoonlightBranch.STABLE) {
- const json = await getStableRelease();
- return json.name !== moonlightGlobal.version ? json.name : null;
- } else if (moonlightGlobal.branch === MoonlightBranch.NIGHTLY) {
- const req = await fetch(nightlyRefUrl, {
- cache: "no-store",
- headers: sharedHeaders
- });
- const ref = (await req.text()).split("\n")[0];
- return ref !== moonlightGlobal.version ? ref : null;
- }
-
- return null;
- } catch (e) {
- logger.error("Error checking for moonlight update", e);
- return null;
- }
+ return null;
},
async updateMoonlight(overrideBranch?: MoonlightBranch) {
diff --git a/packages/core-extensions/src/moonbase/webpackModules/ui/config/index.tsx b/packages/core-extensions/src/moonbase/webpackModules/ui/config/index.tsx
index 302c610..2db7ecd 100644
--- a/packages/core-extensions/src/moonbase/webpackModules/ui/config/index.tsx
+++ b/packages/core-extensions/src/moonbase/webpackModules/ui/config/index.tsx
@@ -108,16 +108,6 @@ function ArrayFormItem({ config }: { config: "repositories" | "devSearchPaths" }
export default function ConfigPage() {
return (
<>
- <FormSwitch
- className={Margins.marginTop20}
- value={MoonbaseSettingsStore.getExtensionConfigRaw<boolean>("moonbase", "updateChecking", true) ?? true}
- onChange={(value: boolean) => {
- MoonbaseSettingsStore.setExtensionConfig("moonbase", "updateChecking", value);
- }}
- note="Checks for updates to moonlight"
- >
- Automatic update checking
- </FormSwitch>
<FormItem title="Repositories">
<FormText className={Margins.marginBottom4}>A list of remote repositories to display extensions from</FormText>
<ArrayFormItem config="repositories" />
+22 -9
View File
@@ -1,34 +1,46 @@
{
lib,
stdenv,
nodejs,
pnpm_9,
pnpm_10,
nodejs_22,
fetchFromGitHub,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "moonlight";
version = "1.3.9";
version = "1.3.14";
src = fetchFromGitHub {
owner = "moonlight-mod";
repo = "moonlight";
tag = "v${finalAttrs.version}";
hash = "sha256-WhPQ7JYfE8RBhDknBunKdW1VBxrklb3UGnMgk5LFVFA=";
hash = "sha256-FmQS8DqjgOyfEth8tpUlJoduo6rAv28PwLGv90J3rcM=";
};
nativeBuildInputs = [
nodejs
pnpm_9.configHook
nodejs_22
pnpm_10.configHook
];
pnpmDeps = pnpm_9.fetchDeps {
pnpmDeps = pnpm_10.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-KZFHcW/OVjTDXZltxPYGuO+NWjuD5o6HE/E9JQZmrG8=";
buildInputs = [ nodejs_22 ];
hash = "sha256-I+zRCUqJabpGJRFBGW0NrM9xzyzeCjioF54zlCpynBU=";
};
env = {
NODE_ENV = "production";
MOONLIGHT_BRANCH = "stable";
MOONLIGHT_VERSION = "v${finalAttrs.version}";
};
patches = [
./disable_updates.patch
];
buildPhase = ''
runHook preBuild
@@ -55,7 +67,8 @@ stdenv.mkDerivation (finalAttrs: {
All core code is original or used with permission from their respective authors where not copyleft.
'';
homepage = "https://moonlight-mod.github.io";
changelog = "https://github.com/moonlight-mod/moonlight/blob/main/CHANGELOG.md";
downloadPage = "https://moonlight-mod.github.io/using/install/#nix";
changelog = "https://raw.githubusercontent.com/moonlight-mod/moonlight/refs/tags/v${finalAttrs.version}/CHANGELOG.md";
license = licenses.lgpl3;
maintainers = with maintainers; [