Skip to content

Commit

Permalink
Merge pull request #66 from fermiumlabs/winbuild
Browse files Browse the repository at this point in the history
Build for windows
  • Loading branch information
Natasha Proctor committed Jul 20, 2017
2 parents d55bc23 + 4262808 commit 71dc0f5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ __pycache__
*.swp
*.map
.idea/

*.log
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ before_install:
# - yarn install

script:
- yarn dockerdist
- yarn dockerdist:linux
- yarn dockerdist:win
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ A native app for [JupyterLab](https://github.com/jupyterlab/jupyterlab), based o

### Building for distribution

To test building for distribution install [Docker](https://docs.docker.com/engine/installation/) and run `yarn dockerdist` or `npm run dockerdist`
To test building for distribution install [Docker](https://docs.docker.com/engine/installation/) and run `yarn dockerdist:platform` or `npm run dockerdist:platform` where "platform"
is either "linux", "win" or "mac".
20 changes: 16 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@
"build:all": "npm run build && npm start",
"pack": "npm run build && electron-builder --dir",
"dist": "npm run build && electron-builder",
"dist:linux": "npm run build && electron-builder",
"dist:mac": "npm run build && electron-builder",
"dist:win": "npm run build && electron-builder",
"dockerdist": "docker run --rm -ti -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.electron:/root/.electron electronuserland/electron-builder:wine /bin/bash -c \"yarn && yarn dist:linux\""
"dist:linux": "npm run build && electron-builder --linux",
"dockerdist:linux": "docker run --rm -ti -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.electron:/root/.electron electronuserland/electron-builder:wine /bin/bash -c \"yarn && yarn dist:linux\"",
"dist:mac": "npm run build && electron-builder --macos",
"dockerdist:mac": "docker run --rm -ti -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.electron:/root/.electron electronuserland/electron-builder:wine /bin/bash -c \"yarn && yarn dist:mac\"",
"dist:win": "npm run build && electron-builder --win",
"dockerdist:win": "docker run --rm -ti -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.electron:/root/.electron electronuserland/electron-builder:wine /bin/bash -c \"yarn && yarn dist:win\"",
"dist:all": "npm run build && electron-builder --linux --win",
"dockerdist:all": "docker run --rm -ti -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.electron:/root/.electron electronuserland/electron-builder:wine /bin/bash -c \"yarn && yarn dist:all\""
},
"build": {
"productName": "JupyterLab App",
Expand All @@ -36,8 +40,16 @@
"Category": "Science;Development;"
}
},
"win": {
"target": ["nsis","portable"]
},
"rpm": {
"depends": ["libXScrnSaver"]
},
"nsis": {
"oneClick": "false",
"deleteAppDataOnUninstall": true,
"license": "LICENSE"
}
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class JupyterServer {
}
resolve(serverData);
});


/* Windows doesn't support exec */
if (process.platform !== "win32"){
this.nbServer.stdin.write('exec jupyter notebook --no-browser --port ' + port + '\n');
}
Expand Down

0 comments on commit 71dc0f5

Please sign in to comment.