13 Commits

Author SHA1 Message Date
László Monda
e84dbf2c15 Bump Agent version to 1.1.2. Bump firmware version to 8.1.4. Update changelog. 2018-03-09 19:02:46 +01:00
Róbert Kiss
990ff8e980 ci: mac code sign (#585)
* ci: register certificate into the mac keychain

* try to not use yarn electron-builder installer on mac

* use -P

* debug electron-osx-sign

* use cscLink

* use xcode xcode9.3beta

* increase package.json version

* revert version to 1.1.1

* delete unused files

* format release.js file

* format release.js file

* format release.js file
2018-03-09 18:31:48 +01:00
Róbert Kiss
1ca8e67e52 try to use xcode 9.2 (#584) 2018-03-08 18:09:17 +01:00
Róbert Kiss
23cb583bf7 chore: upgrade lerna => 2.9.0 (#583) 2018-03-06 00:34:06 +01:00
Róbert Kiss
d5cc735b85 build: Windows code sign (#581)
* build: Add windows certificate

* temporary bump version

* change CSC_LINK settings

* rdp connection

* remove appveyor RDP block
2018-03-01 17:29:55 +01:00
László Monda
1981311136 Merge branch 'master' of github.com:UltimateHackingKeyboard/agent 2018-02-28 00:31:48 +01:00
László Monda
bbb5d4a35b Add a notice regarding the lack of robustness of the firmware update process. 2018-02-28 00:31:06 +01:00
serge-rosov
58ef40fb02 year correction (#582) 2018-02-27 18:11:46 +01:00
Róbert Kiss
b8f35df155 build: switch off mac codesign 2018-02-24 23:33:22 +01:00
Róbert Kiss
c3e712851c build: Sign mac installer 2018-02-24 23:12:01 +01:00
László Monda
2eaa1e0634 Update package-lock.json 2018-02-19 17:11:16 +01:00
László Monda
6ee21bcd7a Fix get-debug-info.js 2018-02-18 03:44:17 +01:00
Róbert Kiss
10ae68ad4b fix(keymap): Fix undefined keymap serialization (#573) 2018-02-17 18:07:33 +01:00
13 changed files with 1514 additions and 587 deletions

View File

@@ -11,7 +11,7 @@ matrix:
fast_finish: true
include:
- os: osx
osx_image: xcode8.3
osx_image: xcode9.3beta
- os: linux
env: CC=clang CXX=clang++ npm_config_clang=1
compiler: clang

View File

@@ -6,7 +6,16 @@ The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1
Every Agent version includes the most recent firmware version. See the [firmware changelog](https://github.com/UltimateHackingKeyboard/firmware/blob/master/CHANGELOG.md).
## [1.1.1] - 2017-02-13
## [1.1.2] - 2018-03-09
Firmware: 8.1.**4** [[release](https://github.com/UltimateHackingKeyboard/firmware/releases/tag/v8.1.4)] | Device Protocol: 4.2.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
- Fix the configuration serializer so that the correct key actions get serialized, and the save button always appears when needed.
- Add instructions to the firmware page to aid users.
- Fix code signing on OSX.
- Sign Agent on Windows.
## [1.1.1] - 2018-02-13
Firmware: 8.1.**2** [[release](https://github.com/UltimateHackingKeyboard/firmware/releases/tag/v8.1.2)] | Device Protocol: 4.2.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
@@ -20,7 +29,7 @@ Firmware: 8.1.**2** [[release](https://github.com/UltimateHackingKeyboard/firmwa
- Assign "switch to test keymap" action on all keymaps in the default configuration.
- Add keymap descriptions in the default configuration.
## [1.1.0] - 2017-01-15
## [1.1.0] - 2018-01-15
Firmware: 8.**1**.0 [[release](https://github.com/UltimateHackingKeyboard/firmware/releases/tag/v8.1.0)] | Device Protocol: 4.2.0 | User Config: 4.0.0 | Hardware Config: 1.0.0

View File

@@ -1,8 +1,11 @@
os: unstable
clone_folder: c:\projects\uhk-agent
environment:
GH_TOKEN:
secure: 3IebpEKmC39codi1wT6dXx8mql4/mCL1JzZ7lir7GQ5MWRnCxlED2OXbiKHHigDV
CSC_LINK: c:\projects\uhk-agent\scripts\certs\windows-cert.p12
matrix:
- nodejs_version: "8"

1995
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,8 @@
"private": true,
"author": "Ultimate Gadget Laboratories",
"main": "electron/dist/electron-main.js",
"version": "1.1.1",
"firmwareVersion": "8.1.2",
"version": "1.1.2",
"firmwareVersion": "8.1.4",
"deviceProtocolVersion": "4.2.0",
"userConfigVersion": "4.0.0",
"hardwareConfigVersion": "1.0.0",
@@ -37,17 +37,17 @@
"decompress-tarbz2": "^4.1.1",
"devtron": "1.4.0",
"electron": "1.7.11",
"electron-builder": "19.45.5",
"electron-builder": "20.4.0",
"electron-debug": "1.4.0",
"electron-devtools-installer": "2.2.0",
"electron-log": "2.2.9",
"electron-rebuild": "1.6.0",
"electron-rebuild": "1.7.3",
"electron-settings": "3.1.2",
"exports-loader": "0.6.3",
"file-loader": "0.10.0",
"fs-extra": "4.0.2",
"jsonfile": "4.0.0",
"lerna": "2.0.0",
"lerna": "2.9.0",
"mkdirp": "0.5.1",
"npm-run-all": "4.0.2",
"pre-commit": "1.2.2",

View File

@@ -54,15 +54,12 @@ export class Module {
const noneAction = new NoneAction();
const keyActions: KeyAction[] = this.keyActions.map(keyAction => {
buffer.writeArray(this.keyActions, (uhkBuffer: UhkBuffer, keyAction: KeyAction) => {
if (keyAction) {
return keyAction;
keyAction.toBinary(uhkBuffer, userConfiguration);
} else {
noneAction.toBinary(uhkBuffer);
}
return noneAction;
});
buffer.writeArray(keyActions, (uhkBuffer: UhkBuffer, keyAction: KeyAction) => {
keyAction.toBinary(uhkBuffer, userConfiguration);
});
}

View File

@@ -6,6 +6,14 @@
<i class="fa fa-sliders"></i>
<span>Firmware</span>
</h1>
<p><i>
Please note that the firmware update process may sometimes fail. If if fails then
simply retry until it succeeds. If the left half becomes unresponsive after a failed
update then retry and follow the instructions displayed during the update to fix it.
We'll make the firmware update process more robust.
</i></p>
<p>
Flash firmware {{ (getAgentVersionInfo$ | async).firmwareVersion }} (bundled with Agent)
<button class="btn btn-primary"

View File

@@ -13,7 +13,8 @@ function getUint16(buffer, offset) {
let prevGeneric, prevBasic, prevMedia, prevSystem, prevMouse;
function getDebugInfo() {
const payload = new Buffer([uhk.usbCommands.getDebugInfo]);
const payload = new Buffer([uhk.usbCommands.getDebugBuffer]);
console.log(payload)
console.log('Sending ', uhk.bufferToString(payload));
device.write(uhk.getTransferData(payload));
const rxBuffer = Buffer.from(device.readSync());

2
scripts/certs/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
windows-cert.p12
mac-cert.p12

Binary file not shown.

Binary file not shown.

View File

@@ -2,7 +2,7 @@
const jsonfile = require('jsonfile');
const exec = require('child_process').execSync;
const TEST_BUILD = process.env.TEST_BUILD;// set true if you would like to test on your local machine
const TEST_BUILD = process.env.TEST_BUILD; // set true if you would like to test on your local machine
// set true if running on your dev mac machine where yarn is installed or not need to install
const RUNNING_IN_DEV_MODE = process.env.RUNNING_IN_DEV_MODE === 'true';
const DIR = process.env.DIR;
@@ -42,13 +42,13 @@ if (!isReleaseCommit) {
process.exit(0)
}
if (process.platform === 'darwin' && !RUNNING_IN_DEV_MODE) {
exec('brew install yarn --without-node');
}
// if (process.platform === 'darwin' && !RUNNING_IN_DEV_MODE) {
// exec('brew install yarn --without-node');
// }
if (!RUNNING_IN_DEV_MODE) {
exec("yarn add electron-builder");
}
// if (!RUNNING_IN_DEV_MODE) {
// exec("yarn add electron-builder");
// }
const path = require('path');
const builder = require("electron-builder");
@@ -82,9 +82,13 @@ if (process.platform === 'darwin') {
process.exit(1);
}
if (process.platform === 'darwin') {
// TODO: Remove comment when macOS certificates boughted and exported
//require('./setup-macos-keychain').registerKeyChain();
if (process.platform === 'darwin' && process.env.CI) {
const encryptedFile = path.join(__dirname, './certs/mac-cert.p12.enc');
const decryptedFile = path.join(__dirname, './certs/mac-cert.p12');
exec(`openssl aes-256-cbc -K $CERT_KEY -iv $CERT_IV -in ${encryptedFile} -out ${decryptedFile} -d`);
} else if (process.platform === 'win32') {
// decrypt windows certificate
exec('openssl aes-256-cbc -K %CERT_KEY% -iv %CERT_IV% -in scripts/certs/windows-cert.p12.enc -out scripts/certs/windows-cert.p12 -d')
}
if (TEST_BUILD || gitTag) {
@@ -114,10 +118,13 @@ if (TEST_BUILD || gitTag) {
productName: 'UHK Agent',
mac: {
category: 'public.app-category.utilities',
extraResources
extraResources,
identity: 'CMXCBCFHDG',
cscLink: path.join(__dirname, 'certs/mac-cert.p12')
},
win: {
extraResources
extraResources,
certificateFile: path.join(__dirname, 'certs/windows-cert.p12')
},
linux: {
extraResources
@@ -136,8 +143,7 @@ if (TEST_BUILD || gitTag) {
console.error(`${error}`);
process.exit(1);
})
}
else {
} else {
console.log('No git tag');
// TODO: Need it?
process.exit(1);

View File

@@ -1,20 +0,0 @@
'use strict'
const cp = require('child_process')
const path = require('path')
function registerKeyChain() {
const encryptedFile = path.join(__dirname, '../certs/developer-id-cert.p12.enc')
const decryptedFile = path.join(__dirname, '../certs/developer-id-cert.p12')
cp.execSync(`openssl aes-256-cbc -K $encrypted_04061b49eb95_key -iv $encrypted_04061b49eb95_iv -in ${encryptedFile} -out ${decryptedFile} -d`)
const keyChain = 'mac-build.keychain'
cp.execSync(`security create-keychain -p travis ${keyChain}`)
cp.execSync(`security default-keychain -s ${keyChain}`)
cp.execSync(`security unlock-keychain -p travis ${keyChain}`)
cp.execSync(`security set-keychain-settings -t 3600 -u ${keyChain}`)
cp.execSync(`security import ${decryptedFile} -k ${keyChain} -P $KEY_PASSWORD -T /usr/bin/codesign`)
}
module.exports.registerKeyChain = registerKeyChain