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

Start desktop implementation with nw.js (#129) #181

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bd15dc8
Start desktop implementation with nw.js (#129)
pbek Jul 30, 2021
cb14c2e
Remove unnecessary build script (#129)
pbek Jul 30, 2021
c0453b7
Kill app server when desktop app exits (#129)
pbek Jul 30, 2021
de5085c
Ignore recursive symlinked "apps/grid/apps" directory (#129, #181)
pbek Jul 31, 2021
1720b8d
Add @gridspace/app-server as dependency so it gets added to the deskt…
pbek Jul 31, 2021
9324499
Add icon settings (#129)
pbek Jul 31, 2021
56d7268
Add run scripts (#129)
pbek Aug 1, 2021
ad50093
Remove unnecessary path (#129)
pbek Aug 1, 2021
2ef0b7a
Use some high port, so it doesn't collide with other services (#129)
pbek Aug 1, 2021
352391f
Add build action for the desktop apps (#129)
pbek Aug 3, 2021
1477cb7
Fix build command (#129)
pbek Aug 3, 2021
9dfda26
Improve storage actions (#129)
pbek Aug 3, 2021
da00810
Add npm cache (#129)
pbek Aug 3, 2021
9c40038
Add variable assignment (#129)
pbek Aug 3, 2021
5cb62ef
Create zip file before uploading (#129)
pbek Aug 3, 2021
53516a7
Don't use zip extension because it will already be added (#129)
pbek Aug 4, 2021
8bcb275
Ignore more directories (#129)
pbek Aug 4, 2021
9585a64
Fix ignores (#129)
pbek Aug 4, 2021
a2b23b8
Add wine installation
pbek Aug 6, 2021
c82cc2a
Fix package name
pbek Aug 6, 2021
04394ca
Try other package name
pbek Aug 6, 2021
37fd34b
Install wine gecko
pbek Aug 6, 2021
1c025cf
Try 64bit wine-gecko
pbek Aug 6, 2021
f9389cb
Build for 64bit Windows
pbek Aug 6, 2021
eda711b
Test building under Windows
pbek Aug 6, 2021
4f11512
Use bash
pbek Aug 6, 2021
ce012d3
Fix config
pbek Aug 6, 2021
384313a
Try to fix Windows build process
pbek Aug 6, 2021
b32af28
Fix config
pbek Aug 6, 2021
bdb4487
Try to replace "grid-apps" with "kiri-moto" at build time
pbek Aug 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Desktop App

on:
push:
branches: [ master, feature/nwjs ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# - name: Install wine
# run: sudo apt-get install wine
# - name: Install wine gecko
# run: |
# wget http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86_64.msi
# wine msiexec /i wine-gecko-2.47.2-x86_64.msi
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- id: set_var
shell: bash
run: |
sed -i 's/"name": "grid-apps"/"name": "kiri-moto"/g' package.json
content=`cat ./package.json`
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of optional handling for multi line json
echo "::set-output name=packageJson::$content"
- run: |
echo "${{fromJson(steps.set_var.outputs.packageJson).name}}"
echo "${{fromJson(steps.set_var.outputs.packageJson).version}}"
shell: bash
- name: Build App
shell: bash
run: |
npm install
npm run build:nw
- uses: actions/upload-artifact@v2
name: Store Linux x64
with:
name: kiri-moto-linux-x64
path: dist/${{fromJson(steps.set_var.outputs.packageJson).name}}-${{fromJson(steps.set_var.outputs.packageJson).version}}-linux-x64.zip
- uses: actions/upload-artifact@v2
name: Store Linux x86
with:
name: kiri-moto-linux-x86
path: dist/${{fromJson(steps.set_var.outputs.packageJson).name}}-${{fromJson(steps.set_var.outputs.packageJson).version}}-linux-x86.zip
- uses: actions/upload-artifact@v2
name: Store macOS x86
with:
name: kiri-moto-mac-x64
path: dist/${{fromJson(steps.set_var.outputs.packageJson).name}}-${{fromJson(steps.set_var.outputs.packageJson).version}}-mac-x64.zip
- uses: actions/upload-artifact@v2
name: Store Windows x64
with:
name: kiri-moto-win-x64
path: dist/${{fromJson(steps.set_var.outputs.packageJson).name}}-${{fromJson(steps.set_var.outputs.packageJson).version}}-win-x64.zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules
package-lock.json
logs/*
data/*
dist/*
86 changes: 86 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
"author": "Stewart Allen <[email protected]>",
"license": "MIT",
"private": false,
"main": "http://localhost:8080/kiri/",
"node-remote": "http://localhost:8080/kiri/",
"node-main": "",
"window": {
"width": 960,
"height": 700,
"min_width": 700,
"min_height": 500,
"icon": "web/meta/favicon-mobile.png"
},
"repository": {
"type": "git",
"url": "https://github.com/gridspace/apps.git"
Expand All @@ -21,6 +31,7 @@
"slicer"
],
"dependencies": {
"@gridspace/app-server": "^0.0.7",
"base64-js": "^1.5.1",
"buffer-crc32": "^0.2.13",
"compression": "^1.7.4",
Expand All @@ -36,5 +47,80 @@
"uglify-es": "3.3.9",
"validator": "^8.2.0",
"ws": "^7.2.3"
},
"devDependencies": {
"concurrently": "^6.2.0",
"nw": "0.54.0-sdk",
"nwjs-builder-phoenix": "^1.15.0",
"rimraf": "^3.0.2",
"wait-on": "^5.3.0"
},
"scripts": {
"debug": "gs-app-server --debug",
"server": "gs-app-server",
"start": "concurrently -k \"npm run debug\" \"wait-on http://localhost:8080/kiri/ && nw .\"",
"build": "npm run build:clean && npm run build:nw",
"build:clean": "rimraf ./dist",
"build:nw": "build --concurrent --tasks win-x64,linux-x86,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ .",
"build:win": "npm run build:win:clean && build --tasks win-x64 --mirror https://dl.nwjs.io/ .",
"build:lin": "npm run build:lin:clean && build --tasks linux-x64 --mirror https://dl.nwjs.io/ .",
"build:win:clean": "rimraf ./dist/grid-apps-3.0.15D-win-x64 ./dist/grid-apps-3.0.15D-win-x86.zip ./dist/grid-apps-3.0.15D-win-x86.7z ./dist/grid-apps-3.0.15D-win-x86-Setup.exe",
"build:lin:clean": "rimraf ./dist/grid-apps-3.0.15D-linux-x64 ./dist/grid-apps-3.0.15D-linux-x64.zip",
"run:win": "dist\\grid-apps-3.0.15D-win-x86\\grid-apps.exe",
"run:lin": "./dist/grid-apps-3.0.15D-linux-x64/grid-apps",
"nw": "nw ."
},
"build": {
"nwVersion": "v0.54.0",
"nwFlavor": "normal",
"targets": [
"zip"
],
"files": [
"**/*"
],
"excludes": [
"src/**",
"logs/**",
"apps/grid/apps/**",
"apps/grid/node_modules/nwjs-builder-phoenix/caches/**",
"apps/grid/dist/**",
"apps/grid/logs/**",
"apps/grid/node_modules/**",
"web/**"
],
"strippedProperties": [
"ManifestComments",
"scripts",
"devDependencies",
"build"
],
"overriddenProperties": {
"main": "http://localhost:19757/kiri/",
"node-remote": "http://localhost:19757/kiri/",
"node-main": "./server.js",
"window": {
"width": 960,
"height": 700,
"min_width": 700,
"min_height": 500,
"icon": "web/meta/favicon-mobile.png"
},
"win": {
"icon": "web/meta/favicon.ico"
},
"mac": {
"icon": "web/meta/favicon-mobile.png"
},
"nsis": {
"icon": "web/meta/favicon.ico",
"unIcon": "web/meta/favicon.ico",
"languages": [
"English"
],
"diffUpdaters": false,
"hashCalculation": true
}
}
}
}
5 changes: 5 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node

// use some high port, so it doesn't collide with other services
// debug was needed to actually run the app
require('@gridspace/app-server/app-server.js')({'port': 19757, 'debug': true});