Unverified Commit b69e0fb9 authored by Fernando Rodrigues's avatar Fernando Rodrigues Committed by GitHub
Browse files

unofficial-homestuck-collection: init at 2.7.2 (#395534)

parents 1925c58e 516785e5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -13332,6 +13332,14 @@
    matrix = "@kenran_:matrix.org";
    name = "Johannes Maier";
  };
  kenshineto = {
    name = "Freya Murphy";
    email = "contact@freyacat.org";
    matrix = "@freya:freya.cat";
    github = "kenshineto";
    githubId = 28487599;
    keys = [ { fingerprint = "D9AF 0A42 09B7 C2DE 11A8  84BF ACBC 5536 60D9 993D"; } ];
  };
  kentjames = {
    email = "jameschristopherkent@gmail.com";
    github = "KentJames";
+47 −0
Original line number Diff line number Diff line
From 9f69077286540c75a245b44f6fd7b7cd03da2d44 Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Sun, 20 Jul 2025 11:53:51 -0400
Subject: [PATCH 1/3] disable git rev check

---
 vue.config.js | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/vue.config.js b/vue.config.js
index 04b61d3..559b119 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,27 +1,12 @@
 const webpack = require('webpack')
 const { execSync } = require('child_process')

-const git_branch = execSync('git rev-parse --abbrev-ref HEAD').toString()
-
 var build_info = {
-  'process.env.BUILD_BRANCH': JSON.stringify(
-    git_branch.trim()
-  ),
+  'process.env.BUILD_BRANCH': "@git_branch@",
   'process.env.BUILD_DATE': JSON.stringify(new Date().toISOString()),
   'process.env.BUILD_PLATFORM': JSON.stringify(process.platform),
-  'process.env.BUILD_GIT_REVISION': JSON.stringify(
-    execSync('git rev-parse HEAD').toString().trim()
-  )
-}
-
-try {
-  const git_remote = execSync(`git config --get branch.${git_branch.trim()}.remote`).toString()
-  const git_remote_url = execSync(`git config --get remote.${git_remote.trim()}.url`).toString()
-
-  build_info['process.env.BUILD_GIT_REMOTE'] = JSON.stringify(git_remote_url.trim())
-} catch (e) {
-  build_info['process.env.BUILD_GIT_REMOTE'] = JSON.stringify("(no remote)")
-  console.warn("No git remote")
+  'process.env.BUILD_GIT_REVISION': "@git_revision@",
+  'process.env.BUILD_GIT_REMOTE': "@git_remote@",
 }

 module.exports = {
--
2.50.1
+63 −0
Original line number Diff line number Diff line
From 03ab3354eb9acb41c271238e7b9a5e77570809ae Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Sun, 20 Jul 2025 12:06:21 -0400
Subject: [PATCH 2/3] disable update check

---
 src/components/SystemPages/Settings.vue | 15 +++++++++------
 src/components/UIElements/Updater.vue   | 13 +------------
 2 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/src/components/SystemPages/Settings.vue b/src/components/SystemPages/Settings.vue
index 3371358..47c5ea6 100644
--- a/src/components/SystemPages/Settings.vue
+++ b/src/components/SystemPages/Settings.vue
@@ -598,12 +598,15 @@ export default {
           label: "Use system window decorations",
           desc: "Use OS-native window decorations instead of the electron title bar. <strong>Will restart the application.</strong>",
           platform_whitelist: ['electron']
-        }, {
-          model: "allowSysUpdateNotifs",
-          label: "Update notifications",
-          desc: "Unless this setting is disabled, the collection will check to see if there's a new version of the app available when it starts up and alert you if there is.",
-          platform_whitelist: ['electron']
-        }, {
+        },
+        // MOD: patch out update notifs
+        // {
+        //   model: "allowSysUpdateNotifs",
+        //   label: "Update notifications",
+        //   desc: "Unless this setting is disabled, the collection will check to see if there's a new version of the app available when it starts up and alert you if there is.",
+        //   platform_whitelist: ['electron']
+        // },
+        {
           model: "useTabbedBrowsing",
           label: "Tabbed Browsing",
           desc: "By default, the web app only shows one page at a time, like a standard website. This setting re-enables the in-app tab bar, and the app will store your tabs in settings.",
diff --git a/src/components/UIElements/Updater.vue b/src/components/UIElements/Updater.vue
index 6b3f677..d9bae45 100644
--- a/src/components/UIElements/Updater.vue
+++ b/src/components/UIElements/Updater.vue
@@ -73,18 +73,7 @@ export default {
   watch: {
   },
   mounted(){
-    const is_flatpak = !!(process.env.container)
-    if (this.$localData.settings.allowSysUpdateNotifs && !is_flatpak) {
-      const now = new Date()
-      const last_checked = new Date(this.$localData.settings.lastCheckedUpdate)
-      const one_day = (12 * 60 * 60 * 1000)
-      if (last_checked == "Invalid Date" || now - last_checked > one_day) {
-        this.doUpdateCheck()
-        this.$localData.settings.lastCheckedUpdate = now.toISOString()
-      } else {
-        this.$logger.info("Skipping update check, already checked", last_checked)
-      }
-    }
+    // MOD: patch out update check
   }
 }
 </script>
--
2.50.1
+101 −0
Original line number Diff line number Diff line
From 6be6ba5922363b478eca447135cd2421f8c598ab Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Sun, 20 Jul 2025 12:01:12 -0400
Subject: [PATCH 3/3] make compatible with native electron

---
 src/background.js                        | 15 +++++----------
 src/components/SystemPages/Settings.vue  | 12 +++++++-----
 src/components/UIElements/MediaEmbed.vue | 20 ++------------------
 3 files changed, 14 insertions(+), 33 deletions(-)

diff --git a/src/background.js b/src/background.js
index d75c5fc..6fa2256 100644
--- a/src/background.js
+++ b/src/background.js
@@ -314,16 +314,8 @@ if (assetDir === undefined) {
   is_first_run = true
 } else {
   try {
-    if (store.has('settings.ruffleFallback') && store.get('settings.ruffleFallback') === true) {
-      logger.info("Ruffle fallback enabled, disabling ppapi-level flash player")
-    } else {
-      // Pick the appropriate flash plugin for the user's platform
-      const flashPath = getFlashPath()
-
-      if (fs.existsSync(flashPath)) {
-        app.commandLine.appendSwitch('ppapi-flash-path', flashPath)
-      } else throw Error(`Flash plugin not located at ${flashPath}`)
-    }
+    // MOD: always use ruffle
+    logger.info("Ruffle fallback enabled, disabling ppapi-level flash player")

     if (store.has('settings.smoothScrolling') && store.get('settings.smoothScrolling') === false)
       app.commandLine.appendSwitch('disable-smooth-scrolling')
@@ -755,6 +747,9 @@ async function createWindow () {
     autoHideMenuBar: true,
     webPreferences: {
       nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
+      // MOD: disable isolation to get
+      // collection to work with electron 35
+      contextIsolation: false,
       enableRemoteModule: true,
       plugins: true,
       webviewTag: true
diff --git a/src/components/SystemPages/Settings.vue b/src/components/SystemPages/Settings.vue
index 47c5ea6..5630625 100644
--- a/src/components/SystemPages/Settings.vue
+++ b/src/components/SystemPages/Settings.vue
@@ -619,11 +619,13 @@ export default {
           label: "Reduce Motion",
           desc: "Attempts to reduce the amount of automatic motion in the comic by replacing animated gifs with a manual scrubber, and requiring an explicit click before playing Flash animations.",
           platform_whitelist: ['electron']
-        }, {
-          model: "ruffleFallback",
-          label: "Ruffle flash emulation fallback",
-          desc: "If the built-in flash player is non-functional, use the <a href='https://ruffle.rs/'>Ruffle</a> Flash emulator in place of Flash."
-        }
+        },
+        // MOD: always use ruffle
+        // {
+        //   model: "ruffleFallback",
+        //   label: "Ruffle flash emulation fallback",
+        //   desc: "If the built-in flash player is non-functional, use the <a href='https://ruffle.rs/'>Ruffle</a> Flash emulator in place of Flash."
+        // }
       ],
       retconList: [
         {
diff --git a/src/components/UIElements/MediaEmbed.vue b/src/components/UIElements/MediaEmbed.vue
index 760fec4..53f34ff 100644
--- a/src/components/UIElements/MediaEmbed.vue
+++ b/src/components/UIElements/MediaEmbed.vue
@@ -156,24 +156,8 @@ export default {
       return ret
     },
     ruffleEmbed() {
-      // At some point between 2025.3.14 and 2025.4.13 ruffle stopped supporting our old runtime. Damn. -->
-      if (this.$localData.settings.ruffleFallback) {
-        if (this.$isWebApp) {
-          return '<script src="https://unpkg.com/@ruffle-rs/ruffle"><\/script>'
-        } else {
-          // 0.1.0-nightly.2024.04.13 OK
-          // ...
-          // 0.1.0-nightly.2024.07.19 OK
-          // 0.1.0-nightly.2024.07.20 scale issue
-          // ...
-          // 0.1.0-nightly.2025.04.07 scale issue
-          // 0.1.0-nightly.2025.04.13 syntax issue
-          // return '<script src="https://unpkg.com/@ruffle-rs/ruffle@0.1.0-nightly.2024.7.19"><\/script>'
-          return `<script src="${this.$getResourceURL("assets://js/ruffle/ruffle.js")}"><\/script>`
-        }
-      } else {
-        return '<!-- Using real flash -->'
-      }
+      // MOD: always use ruffle
+      return `<script src="${this.$getResourceURL("assets://js/ruffle/ruffle.js")}"><\/script>`
     },
     flashSrc() {
       return `
--
2.50.1
+21 −0
Original line number Diff line number Diff line
directories:
  output: dist_electron
  buildResources: build
  app: dist_electron/bundled
files:
  - filter:
      - '**'
extends: null
appId: com.bambosh.unofficialhomestuckcollection
productName: The Unofficial Homestuck Collection
copyright: Copyright © 2025 GiovanH
protocols:
  name: Unofficial Homestuck Collection
  role: Viewer
  schemes:
    - mspa
linux:
  asarUnpack:
    - '**/*.node'
  maintainer: GiovanH <uhscollection@icloud.com>
  category: game
Loading