From cfa9a1eafb3f756b443da4186d61501acc421aa2 Mon Sep 17 00:00:00 2001 From: "Tod E. Kurt" Date: Fri, 4 Sep 2020 10:58:35 -0700 Subject: [PATCH] cleanup before 2.2.4 release --- Publishing.md | 17 +++++++++++++++++ app/components/gui/preferencesModal.js | 6 +++--- app/server/blink1Service.js | 9 ++++----- app/server/timeService.js | 1 - package.json | 3 --- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Publishing.md b/Publishing.md index 3d8809b..0367eef 100644 --- a/Publishing.md +++ b/Publishing.md @@ -50,6 +50,13 @@ Steps: ``` and that should return appId of "com.thingm.blink1control2" + - Test if app is notarized: + ``` + codesign --test-requirement="=notarized" --verify --verbose myapp.app + xcrun stapler validate myapp.app + ``` + also see https://eclecticlight.co/2019/05/31/can-you-tell-whether-code-has-been-notarized/ + - To reset privacy database for particular app (to test Mac access dialogs): ``` tccutil reset All com.thingm.blink1control2 @@ -64,6 +71,16 @@ Steps: codesign -s (identity from above) /path/to/executable ``` + - In some cases, may need to sign native hared library with your developer credentials and copy it into the app: + + ``` + npm install -g electron-osx-sign + cp node_modules/node-hid/build/Release/HID.node dist/mac/ + electron-hid-toy.app/Contents/MacOS + electron-osx-sign dist/mac/electron-hid-toy.app dist/mac/electron-hid-toy.app/Contents/MacOS/HID.node + ``` + + - Windows signed apps: - Get Code Signing cert. - Export it from Firefox-ESR as .p12 file (which requires a password to encrypt) diff --git a/app/components/gui/preferencesModal.js b/app/components/gui/preferencesModal.js index 6d8acaa..418f122 100644 --- a/app/components/gui/preferencesModal.js +++ b/app/components/gui/preferencesModal.js @@ -60,7 +60,7 @@ loadSettings: function() { startupPattern: conf.readSettings('startup:startupPattern') || "", // FIXME: not used yet shortcutPrefix: conf.readSettings('startup:shortcutPrefix') || 'CommandOrControl+Shift', shortcutResetKey: conf.readSettings('startup:shortcutResetKey') || 'R', - enableDegamma: conf.readSettings('blink1Service:enableDegamma') || false, + enableGamma: conf.readSettings('blink1Service:enableGamma') || false, hostId: Blink1Service.getHostId(), blink1ToUse: conf.readSettings('blink1Service:blink1ToUse') || "0", // 0 == use first avail allowMultiBlink1: conf.readSettings('blink1Service:allowMulti') || false, @@ -93,7 +93,7 @@ saveSettings: function() { // conf.saveSettings('startup:startupPattern', this.state.startupPattern); conf.saveSettingsMem('startup:shortcutPrefix', this.state.shortcutPrefix); conf.saveSettingsMem('startup:shortcutResetKey', this.state.shortcutResetKey); - conf.saveSettingsMem('blink1Service:enableDegamma', this.state.enableDegamma); + conf.saveSettingsMem('blink1Service:enableGamma', this.state.enableGamma); conf.saveSettingsMem('blink1Service:blink1ToUse', this.state.blink1ToUse); conf.saveSettingsMem('blink1Service:allowMulti', this.state.allowMultiBlink1); conf.saveSettingsMem('apiServer:enabled', this.state.apiServerEnable); @@ -233,7 +233,7 @@ render: function() { :
} + name="enableGamma" checked={this.state.enableGamma} onChange={this.handleInputChange} > LED gamma-correction { - log.msg("BLAHAHAHA"); this._setupFoundDevices(); }, 500); }, @@ -212,9 +210,10 @@ var Blink1Service = { var crgb = color.toRgb(); try { var b1 = blink1s[blink1idx].device; - if( this.conf.enableGamma !== undefined ) { - b1.enableDegamma = !this.conf.enableGamma; // FIXME: fix this in node-blink1? + if( this.conf.enableGamma !== undefined ) { // i.e. if defined + b1.enableDegamma = this.conf.enableGamma; // FIXME: fix this in node-blink1? } + else { b1.enableDegamma = false; } b1.fadeToRGB( millis, crgb.r, crgb.g, crgb.b, ledn ); } catch(err) { log.error('Blink1Service._fadeToRGB: error', err); diff --git a/app/server/timeService.js b/app/server/timeService.js index 82fcec7..a72ed06 100644 --- a/app/server/timeService.js +++ b/app/server/timeService.js @@ -91,7 +91,6 @@ var TimeService = { var rSec = parseInt( rule.alarmSeconds ) || 0; var rMode = rule.alarmTimeMode || '24'; - // convert am/pm to 0-24, am: 1-12 -> 1-12, pm: 1-11,12 -> 13-23,0 // convert am/pm to 0-24, am: 1-11,12 -> 1-11,0, pm: 1-11,12 -> 13-23,12 if( rMode === 'am' ) { rHour = (rHour !== 12) ? rHour : 0; diff --git a/package.json b/package.json index 44e8e7d..a519f8a 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,6 @@ "afterSign": "./build/afterSign.js", "npmRebuild": true, "artifactName": "${productName}-${version}-${os}-${arch}.${ext}", - "publish": { - "provider": "github" - }, "mac": { "category": "public.app-category.utilities", "icon": "build/icon.icns",