Merge branch 'split-builder-config' into 'master'
Split builder config See merge request openflexure/openflexure-microscope-jsclient!11
This commit is contained in:
commit
59fba035d4
13 changed files with 81 additions and 89 deletions
13
app/builder-config-appx.yaml
Normal file
13
app/builder-config-appx.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
extends: app/builder-config-base.yaml
|
||||||
|
win:
|
||||||
|
target:
|
||||||
|
- NSIS
|
||||||
|
- appx
|
||||||
|
icon: app/icons/win/icon.ico
|
||||||
|
appx:
|
||||||
|
applicationId: OpenFlexureEV
|
||||||
|
identityName: 60425J.T.Collins.OpenFlexureeV
|
||||||
|
publisher: CN=CC867BEF-0715-4D48-8035-8881993DBB68
|
||||||
|
publisherDisplayName: J. T. Collins
|
||||||
|
backgroundColor: '#C5247F'
|
||||||
|
electronVersion: 4.1.5
|
||||||
|
|
@ -25,29 +25,3 @@ files:
|
||||||
- '!**/platforms${/*}'
|
- '!**/platforms${/*}'
|
||||||
- '!**/release-builds${/*}'
|
- '!**/release-builds${/*}'
|
||||||
- '!src${/*}'
|
- '!src${/*}'
|
||||||
mac:
|
|
||||||
icon: app/icons/mac/icon.icns
|
|
||||||
category: public.app-category.utilities
|
|
||||||
dmg:
|
|
||||||
contents:
|
|
||||||
- x: 110
|
|
||||||
y: 150
|
|
||||||
- x: 240
|
|
||||||
y: 150
|
|
||||||
type: link
|
|
||||||
path: /Applications
|
|
||||||
linux:
|
|
||||||
target:
|
|
||||||
- AppImage
|
|
||||||
- target: deb
|
|
||||||
arch:
|
|
||||||
- x64
|
|
||||||
- armv7l
|
|
||||||
icon: app/icons/png/1024x1024.png
|
|
||||||
deb:
|
|
||||||
category: Science
|
|
||||||
win:
|
|
||||||
target:
|
|
||||||
- NSIS
|
|
||||||
icon: app/icons/win/icon.ico
|
|
||||||
electronVersion: 4.1.5
|
|
||||||
13
app/builder-config-dmg.yaml
Normal file
13
app/builder-config-dmg.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
extends: app/builder-config-base.yaml
|
||||||
|
mac:
|
||||||
|
icon: app/icons/mac/icon.icns
|
||||||
|
category: public.app-category.utilities
|
||||||
|
dmg:
|
||||||
|
contents:
|
||||||
|
- x: 110
|
||||||
|
y: 150
|
||||||
|
- x: 240
|
||||||
|
y: 150
|
||||||
|
type: link
|
||||||
|
path: /Applications
|
||||||
|
electronVersion: 4.1.5
|
||||||
12
app/builder-config-linux.yaml
Normal file
12
app/builder-config-linux.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
extends: app/builder-config-base.yaml
|
||||||
|
linux:
|
||||||
|
target:
|
||||||
|
- AppImage
|
||||||
|
- target: deb
|
||||||
|
arch:
|
||||||
|
- x64
|
||||||
|
icon: app/icons/png/1024x1024.png
|
||||||
|
category: Science
|
||||||
|
deb:
|
||||||
|
category: Science
|
||||||
|
electronVersion: 4.1.5
|
||||||
12
app/builder-config-raspi.yaml
Normal file
12
app/builder-config-raspi.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
extends: app/builder-config-base.yaml
|
||||||
|
linux:
|
||||||
|
target:
|
||||||
|
- AppImage
|
||||||
|
- target: deb
|
||||||
|
arch:
|
||||||
|
- armv7l
|
||||||
|
icon: app/icons/png/1024x1024.png
|
||||||
|
category: Science
|
||||||
|
deb:
|
||||||
|
category: Science
|
||||||
|
electronVersion: 3.0.13
|
||||||
|
|
@ -1,39 +1,6 @@
|
||||||
directories:
|
extends: app/builder-config-base.yaml
|
||||||
output: release-builds
|
|
||||||
buildResources: app/resources
|
|
||||||
appId: org.openflexure.ev
|
|
||||||
artifactName: ${name}-${os}-${arch}.${ext}
|
|
||||||
asar: true
|
|
||||||
files:
|
|
||||||
- filter:
|
|
||||||
- '**/*'
|
|
||||||
- '!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}'
|
|
||||||
- '!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}'
|
|
||||||
- '!**/node_modules/*.d.ts'
|
|
||||||
- '!**/node_modules/.bin'
|
|
||||||
- '!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}'
|
|
||||||
- '!.editorconfig'
|
|
||||||
- '!**/._*'
|
|
||||||
- '!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}'
|
|
||||||
- '!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}'
|
|
||||||
- '!**/{appveyor.yml,.travis.yml,circle.yml}'
|
|
||||||
- '!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}'
|
|
||||||
- '!**/.env.*'
|
|
||||||
- '!**/{.idea,.vscode}${/*}'
|
|
||||||
- '!**/app/installers${/*}'
|
|
||||||
- '!**/hooks${/*}'
|
|
||||||
- '!**/platforms${/*}'
|
|
||||||
- '!**/release-builds${/*}'
|
|
||||||
- '!src${/*}'
|
|
||||||
win:
|
win:
|
||||||
target:
|
target:
|
||||||
- NSIS
|
- NSIS
|
||||||
- appx
|
|
||||||
icon: app/icons/win/icon.ico
|
icon: app/icons/win/icon.ico
|
||||||
appx:
|
|
||||||
applicationId: OpenFlexureEV
|
|
||||||
identityName: 60425J.T.Collins.OpenFlexureeV
|
|
||||||
publisher: CN=CC867BEF-0715-4D48-8035-8881993DBB68
|
|
||||||
publisherDisplayName: J. T. Collins
|
|
||||||
backgroundColor: '#C5247F'
|
|
||||||
electronVersion: 4.1.5
|
electronVersion: 4.1.5
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,12 @@
|
||||||
"license": "GNU General Public License v3.0 ",
|
"license": "GNU General Public License v3.0 ",
|
||||||
"main": "./app/app.js",
|
"main": "./app/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dist:all": "electron-builder --linux --win --config app/builder-config.yaml",
|
"dist:all": "npm run dist:linux && npm run dist:raspi && npm run dist:win",
|
||||||
|
"dist:linux": "electron-builder --linux --config app/builder-config-linux.yaml",
|
||||||
|
"dist:raspi": "electron-builder --linux --config app/builder-config-raspi.yaml",
|
||||||
"dist:win": "electron-builder --win --config app/builder-config-win.yaml",
|
"dist:win": "electron-builder --win --config app/builder-config-win.yaml",
|
||||||
|
"dist:appx": "electron-builder --win --config app/builder-config-appx.yaml",
|
||||||
|
"dist:dmg": "electron-builder --mac --config app/builder-config-dmg.yaml",
|
||||||
"release": "npm run build:web && npm run dist:all",
|
"release": "npm run build:web && npm run dist:all",
|
||||||
"build:android": "npm run setup-webpack-config && tns build android --bundle --env.production && npm run remove-webpack-config",
|
"build:android": "npm run setup-webpack-config && tns build android --bundle --env.production && npm run remove-webpack-config",
|
||||||
"build:ios": "npm run setup-webpack-config && tns build ios --bundle --env.production && npm run remove-webpack-config",
|
"build:ios": "npm run setup-webpack-config && tns build ios --bundle --env.production && npm run remove-webpack-config",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<div uk-spinner="ratio: 4.5" ></div>
|
<div uk-spinner="ratio: 4.5" ></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="$store.state.settings.disableStream" class="uk-position-center position-relative text-center">
|
<div v-else-if="$store.state.globalSettings.disableStream" class="uk-position-center position-relative text-center">
|
||||||
Stream preview disabled
|
Stream preview disabled
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ export default {
|
||||||
// 'ready' changed, so do something
|
// 'ready' changed, so do something
|
||||||
console.log(oldValue)
|
console.log(oldValue)
|
||||||
console.log(newValue)
|
console.log(newValue)
|
||||||
this.previewRequest(this.$store.state.settings.autoGpuPreview)
|
this.previewRequest(this.$store.state.globalSettings.autoGpuPreview)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
@ -94,7 +94,7 @@ export default {
|
||||||
handleDoneResize: function() {
|
handleDoneResize: function() {
|
||||||
// Recalculate size
|
// Recalculate size
|
||||||
this.recalculateSize();
|
this.recalculateSize();
|
||||||
if (this.$store.state.settings.autoGpuPreview == true && this.GpuPreviewActive == true) {
|
if (this.$store.state.globalSettings.autoGpuPreview == true && this.GpuPreviewActive == true) {
|
||||||
// Reload preview
|
// Reload preview
|
||||||
this.$root.$emit('globalTogglePreview', true)
|
this.$root.$emit('globalTogglePreview', true)
|
||||||
}
|
}
|
||||||
|
|
@ -133,7 +133,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate payload if tracking window position
|
// Generate payload if tracking window position
|
||||||
if (this.$store.state.settings.trackWindow == true && state == true) {
|
if (this.$store.state.globalSettings.trackWindow == true && state == true) {
|
||||||
// Recalculate frame dimensions and position
|
// Recalculate frame dimensions and position
|
||||||
this.recalculateSize()
|
this.recalculateSize()
|
||||||
// Copy data into payload array
|
// Copy data into payload array
|
||||||
|
|
@ -165,7 +165,7 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
showStream: function () {
|
showStream: function () {
|
||||||
return this.$store.getters.ready && !this.$store.state.settings.disableStream
|
return this.$store.getters.ready && !this.$store.state.globalSettings.disableStream
|
||||||
},
|
},
|
||||||
streamImgUri: function () {
|
streamImgUri: function () {
|
||||||
return this.$store.getters.uri + "/stream"
|
return this.$store.getters.uri + "/stream"
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,8 @@ export default {
|
||||||
stepXy: 200,
|
stepXy: 200,
|
||||||
stepZz: 50,
|
stepZz: 50,
|
||||||
setPosition: this.$store.state.apiState.stage.position,
|
setPosition: this.$store.state.apiState.stage.position,
|
||||||
isAutofocusing: false
|
isAutofocusing: false,
|
||||||
|
moveLock: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -190,9 +191,9 @@ export default {
|
||||||
|
|
||||||
moveRequest: function(x, y, z, absolute) {
|
moveRequest: function(x, y, z, absolute) {
|
||||||
// If not movement-locked
|
// If not movement-locked
|
||||||
if (!this.$store.state.moveLock) {
|
if (!this.moveLock) {
|
||||||
// Lock move requests
|
// Lock move requests
|
||||||
this.$store.commit('changeMoveLock', true)
|
this.moveLock = true
|
||||||
|
|
||||||
// Send move request
|
// Send move request
|
||||||
axios.post(this.positionApiUri, {
|
axios.post(this.positionApiUri, {
|
||||||
|
|
@ -209,15 +210,15 @@ export default {
|
||||||
this.modalError(error) // Let mixin handle error
|
this.modalError(error) // Let mixin handle error
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$store.commit('changeMoveLock', false) // Release the move lock
|
this.moveLock = false // Release the move lock
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
runAutofocus: function(dz) {
|
runAutofocus: function(dz) {
|
||||||
if (!this.$store.state.moveLock) {
|
if (!this.moveLock) {
|
||||||
// Lock move requests
|
// Lock move requests
|
||||||
this.$store.commit('changeMoveLock', true);
|
this.moveLock = true
|
||||||
this.isAutofocusing = true
|
this.isAutofocusing = true
|
||||||
axios.post(this.autofocusApiUri, {dz: dz})
|
axios.post(this.autofocusApiUri, {dz: dz})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
|
@ -234,15 +235,15 @@ export default {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
console.log("Cleaning up after autofocus.")
|
console.log("Cleaning up after autofocus.")
|
||||||
this.isAutofocusing = false;
|
this.isAutofocusing = false;
|
||||||
this.$store.commit('changeMoveLock', false); // Release the move lock
|
this.moveLock = false // Release the move lock
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
runFastAutofocus: function(dz, backlash) {
|
runFastAutofocus: function(dz, backlash) {
|
||||||
if (!this.$store.state.moveLock) {
|
if (!this.moveLock) {
|
||||||
// Lock move requests
|
// Lock move requests
|
||||||
this.$store.commit('changeMoveLock', true);
|
this.moveLock = true
|
||||||
this.isAutofocusing = true
|
this.isAutofocusing = true
|
||||||
axios.post(this.fastAutofocusApiUri, {dz: dz, backlash: backlash})
|
axios.post(this.fastAutofocusApiUri, {dz: dz, backlash: backlash})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
|
@ -258,8 +259,8 @@ export default {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
console.log("Cleaning up after autofocus.")
|
console.log("Cleaning up after autofocus.")
|
||||||
this.isAutofocusing = false;
|
this.isAutofocusing = false
|
||||||
this.$store.commit('changeMoveLock', false); // Release the move lock
|
this.moveLock = false // Release the move lock
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export default {
|
||||||
|
|
||||||
disableStream: {
|
disableStream: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.disableStream;
|
return this.$store.state.globalSettings.disableStream;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit("changeSetting", ['disableStream', value]);
|
this.$store.commit("changeSetting", ['disableStream', value]);
|
||||||
|
|
@ -34,7 +34,7 @@ export default {
|
||||||
|
|
||||||
autoGpuPreview: {
|
autoGpuPreview: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.autoGpuPreview;
|
return this.$store.state.globalSettings.autoGpuPreview;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit("changeSetting", ['autoGpuPreview', value]);
|
this.$store.commit("changeSetting", ['autoGpuPreview', value]);
|
||||||
|
|
@ -44,7 +44,7 @@ export default {
|
||||||
|
|
||||||
trackWindow: {
|
trackWindow: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.trackWindow;
|
return this.$store.state.globalSettings.trackWindow;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$store.commit("changeSetting", ['trackWindow', value]);
|
this.$store.commit("changeSetting", ['trackWindow', value]);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export default {
|
||||||
// Gallery tab
|
// Gallery tab
|
||||||
UIkit.util.on('#galleryDisplayTab', 'shown', function(event, area) {
|
UIkit.util.on('#galleryDisplayTab', 'shown', function(event, area) {
|
||||||
console.log("Gallery tab entered")
|
console.log("Gallery tab entered")
|
||||||
if (context.$store.state.settings.trackWindow == true) {
|
if (context.$store.state.globalSettings.trackWindow == true) {
|
||||||
context.$root.$emit('globalTogglePreview', false)
|
context.$root.$emit('globalTogglePreview', false)
|
||||||
}
|
}
|
||||||
context.$root.$emit('globalUpdateCaptureList');
|
context.$root.$emit('globalUpdateCaptureList');
|
||||||
|
|
@ -43,7 +43,7 @@ export default {
|
||||||
UIkit.util.on('#streamDisplayTab', 'shown', function(event, area) {
|
UIkit.util.on('#streamDisplayTab', 'shown', function(event, area) {
|
||||||
console.log("Stream tab entered")
|
console.log("Stream tab entered")
|
||||||
UIkit.update()
|
UIkit.update()
|
||||||
if (context.$store.state.settings.trackWindow == true) {
|
if (context.$store.state.globalSettings.trackWindow == true) {
|
||||||
context.$root.$emit('globalTogglePreview', true)
|
context.$root.$emit('globalTogglePreview', true)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ Vue.mixin({
|
||||||
.finally(function() {
|
.finally(function() {
|
||||||
// Reenable the GPU preview, if it was active before the modal
|
// Reenable the GPU preview, if it was active before the modal
|
||||||
console.log("Re-enabling GPU preview")
|
console.log("Re-enabling GPU preview")
|
||||||
if (context.$store.state.settings.autoGpuPreview) {
|
if (context.$store.state.globalSettings.autoGpuPreview) {
|
||||||
console.log("Re-enabling preview")
|
console.log("Re-enabling preview")
|
||||||
context.$root.$emit('globalTogglePreview', true)
|
context.$root.$emit('globalTogglePreview', true)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,7 @@ export default new Vuex.Store({
|
||||||
error: '',
|
error: '',
|
||||||
apiConfig: {},
|
apiConfig: {},
|
||||||
apiState: {},
|
apiState: {},
|
||||||
moveLock: false,
|
globalSettings: {
|
||||||
settings: {
|
|
||||||
disableStream: false,
|
disableStream: false,
|
||||||
autoGpuPreview: false,
|
autoGpuPreview: false,
|
||||||
trackWindow: true
|
trackWindow: true
|
||||||
|
|
@ -35,9 +34,6 @@ export default new Vuex.Store({
|
||||||
changeWaiting(state, waiting) {
|
changeWaiting(state, waiting) {
|
||||||
state.waiting = waiting
|
state.waiting = waiting
|
||||||
},
|
},
|
||||||
changeMoveLock(state, lock) {
|
|
||||||
state.moveLock = lock
|
|
||||||
},
|
|
||||||
commitError(state, errorString) {
|
commitError(state, errorString) {
|
||||||
state.error = errorString;
|
state.error = errorString;
|
||||||
},
|
},
|
||||||
|
|
@ -48,7 +44,7 @@ export default new Vuex.Store({
|
||||||
state.apiState = stateData;
|
state.apiState = stateData;
|
||||||
},
|
},
|
||||||
changeSetting(state, [key, value]) {
|
changeSetting(state, [key, value]) {
|
||||||
state.settings[key] = value;
|
state.globalSettings[key] = value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue