Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #89 from mixer/feat/updater
Browse files Browse the repository at this point in the history
Auto Updater and Install Dir
  • Loading branch information
DeekyJay authored Apr 18, 2018
2 parents 95982b2 + c5b0bc0 commit fe4c1d7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
8 changes: 8 additions & 0 deletions installer.nsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
!macro preInit
SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "$LOCALAPPDATA\Microsoft\Mixer\CDK"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "$LOCALAPPDATA\Microsoft\Mixer\CDK"
SetRegView 32
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "$LOCALAPPDATA\Microsoft\Mixer\CDK"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "$LOCALAPPDATA\Microsoft\Mixer\CDK"
!macroend
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mixer/cdk",
"version": "0.2.7",
"version": "0.4.0",
"description": "Command line tool for developing with Mixer Interactive",
"main": "./dist/src/electron.js",
"bin": {
Expand All @@ -17,6 +17,8 @@
"fmt:ts": "prettier --write \"{src,test,types}/**/*.{scss,js,ts}\"",
"build:cli": "rimraf dist && tsc",
"build:editor:pack": "npm run -s build:editor:base && electron-builder --dir",
"build:editor:dist:win": "npm run -s build:editor:base && electron-builder --win --x64",
"build:editor:dist:mac": "npm run -s build:editor:base && electron-builder --mac --x64",
"build:editor:dist": "npm run -s build:editor:base && electron-builder --win --mac --x64",
"build:editor:base": "rimraf dist app && ts-node src/app/tools/setProfile.ts && tsc && ng build -prod",
"start": "ts-node src/app/tools/setProfile.ts && tsc && npm-run-all -p start:ng start:electron",
Expand All @@ -33,6 +35,12 @@
"output": "app",
"buildResources": "."
},
"win": {
"target": "nsis"
},
"nsis": {
"include": "./installer.nsh"
},
"files": [
"./dist"
],
Expand Down Expand Up @@ -78,7 +86,7 @@
"interactive",
"cli"
],
"author": "Connor Peet <[email protected]>",
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/mixer/miix-cli/issues"
Expand Down Expand Up @@ -157,6 +165,7 @@
"@mcph/miix-webpack-plugin": "^0.1.2",
"chalk": "^2.3.0",
"command-exists": "^1.2.2",
"electron-updater": "^2.21.4",
"fix-path": "^2.1.0",
"form-data": "^2.3.1",
"json5": "^0.5.1",
Expand Down
2 changes: 1 addition & 1 deletion src/app/editor/editor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CONF_PROD } from '../environments/environment.prod';
// tslint:disable

const ENV: string = 'dev';
const VERSION: string = '0.2.7';
const VERSION: string = '0.4.0';

export let AppConfig: {
production: boolean;
Expand Down
3 changes: 3 additions & 0 deletions src/electron.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { app, BrowserWindow, Menu, MenuItem } from 'electron';
import { autoUpdater } from 'electron-updater';
import * as fixPath from 'fix-path';
import * as path from 'path';
import * as url from 'url';

import { ElectronServer } from './server/electron-server';

autoUpdater.checkForUpdatesAndNotify().catch(err => err);

let window: BrowserWindow | null = null;
let server: ElectronServer;

Expand Down

0 comments on commit fe4c1d7

Please sign in to comment.