Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default screen when building app #70

Closed
dietlev opened this issue Nov 19, 2015 · 6 comments
Closed

Default screen when building app #70

dietlev opened this issue Nov 19, 2015 · 6 comments

Comments

@dietlev
Copy link

dietlev commented Nov 19, 2015

Hey all,

I created a small app using Electron, which is working just fine.
However, when I try to build it, I get some weird results.

The building itself works fine, but when I open the .app, I see the "Welcome to Electron" title instead of the app.

screen shot 2015-11-19 at 11 02 07

I created a repo here with just the basic files, and I get the same results:
https://github.com/dietlev/electron-build-demo

I'm on
OS X 10.10.5
node v5.1.0
npm 3.4.0

Am I missing something here?
Thanks in advance

@stefanjudis
Copy link
Contributor

@dietlev

Still having problems here?
Will have a look at it today - if so. :bowtie:

@dietlev
Copy link
Author

dietlev commented Nov 25, 2015

Good morning ( in Belgium )
Yes, I still have the same issue. My app is finished, just the building part is not working properly.

Thanks in advance :)

@stefanjudis
Copy link
Contributor

Cool. 👍

But I shall still check https://github.com/dietlev/electron-build-demo ?

@dietlev
Copy link
Author

dietlev commented Nov 25, 2015

Yes, if that's working I can see where the actual app is going wrong

@stefanjudis
Copy link
Contributor

okidoki. 👍 I'll have a look around 1pm. :)

@stefanjudis
Copy link
Contributor

@dietlev

The problem appears already in electron-packager, right?
That's what I noticed - point is that you're missing a package.json in your app folder.

From the electron docs.

Main Process
In Electron, the process that runs package.json's main script is called the main process. The script that runs in the main process can display a GUI by creating web pages.

So with this package.json in root of your dummy demo project ( I updated also electron-packager )

{
  "name": "ElectronTest",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "dev": "electron ./app",
    "clean": "rm -rf ./dist",
    "clean:osx": "rm -rf ./dist/osx",
    "clean:win": "rm -rf ./dist/win",
    "build": "npm run clean && npm run build:osx && npm run build:win",
    "build:osx": "npm run clean:osx && electron-packager ./app LooplineSystems --out=dist/osx --platform=darwin --arch=x64 --version=0.25.3 --icon=assets/osx/loopline.icns",
    "pack": "npm run pack:osx && npm run pack:win",
    "pack:osx": "npm run build:osx && electron-builder \"dist/osx/LooplineSystems-darwin-x64/LooplineSystems.app\" --platform=osx --out=\"dist/osx\" --config=packager.json"
  },
  "dependencies": {
    "electron-builder": "^2.0.0",
    "electron-packager": "^5.0.0",
    "electron-prebuilt": "^0.35.0"
  }
}

and this dummy package.json in app folder

{
  "name": "app",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "MIT"
}

your demo app in development, the .app and .dmg run fine.

I'm closing here - feel free to reopen if you have still troubles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants