Giter VIP home page Giter VIP logo

reforged's Issues

Drop `fs.promises.cp` use.

Running the latest Webcord AppImage gives the following error

/tmp/.mount_WebCorGCZ75f/usr/bin//../lib/webcord/webcord: error while loading shared libraries: libffmpeg.so: cannot open shared object file: No such file or directory

Launching the AppImage gives an error

$ chmod +x Arena\ Returns\ Launcher-1.0.5-SNAPSHOT-x64.AppImage
$ ./Arena\ Returns\ Launcher-1.0.5-SNAPSHOT-x64.AppImage
/tmp/.mount_Arena WAWNn4/usr/bin//arena-returns-launcher: line 2: /tmp/.mount_Arena WAWNn4/usr/bin//../lib/arena-returns-launcher/arena-returns-launcher: No such file or directory

Code used: https://github.com/ArenaReturns/Launcher/ (branch master, yarn install && yarn make)
AppImage file: https://transfer.sh/MLVImL/Arena%20Returns%20Launcher-1.0.5-SNAPSHOT-x64.AppImage

Thanks in advance and Merry Christmas !

Makers breaks with Forge v7.0.0, due to outdated base.

Using node v20.10.0 or v18.18.2 I create a fresh Electron project with the following steps:

npm init electron-app@latest myapp
cd myapp
yarn add --dev @reforged/maker-appimage
npm run make -- --targets "@reforged/maker-appimage"

and I got:

An unhandled rejection has occurred inside Forge:
TypeError: maker.clone is not a function
at ~/myapp/node_modules/@electron-forge/core/dist/api/make.js:120:45
    at ~/myapp/node_modules/@electron-forge/core/dist/api/make.js:181:43
    at async Task.task (~/myapp/node_modules/@electron-forge/tracer/dist/index.js:58:20)
    at async Task.run (~/myapp/node_modules/listr2/dist/index.cjs:978:11)
    at async ~/myapp/node_modules/p-map/index.js:57:22

Please let me know if extra information is needed or if I'm missing additional steps. Thanks!

All `s` are replaced by `\\s` in the generated .desktop

Using this maker config :

{
    "name": "@reforged/maker-appimage",
    "platforms": [
        "linux"
    ],
    "config": {
        "options": {
            "name": "arena-returns-launcher",
            "icon": "src/assets/icon/icon.png",
            "categories": [
                "Game",
                "StrategyGame"
            ]
        }
    }
}

All "s" in the generated .desktop are replaced by "\\s". I saw that the appimage wouldn't start, so I extracted it and looked at the .desktop and saw this:

[Desktop Entry]
Type=Application
Name=Arena Return\\s Launcher
Exec=arena-return\\s-launcher
Icon=arena-return\\s-launcher
Categorie\\s=Game;StrategyGame;
X-AppImage-Name=arena-return\\s-launcher
X-AppImage-Ver\\sion=1.0.5-SNAPSHOT
X-AppImage-Arch=x86_64

This is probably caused by

.replaceAll("\s", "\\s")

"Invalid icon" error when `icon` undefined

Omitting the icon property from options causes the build to fail.

[oold@PC11319 my-electron-app]$ yarn run make
yarn run v1.22.19
$ electron-forge make
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets: AppImage
✔ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
      ✔ [plugin-webpack] Preparing native dependencies: 1 / 1
      ✔ [plugin-webpack] Building webpack bundles
  ✔ Packaging application
    ✔ Packaging for x64 on linux [3s]
  ✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
  ✖ Making a AppImage distributable for linux/x64
    › Invalid icon / icon path.
◼ Running postMake hook
(node:1094) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

An unhandled rejection has occurred inside Forge:
Error: Invalid icon / icon path.
at MakerAppImage.make (/home/oold/my-electron-app/node_modules/@reforged/maker-appimage/src/main.ts:216:26)
    at Task.task (/home/oold/my-electron-app/node_modules/@electron-forge/core/src/api/make.ts:268:51)
    at Task.run (/home/oold/my-electron-app/node_modules/listr2/dist/index.cjs:978:35)

Overriding the shell script?

Hi!

Thank you so much for building this AppImage maker.

I'm in the process of porting a project from electron-webpack to forge and AppImages were definitely one of the trickier "missing bits"

One thing I can't figure out how to do is to inject a custom shell script in as the launcher for the electron app. Is that something there's a way to do?

When we used electron-builder, they had a hook in between building the content of the AppImage and the final packaging we could hook into.

Thanks!

`mksquashfs` errors since both `SOURCE_DATE_EPOCH` and `-all-time`/`mkfs-time` flags are set

Summary

mksquashfs version 4.4+ will throw a error if both the SOURCE_DATE_EPOCH environment variable and -all-time/-mkfs-time flags are set.

This is an issue since this package will always add the -all-time/-mkfs-time flags. If the intention is to always set the -all-time/-mkfs-time flags then the SOURCE_DATE_EPOCH environment variable should not be passed when mksquash version 4.4+ is being used.

Also, if possible, can the stderr be printed out when a non-zero exit code is returned by mksquashfs? An error code of 1 gets returned for the error mentioned above which made it difficult to track down the root cause. Potentially something like this? This hasn't been tested yet.

mkSquashFS.on("close", (...args) => {
  mkSquashFS.stderr.pipe(process.stderr)
  event.emit("close",...args)
});

Additional Resources

Make download URL configurable

Currently the the download URL for the AppImage runtime is hard-coded.
For some reason my CI recently experiences sporadic ECONNRESET and ETIMEDOUT errors while downloading files from Github.

To fix this, I propose to make the download URL configurable via environment variable, similar to what Electron provides: https://www.electronjs.org/docs/latest/tutorial/installation#custom-mirrors-and-caches
This allows me to set up a cache/mirror that matches my availability requirements.

I can contribute the changes as PR if you agree with the proposed change.

`maker-appimage` fails to build on `squashfs-tools<4.4`

Running electron-forge make fails to create the AppImage file:

[oold@PC11319 my-electron-app]$ yarn run make
yarn run v1.22.19
$ electron-forge make
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets: AppImage
✔ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
      ✔ [plugin-webpack] Preparing native dependencies: 1 / 1
      ✔ [plugin-webpack] Building webpack bundles
  ✔ Packaging application
    ✔ Packaging for x64 on linux [3s]
  ✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
  ✖ Making a AppImage distributable for linux/x64
    › ENOENT: no such file or directory, open '/home/oold/my-electron-app/out/make/AppImage/x64/my-electron-app-0.0.0…
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
Error: ENOENT: no such file or directory, open '/home/oold/my-electron-app/out/make/AppImage/x64/my-electron-app-0.0.0-x64.AppImage'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.