Skip to content

Failing with release 3.16.0 #2

Description

@aeschbacher

The script fails with release 3.16.0, mainly because 7z fails to extract BluOS-Controller-3.16.0.dmg.

@andmarti1424 proposed another approach of using the Windows .exe instead of the macos .dmg and shared a way of extracting.

I followed this idea and could successfully build the AppImage for Linux. I do not have the time to provide a patch, but in this issue I'll explain how I got it running.

description

  • download BluOS-Controller-Setup-3.16.0.exe
  • extract whole archive (not only app.asar):
    archive=BluOS-Controller-Setup-3.16.0.exe
    7zr x "${archive}" -o"${tmp}"
  • install node, yarn, electron-builder, npx:
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
    nvm install --lts
    nvm use --lts
    corepack enable
    yarn add electron-builder js-beautify npx --dev
  • unpack asar
    npx asar extract "$tmp/resources/app.asar" "$tmp/app"
    cd "$tmp/app"
  • patches
    • www/app.js
      npx js-beautify -r www/app.js
      # I applied usual patch manually to www/app.js
    • add analytics/fire-base.html as extra resources (application does not start without)
      mkdir resources
      cp -a ../resources/analytics resources/
    • Modify packages.json to add extra resource into AppImage
      diff -uN package-bak.json package.json
      --- package-bak.json	2021-12-11 15:08:44.213526221 +0100
      +++ package.json	2021-12-11 14:48:04.696173123 +0100
      @@ -24,5 +24,17 @@
           "electron": "^9.4.4",
           "electron-builder": "^22.14.5",
           "js-beautify": "^1.14.0"
      +  },
      +  "build": {
      +    "appId": "com.bluos.app",
      +    "extraResources": [
      +      {
      +        "from": "resources",
      +        "to": ".",
      +        "filter": [
      +          "**/*"
      +        ]
      +      }
      +    ]
        }
      }
      
  • rebuild
    npx electron-builder -l AppImage

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions