Skip to content

Commit

Permalink
cleanup before 2.2.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
todbot committed Sep 4, 2020
1 parent b274222 commit cfa9a1e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
17 changes: 17 additions & 0 deletions Publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions app/components/gui/preferencesModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -233,7 +233,7 @@ render: function() {
</Checkbox> : <div/>}

<Checkbox bsSize="small" title="Use more accurate colors. When off, colors are brighter"
name="enableDegamma" checked={this.state.enableDegamma} onChange={this.handleInputChange} >
name="enableGamma" checked={this.state.enableGamma} onChange={this.handleInputChange} >
LED gamma-correction
</Checkbox>
<Checkbox bsSize="small" title="Only allow color patterns to play single-file, not at the same time"
Expand Down
9 changes: 4 additions & 5 deletions app/server/blink1Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,8 @@ var Blink1Service = {
blink1s.push( { serial: serialnumber, device: null } );
}
// set up all devices at once
// we wait 500msec because it was failing without it
// setTimeout( Blink1Service._setupFoundDevices, 500); // FIXME: an issue?
// we wait 500msec because it was failing without it (USB HID delay?)
setTimeout(() => {
log.msg("BLAHAHAHA");
this._setupFoundDevices();
}, 500);
},
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion app/server/timeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit cfa9a1e

Please sign in to comment.