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${/*}'
|
||||
- '!**/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
|
||||
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:
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div uk-spinner="ratio: 4.5" ></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
|
||||
</div>
|
||||
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue