electron / forge

:electron: A complete tool for building and publishing Electron applications
https://electronforge.io
MIT License
6.45k stars 513 forks source link

electron-forge@6.0.0 release or build from source #484

Closed mkndn closed 6 years ago

mkndn commented 6 years ago

I'm currently using electron-forge@5.1.2 and i'm facing lot of issues with electron-compile. I can see that electron-compile dependency has been removed in version 6.0.0 Is it going to be released anytime soon or can i build it from source. If so, can someone point me in the right direction.

MarshallOfSound commented 6 years ago

@mani0608 It is already released but tagged as beta and in a new namespace. There aren't many docs and we aren't officially supporting it yet.

If you want to try figure it out you can check out the docs folder of this repository and use the modules in the @electron-forge namespace on npm.

mkndn commented 6 years ago

I'm getting the following error while trying to install @electron-forge/publisher-electron-release-server

npm ERR! notarget No matching version found for @electron-forge/publisher-base@6.0.0-beta.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of '@electron-forge/publisher-electron-release-server'
mkndn commented 6 years ago

Same issue with

publisher-github publisher-s3 and publisher-snapcraft

MarshallOfSound commented 6 years ago

Heh yeah, gimme a sec I fixed that bug but didn't have time to publish new versions 😄

MarshallOfSound commented 6 years ago

6.0.0-beta.2 for all dependencies should fix this issue. Please not with 6.0.0 we expect all forge dependencies to have the same version 👍

mkndn commented 6 years ago

Oh no, I just dropped you an email on this :) Thank you very much 👍

mkndn commented 6 years ago

When do you please to release beta.2 Because i have to plan my work accordingly and update my clients

MarshallOfSound commented 6 years ago

beta.2 is out, it's tagged as a beta though so you'll need to install it explicitly. npm i @electron-forge/cli@6.0.0-beta.2

mkndn commented 6 years ago

OK Thank you. I believe the npm page is not reflecting the latest version (beta.2) (FYI)

malept commented 6 years ago

It's because it's tagged as beta, not latest. You'll see it if you run, for example, npm view @electron-forge/core.

mkndn commented 6 years ago

@malept Thank you. I realized that later after looking at @MarshallOfSound post above. The packaging takes some time but apart from that it works just fine. But it seems like there are some issues with make. I got the following output in my console,

| Packaging Application  electron-forge:hook hook triggered: postPackage +9m
√ Packaging Application
Making for the following targets:
  electron-forge:hook hook triggered: preMake +0ms
  electron-forge:hook hook triggered: postMake +0ms

Make process completed within seconds after a very long packaging. But i couldn't find the installer exe anywhere. Previously it is used to be created under 'out' directory. But now its not there

--skip-package for make? That's brilliant!!

Both

electron-forge make --platform=win32 --arch=x64 --skip-package
and
electron-forge make --platform=win32 --arch=x64 

aren't working

malept commented 6 years ago

The config changed between v5 and v6 to accommodate the new architecture. That's one of the things that still needs to get documented.

mkndn commented 6 years ago

I believe by config you mean the forge config Is it something i need to wait for? Or can you please guide me accordingly. I'm really thankful for all the support you are providing here.

malept commented 6 years ago

I personally don't remember what the new syntax is, I would need to read the code to do that and I'm a bit busy at the moment.

mkndn commented 6 years ago

OK no problem. Please paste the new syntax here when you get to know about it.

malept commented 6 years ago

You can see what the new Forge config syntax is by creating a new Electron app:


npx --ignore-existing @electron-forge/cli@6.0.0-beta.2 init path/to/project
mkndn commented 6 years ago

Incredible!! Thank you

mkndn commented 6 years ago

I ran the script

npx --ignore-existing @electron-forge/cli@6.0.0-beta.2 init path/to/project

to create a sample project but surprised to see the dependencies in package.json

"dependencies": {
    "electron-squirrel-startup": "^1.0.0"
  },
  "devDependencies": {
    "electron": "1.8.4",
    "electron-forge": "^5.2.0"
  }

Its still using the old electron-forge version?

Pasting the forge config below in case someone needs it,

"config": {
    "forge": {
      "packagerConfig": {},
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "platforms": [
            "win32"
          ],
          "config": {
            "name": "sample_app"
          }
        },
        {
          "name": "@electron-forge/maker-zip",
          "platforms": [
            "darwin"
          ]
        },
        {
          "name": "@electron-forge/maker-deb",
          "platforms": [
            "linux"
          ],
          "config": {}
        },
        {
          "name": "@electron-forge/maker-rpm",
          "platforms": [
            "linux"
          ],
          "config": {}
        }
      ]
    }
  }
mkndn commented 6 years ago

It worked. I got the exe version that i wanted. I just have one last question. I can see the setup (exe) file on double-click unpacks the app to c:...\AppData\Local\ Is there anyway i can make the user to select the path like the regular windows exe does?

MarshallOfSound commented 6 years ago

Is there anyway i can make the user to select the path like the regular windows exe does?

No, this is in direct violation of what Squirrel.Windows aims to do, their should be no user interaction during an install. Everything should Just Work(tm)

mkndn commented 6 years ago

I understand and apologies for repeated questions. Do you plan to make it "Configurable" in upcoming versions? I did already go through the configurations for electron-winstaller and i can see only appDirectory (electron app directory) and outputDirectory (generated exe file directory) options.

MarshallOfSound commented 6 years ago

Do you plan to make it "Configurable" in upcoming versions?

Currently, no

mkndn commented 6 years ago

Ok thanks. Appreciate your help and support