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

build with platform and arch arguments doesn't build package #267

Closed
d9k opened this issue Mar 25, 2016 · 10 comments · May be fixed by qcif/data-curator#563
Closed

build with platform and arch arguments doesn't build package #267

d9k opened this issue Mar 25, 2016 · 10 comments · May be fixed by qcif/data-curator#563

Comments

@d9k
Copy link

d9k commented Mar 25, 2016

electron-builder versions: at least 3.0.1 and 2.10.1.

windows 7 x64
npm v 2.14.20
node v 4.4.0

two package.json layout, outer package.json:

{
  "license": "proprietary",
  "private": true,
  "build": {
    "win": {
      "extraResources": [
        "./*.dll",
        "printsupport",
        "platforms"
      ],
      "noMsi": true,
      "app-bundle-id": "ru.orbilet.orbiletClient",
      "app-category-type": "public.app-category.business",
      "iconUrl": "http://rghost.net/download/private/8MZF2wPky/4b51dc91c2b4c7d0a27417e384c26080/60f3daf2eb6a28a2c3402ab4ad0f98346bf61660/60f3daf2eb6a28a2c3402ab4ad0f98346bf61660/OrbiletClient.ico"      
    }
  },
  "scripts": {
    "postinstall": "install-app-deps",
    "start": "./node_modules/.bin/electron app",
    "dist": "./node_modules/.bin/build",
    "dist:win": "./node_modules/.bin/build --platform win32",
    "dist:x64": "./node_modules/.bin/build --arch x64",
    "dist:win64": "./node_modules/.bin/build --platform win32 --arch x64"
  },
  "devDependencies": {
    "babel-cli": "^6.6.4",
    "babel-core": "^6.6.4",
    "babel-preset-es2015": "^6.6.0",
    "babel-preset-react": "^6.5.0",
    "babel-preset-stage-0": "^6.5.0",
    "babelify": "^7.2.0",
    "browserify": "^12.0.1",
    "electron-builder": "^3.0.1",
    "electron-prebuilt": "^0.36.0",
    "gulp": "^3.9.1",
    "gulp-babel": "^6.1.2",
    "gulp-concat": "^2.6.0",
    "gulp-notify": "^2.2.0",
    "gulp-sourcemaps": "^1.6.0",
    "gulp-util": "^3.0.7",
    "vinyl-source-stream": "^1.1.0",
    "watchify": "^3.6.1",
    "winreg": "0.0.13"
  }
}

npm run dist builds ./dist/MyApp-win32-ia32, ./dist/MyApp-win32-x64 with unpackaged version and ./dist/win, ./dist/win-x64 with packaged.

npm run dist:win64 ("build --platform win32 --arch x64") builds directory ./dist/MyApp-win32-x64 only, where non-packaged app is located.

@develar
Copy link
Member

develar commented Mar 25, 2016

Why do you need to have dist:win64 and dist:win? Maybe electron-builder by default should build only current arch, but not all?

@d9k
Copy link
Author

d9k commented Mar 25, 2016

@develar, no, build with no arguments builds 32-bit arch too and it takes much time

npm run dist builds ./dist/MyApp-win32-ia32, ./dist/MyApp-win32-x64 with unpackaged version and ./dist/win, ./dist/win-x64 with packaged.

@develar
Copy link
Member

develar commented Mar 25, 2016

@d9k I think we should change this behaviour and by default build only current arch. Do you agree?

@d9k
Copy link
Author

d9k commented Mar 25, 2016

@develar I agree but packaged version (squirrel installer) must be built too.
But question is: why any argument passed to build cancels installer build (only non-packaged version is being build)? No warnings or errors. I can give you build logs if you tell me how to make them.

@develar
Copy link
Member

develar commented Mar 25, 2016

Well, yes, it seems it is a bug. Will be investigated and fixed.

I agree

Ok, so, it will be implemented. win 32/linux 32 in any case doesn't make any sense in most cases.

@develar
Copy link
Member

develar commented Mar 25, 2016

It is not a bug. If script is not named as dist, --dist flag is not implied, and, so, you must pass it explicitly. Well, I will improve lifecycle event support — prefix dist: will be also as marker to package in a distributable format.

@d9k
Copy link
Author

d9k commented Mar 28, 2016

Thanks! You improved our workflow enormously!
Awesome support!

@develar
Copy link
Member

develar commented Mar 28, 2016

We can also support magic script names like dist:${platformName}${arch}

dist:win64 (implies --dist --platform win32)

but... it is not yet clear for me how does it important (since we by default build only current arch). And it can be too magical. Feel free to propose.

Awesome support!

Thanks :)

@d9k
Copy link
Author

d9k commented Mar 28, 2016

@develar thanks, I think it's already very usable ;)

@almahdi404
Copy link

for windows 32 bit arch

"scripts": {
  "dist-win": "electron-builder --win --ia32"
}

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

Successfully merging a pull request may close this issue.

3 participants