diff --git a/app/builder-config-appx.yaml b/app/builder-config-appx.yaml new file mode 100644 index 00000000..addc17f3 --- /dev/null +++ b/app/builder-config-appx.yaml @@ -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 diff --git a/app/builder-config.yaml b/app/builder-config-base.yaml similarity index 70% rename from app/builder-config.yaml rename to app/builder-config-base.yaml index abe74a1c..9c0642e5 100644 --- a/app/builder-config.yaml +++ b/app/builder-config-base.yaml @@ -25,29 +25,3 @@ files: - '!**/platforms${/*}' - '!**/release-builds${/*}' - '!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 diff --git a/app/builder-config-dmg.yaml b/app/builder-config-dmg.yaml new file mode 100644 index 00000000..c2ab40be --- /dev/null +++ b/app/builder-config-dmg.yaml @@ -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 diff --git a/app/builder-config-linux.yaml b/app/builder-config-linux.yaml new file mode 100644 index 00000000..aca6ad60 --- /dev/null +++ b/app/builder-config-linux.yaml @@ -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 diff --git a/app/builder-config-raspi.yaml b/app/builder-config-raspi.yaml new file mode 100644 index 00000000..e54d1df2 --- /dev/null +++ b/app/builder-config-raspi.yaml @@ -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 diff --git a/app/builder-config-win.yaml b/app/builder-config-win.yaml index 2ed3008e..9a6b6d37 100644 --- a/app/builder-config-win.yaml +++ b/app/builder-config-win.yaml @@ -1,39 +1,6 @@ -directories: - 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${/*}' +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 diff --git a/package.json b/package.json index f4e74cd2..40bac1ff 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,12 @@ "license": "GNU General Public License v3.0 ", "main": "./app/app.js", "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: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", "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", diff --git a/src/components/paneDisplayComponents/streamDisplay.vue b/src/components/paneDisplayComponents/streamDisplay.vue index 59e7e6ec..8ccbb654 100644 --- a/src/components/paneDisplayComponents/streamDisplay.vue +++ b/src/components/paneDisplayComponents/streamDisplay.vue @@ -7,7 +7,7 @@
-
+
Stream preview disabled
@@ -59,7 +59,7 @@ export default { // 'ready' changed, so do something console.log(oldValue) 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() { // Recalculate size this.recalculateSize(); - if (this.$store.state.settings.autoGpuPreview == true && this.GpuPreviewActive == true) { + if (this.$store.state.globalSettings.autoGpuPreview == true && this.GpuPreviewActive == true) { // Reload preview this.$root.$emit('globalTogglePreview', true) } @@ -133,7 +133,7 @@ export default { } // 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 this.recalculateSize() // Copy data into payload array @@ -165,7 +165,7 @@ export default { computed: { showStream: function () { - return this.$store.getters.ready && !this.$store.state.settings.disableStream + return this.$store.getters.ready && !this.$store.state.globalSettings.disableStream }, streamImgUri: function () { return this.$store.getters.uri + "/stream" diff --git a/src/components/paneNavigate.vue b/src/components/paneNavigate.vue index 6a1ff2dc..5444f1de 100644 --- a/src/components/paneNavigate.vue +++ b/src/components/paneNavigate.vue @@ -117,7 +117,8 @@ export default { stepXy: 200, stepZz: 50, 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) { // If not movement-locked - if (!this.$store.state.moveLock) { + if (!this.moveLock) { // Lock move requests - this.$store.commit('changeMoveLock', true) + this.moveLock = true // Send move request axios.post(this.positionApiUri, { @@ -209,15 +210,15 @@ export default { this.modalError(error) // Let mixin handle error }) .then(() => { - this.$store.commit('changeMoveLock', false) // Release the move lock + this.moveLock = false // Release the move lock }) } }, runAutofocus: function(dz) { - if (!this.$store.state.moveLock) { + if (!this.moveLock) { // Lock move requests - this.$store.commit('changeMoveLock', true); + this.moveLock = true this.isAutofocusing = true axios.post(this.autofocusApiUri, {dz: dz}) .then(response => { @@ -234,15 +235,15 @@ export default { .finally(() => { console.log("Cleaning up after autofocus.") this.isAutofocusing = false; - this.$store.commit('changeMoveLock', false); // Release the move lock + this.moveLock = false // Release the move lock }) } }, runFastAutofocus: function(dz, backlash) { - if (!this.$store.state.moveLock) { + if (!this.moveLock) { // Lock move requests - this.$store.commit('changeMoveLock', true); + this.moveLock = true this.isAutofocusing = true axios.post(this.fastAutofocusApiUri, {dz: dz, backlash: backlash}) .then(response => { @@ -258,8 +259,8 @@ export default { }) .finally(() => { console.log("Cleaning up after autofocus.") - this.isAutofocusing = false; - this.$store.commit('changeMoveLock', false); // Release the move lock + this.isAutofocusing = false + this.moveLock = false // Release the move lock }) } } diff --git a/src/components/paneSettingsComponents/streamSettings.vue b/src/components/paneSettingsComponents/streamSettings.vue index aa342530..058f324c 100644 --- a/src/components/paneSettingsComponents/streamSettings.vue +++ b/src/components/paneSettingsComponents/streamSettings.vue @@ -25,7 +25,7 @@ export default { disableStream: { get() { - return this.$store.state.settings.disableStream; + return this.$store.state.globalSettings.disableStream; }, set(value) { this.$store.commit("changeSetting", ['disableStream', value]); @@ -34,7 +34,7 @@ export default { autoGpuPreview: { get() { - return this.$store.state.settings.autoGpuPreview; + return this.$store.state.globalSettings.autoGpuPreview; }, set(value) { this.$store.commit("changeSetting", ['autoGpuPreview', value]); @@ -44,7 +44,7 @@ export default { trackWindow: { get() { - return this.$store.state.settings.trackWindow; + return this.$store.state.globalSettings.trackWindow; }, set(value) { this.$store.commit("changeSetting", ['trackWindow', value]); diff --git a/src/components/panelDisplay.vue b/src/components/panelDisplay.vue index 14789957..66b705af 100644 --- a/src/components/panelDisplay.vue +++ b/src/components/panelDisplay.vue @@ -33,7 +33,7 @@ export default { // Gallery tab UIkit.util.on('#galleryDisplayTab', 'shown', function(event, area) { 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('globalUpdateCaptureList'); @@ -43,7 +43,7 @@ export default { UIkit.util.on('#streamDisplayTab', 'shown', function(event, area) { console.log("Stream tab entered") UIkit.update() - if (context.$store.state.settings.trackWindow == true) { + if (context.$store.state.globalSettings.trackWindow == true) { context.$root.$emit('globalTogglePreview', true) } }); diff --git a/src/main.js b/src/main.js index ce48f9cc..9d85dc14 100644 --- a/src/main.js +++ b/src/main.js @@ -27,7 +27,7 @@ Vue.mixin({ .finally(function() { // Reenable the GPU preview, if it was active before the modal console.log("Re-enabling GPU preview") - if (context.$store.state.settings.autoGpuPreview) { + if (context.$store.state.globalSettings.autoGpuPreview) { console.log("Re-enabling preview") context.$root.$emit('globalTogglePreview', true) } diff --git a/src/store.js b/src/store.js index f3252c64..a46ea57e 100644 --- a/src/store.js +++ b/src/store.js @@ -15,8 +15,7 @@ export default new Vuex.Store({ error: '', apiConfig: {}, apiState: {}, - moveLock: false, - settings: { + globalSettings: { disableStream: false, autoGpuPreview: false, trackWindow: true @@ -35,9 +34,6 @@ export default new Vuex.Store({ changeWaiting(state, waiting) { state.waiting = waiting }, - changeMoveLock(state, lock) { - state.moveLock = lock - }, commitError(state, errorString) { state.error = errorString; }, @@ -48,7 +44,7 @@ export default new Vuex.Store({ state.apiState = stateData; }, changeSetting(state, [key, value]) { - state.settings[key] = value; + state.globalSettings[key] = value; } },