Merge branch 'choco-ci-fix' into 'master'
Choco ci fix See merge request openflexure/openflexure-microscope-jsclient!24
This commit is contained in:
commit
8d12a9b98c
5 changed files with 55 additions and 102 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
extends: app/builder-config-base.yaml
|
extends: app/builder-config-base.yaml
|
||||||
win:
|
win:
|
||||||
target:
|
target:
|
||||||
- NSIS
|
|
||||||
- appx
|
- appx
|
||||||
icon: app/icons/win/icon.ico
|
icon: app/icons/win/icon.ico
|
||||||
appx:
|
appx:
|
||||||
|
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
$silentArgs = '/S'
|
|
||||||
$packageName = 'openflexure-ev'
|
|
||||||
$fileType = 'exe'
|
|
||||||
|
|
||||||
$packagepath = Join-Path -Path $PSScriptRoot -ChildPath '..\'
|
|
||||||
$packageJson = Join-Path -Path $packagepath -ChildPath '\package.json'
|
|
||||||
$outpath = Join-Path -Path $packagepath -ChildPath 'release-builds\choco'
|
|
||||||
|
|
||||||
echo $packagepath
|
|
||||||
echo $outpath
|
|
||||||
|
|
||||||
If(!(test-path $outpath))
|
|
||||||
{
|
|
||||||
New-Item -ItemType Directory -Force -Path $outpath
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get version from package.json
|
|
||||||
$FullVersion = (Get-Content $packageJson) -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version"
|
|
||||||
$MajVer, $MinVer = $FullVersion.Split("-") # Split version number from beta string
|
|
||||||
$MinVer = $MinVer.Replace(".", "") # Convert symver into nuspec ver
|
|
||||||
$version = $MajVer + "-" + $MinVer
|
|
||||||
|
|
||||||
$InstURL = "$Env:CI_JOB_URL/artifacts/browse/release-builds/openflexure-ev-win.exe"
|
|
||||||
echo $InstURL
|
|
||||||
|
|
||||||
$NuSpec = @"
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
||||||
<metadata>
|
|
||||||
<id>$packageName</id>
|
|
||||||
<title>OpenFlexure eV</title>
|
|
||||||
<version>$Version</version>
|
|
||||||
<authors>OpenFlexure</authors>
|
|
||||||
<owners>Bath Open Instrumentation Group</owners>
|
|
||||||
<summary>OpenFlexure Microscope client</summary>
|
|
||||||
<description>An electron-based user client for the OpenFlexure Microscope Server</description>
|
|
||||||
<projectUrl>https://www.openflexure.org/</projectUrl>
|
|
||||||
<docsUrl>https://www.openflexure.org/projects/microscope/</docsUrl>
|
|
||||||
<bugTrackerUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/issues</bugTrackerUrl>
|
|
||||||
<projectSourceUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/</projectSourceUrl>
|
|
||||||
|
|
||||||
<packageSourceUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/</packageSourceUrl>
|
|
||||||
|
|
||||||
<tags>openflexure microscope ev</tags>
|
|
||||||
<licenseUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/raw/master/LICENSE</licenseUrl>
|
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
|
||||||
<iconUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/raw/master/app/icons/png/512x512.png</iconUrl>
|
|
||||||
</metadata>
|
|
||||||
<files>
|
|
||||||
<file src="tools\**" target="tools" />
|
|
||||||
</files>
|
|
||||||
</package>
|
|
||||||
"@
|
|
||||||
|
|
||||||
echo $NuSpec | Out-File -force -FilePath "$outpath\openflexure-ev.nuspec"
|
|
||||||
|
|
||||||
$InstPS1 = "Install-ChocolateyPackage '$packageName' '$fileType' '$silentArgs' '$InstURL'"
|
|
||||||
|
|
||||||
$toolspath = "$outpath\tools"
|
|
||||||
If(!(test-path $toolspath))
|
|
||||||
{
|
|
||||||
New-Item -ItemType Directory -Force -Path $toolspath
|
|
||||||
}
|
|
||||||
echo $InstPS1 | Out-File -force -FilePath "$toolspath\chocolateyInstall.ps1"
|
|
||||||
|
|
||||||
choco pack --outputdirectory $outpath "$outpath\openflexure-ev.nuspec"
|
|
||||||
|
|
@ -1,27 +1,30 @@
|
||||||
silentArgs='/S'
|
#!/bin/bash
|
||||||
packageName='openflexure-ev'
|
|
||||||
fileType='exe'
|
|
||||||
|
|
||||||
scriptPath=`dirname $0`
|
packageName='openflexure-ev'
|
||||||
|
|
||||||
|
scriptPath=$(dirname "$0")
|
||||||
packagePath="$(dirname "$scriptPath")"
|
packagePath="$(dirname "$scriptPath")"
|
||||||
packageJson="$packagePath/package.json"
|
packageJson="$packagePath/package.json"
|
||||||
|
|
||||||
|
installerPath="$packagePath/openflexure-ev-win.exe"
|
||||||
|
installerHash=`sha256sum ${installerPath} | awk '{ print $1 }'`
|
||||||
|
echo "$installerHash"
|
||||||
|
|
||||||
outpath="$packagePath/release-builds/choco"
|
outpath="$packagePath/release-builds/choco"
|
||||||
toolspath="$outpath/tools"
|
toolspath="$outpath/tools"
|
||||||
mkdir -p $toolspath
|
mkdir -p "$toolspath"
|
||||||
|
|
||||||
echo $scriptPath
|
echo "$scriptPath"
|
||||||
echo $packageJson
|
echo "$packageJson"
|
||||||
echo $outpath
|
echo "$outpath"
|
||||||
|
|
||||||
# Get package version from package.json
|
# Get package version from package.json
|
||||||
packageVersion=$(cat $packageJson \
|
packageVersion=$(grep version < "$packageJson" | head -1 \
|
||||||
| grep version \
|
|
||||||
| head -1 \
|
|
||||||
| awk -F: '{ print $2 }' \
|
| awk -F: '{ print $2 }' \
|
||||||
| sed 's/[",]//g' \
|
| sed 's/[",]//g' \
|
||||||
| tr -d '[[:space:]]')
|
| tr -d ':space:')
|
||||||
|
|
||||||
echo "$packageVersion"
|
echo "Package version: $packageVersion"
|
||||||
|
|
||||||
# Convert into a nupkg-safe version string
|
# Convert into a nupkg-safe version string
|
||||||
majVer="$(echo "$packageVersion" | cut -d'-' -f1)"
|
majVer="$(echo "$packageVersion" | cut -d'-' -f1)"
|
||||||
|
|
@ -34,12 +37,14 @@ else
|
||||||
version="$majVer-$minVer"
|
version="$majVer-$minVer"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Nupkg version: $version"
|
||||||
echo "$version"
|
|
||||||
|
|
||||||
# Build installer URL
|
# Build installer URL
|
||||||
instURL="$CI_JOB_URL/artifacts/raw/release-builds/openflexure-ev-win.exe"
|
pipelineURL="$CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_REF_NAME/raw"
|
||||||
echo $instURL
|
instURL="$pipelineURL/openflexure-ev-win.exe?job=package:win32"
|
||||||
|
nuspecURL="$CI_JOB_URL/artifacts/browse"
|
||||||
|
|
||||||
|
echo "$instURL"
|
||||||
|
|
||||||
# Build nuspec
|
# Build nuspec
|
||||||
cat > "$outpath/openflexure-ev.nuspec" <<- EOL
|
cat > "$outpath/openflexure-ev.nuspec" <<- EOL
|
||||||
|
|
@ -50,20 +55,21 @@ cat > "$outpath/openflexure-ev.nuspec" <<- EOL
|
||||||
<title>OpenFlexure eV</title>
|
<title>OpenFlexure eV</title>
|
||||||
<version>$version</version>
|
<version>$version</version>
|
||||||
<authors>OpenFlexure</authors>
|
<authors>OpenFlexure</authors>
|
||||||
<owners>Bath Open Instrumentation Group</owners>
|
<owners>Joel Collins</owners>
|
||||||
<summary>OpenFlexure Microscope client</summary>
|
<summary>OpenFlexure Microscope client</summary>
|
||||||
<description>An electron-based user client for the OpenFlexure Microscope Server</description>
|
<description>An electron-based user client for the OpenFlexure Microscope Server</description>
|
||||||
|
|
||||||
<projectUrl>https://www.openflexure.org/</projectUrl>
|
<projectUrl>https://www.openflexure.org/</projectUrl>
|
||||||
<docsUrl>https://www.openflexure.org/projects/microscope/</docsUrl>
|
<docsUrl>https://www.openflexure.org/projects/microscope/</docsUrl>
|
||||||
<bugTrackerUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/issues</bugTrackerUrl>
|
<bugTrackerUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/issues</bugTrackerUrl>
|
||||||
|
|
||||||
<projectSourceUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/</projectSourceUrl>
|
<projectSourceUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/</projectSourceUrl>
|
||||||
|
<packageSourceUrl>$nuspecURL</packageSourceUrl>
|
||||||
<packageSourceUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/</packageSourceUrl>
|
|
||||||
|
|
||||||
<tags>openflexure microscope ev</tags>
|
<tags>openflexure microscope ev</tags>
|
||||||
<licenseUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/raw/master/LICENSE</licenseUrl>
|
<licenseUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/raw/master/LICENSE</licenseUrl>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<iconUrl>https://gitlab.com/openflexure/openflexure-microscope-jsclient/raw/master/app/icons/png/512x512.png</iconUrl>
|
<iconUrl>https://build.openflexure.org/openflexure_ev/512x512.png</iconUrl>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="tools/**" target="tools" />
|
<file src="tools/**" target="tools" />
|
||||||
|
|
@ -72,8 +78,26 @@ cat > "$outpath/openflexure-ev.nuspec" <<- EOL
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
# Build installer PS1 content
|
# Build installer PS1 content
|
||||||
instPS1="Install-ChocolateyPackage $packageName $fileType $silentArgs $instURL"
|
cat > "$toolspath/chocolateyInstall.ps1" <<- EOL
|
||||||
echo $instPS1 > "$toolspath/chocolateyInstall.ps1"
|
\$ErrorActionPreference = "Stop";
|
||||||
|
\$toolsDir = "\$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
|
||||||
|
\$url = "$instURL"
|
||||||
|
|
||||||
# Build nupkg
|
\$packageArgs = @{
|
||||||
# choco pack --allow-unofficial --outputdirectory $outpath "$outpath/openflexure-ev.nuspec"
|
packageName = "openflexure-ev"
|
||||||
|
unzipLocation = \$toolsDir
|
||||||
|
fileType = "exe"
|
||||||
|
url = \$url
|
||||||
|
url64bit = \$url
|
||||||
|
|
||||||
|
softwareName = "OpenFlexure eV"
|
||||||
|
|
||||||
|
checksum = "${installerHash}"
|
||||||
|
checksumType = "sha256"
|
||||||
|
|
||||||
|
silentArgs = "/S"
|
||||||
|
}
|
||||||
|
|
||||||
|
Install-ChocolateyPackage @packageArgs
|
||||||
|
|
||||||
|
EOL
|
||||||
13
package-lock.json
generated
13
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "openflexure-ev",
|
"name": "openflexure-ev",
|
||||||
"version": "0.2.3",
|
"version": "0.2.5",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -9332,11 +9332,6 @@
|
||||||
"unicode-match-property-value-ecmascript": "^1.1.0"
|
"unicode-match-property-value-ecmascript": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"register-service-worker": {
|
|
||||||
"version": "1.6.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/register-service-worker/-/register-service-worker-1.6.2.tgz",
|
|
||||||
"integrity": "sha512-I8L87fX2TK29LDx+wgyOUh2BJ3rDIRC1FtRZEHeP3rivzDv6p1DDZLGGtPucqjEkm45+2crtFIFssEWv56+9Wg=="
|
|
||||||
},
|
|
||||||
"registry-auth-token": {
|
"registry-auth-token": {
|
||||||
"version": "3.4.0",
|
"version": "3.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz",
|
||||||
|
|
@ -10993,9 +10988,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uikit": {
|
"uikit": {
|
||||||
"version": "3.1.4",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/uikit/-/uikit-3.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/uikit/-/uikit-3.1.1.tgz",
|
||||||
"integrity": "sha512-XGtlKlQXeNoQJi9wyff6DCkeX0P5/wdZw7LOenH7a5AOTRfUZDhTGX9uSCvRBroYBIKj6Eq2fe2efw2d1/rdHg==",
|
"integrity": "sha512-swmRPHiu1ehqtH8l1SSmbTk5LRx0JiaIwJlhjZfH2stQDZ6WUzC8zN6Jo9muEkptM1N+Vm5Qxa1DTeg+nkMCTQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"unicode-canonical-property-names-ecmascript": {
|
"unicode-canonical-property-names-ecmascript": {
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ export default {
|
||||||
var keyCodeList = Object.keys(keyCodes).map(function(key){return keyCodes[key];});
|
var keyCodeList = Object.keys(keyCodes).map(function(key){return keyCodes[key];});
|
||||||
|
|
||||||
if (!(event.target instanceof HTMLInputElement) && !(event.target.classList.contains('lightbox-link')) && keyCodeList.includes(event.keyCode)) {
|
if (!(event.target instanceof HTMLInputElement) && !(event.target.classList.contains('lightbox-link')) && keyCodeList.includes(event.keyCode)) {
|
||||||
console.log(this.keysDown)
|
//console.log(this.keysDown)
|
||||||
// Calculate movement array
|
// Calculate movement array
|
||||||
var x_rel = 0;
|
var x_rel = 0;
|
||||||
var y_rel = 0;
|
var y_rel = 0;
|
||||||
|
|
@ -190,6 +190,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
moveRequest: function(x, y, z, absolute) {
|
moveRequest: function(x, y, z, absolute) {
|
||||||
|
console.log(`Sending move request of ${x}, ${y}, ${z}`)
|
||||||
// If not movement-locked
|
// If not movement-locked
|
||||||
if (!this.moveLock) {
|
if (!this.moveLock) {
|
||||||
// Lock move requests
|
// Lock move requests
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue