Skip to content

Commit

Permalink
Gix update. Selectable electron version
Browse files Browse the repository at this point in the history
  • Loading branch information
voxsoftware committed May 25, 2021
1 parent 810009f commit 86af26c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions gix/dist/register.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gix/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@kawix/gix",
"version": "0.9.0"
"version": "1.0.0"
}
10 changes: 8 additions & 2 deletions gix/src/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class Electron extends EventEmitter {
electron: any
channel: RPAChannel
bridge: any
version: "6.0.11"

_electron: any
id: string
Expand All @@ -35,6 +36,10 @@ export class Electron extends EventEmitter {
this.id = "ELECTRON>" + id
}

setVersion(v){
this.version = v
}

async _createBootFile() {
var file, path;
path = Path.join(Os.homedir(), ".kawi")
Expand Down Expand Up @@ -115,7 +120,8 @@ export class Electron extends EventEmitter {


let reg = new Registry()
let wantedversion = "6.0.11"
let wantedversion = this.version //"6.0.11"
console.info("ELECTRON VERSION", wantedversion)
let mod = await reg.resolve("electron@" + wantedversion)
dist = Path.join(mod.folder, "dist")

Expand Down Expand Up @@ -143,7 +149,7 @@ export class Electron extends EventEmitter {
currentVer = currentVer.trim()
}

if (currentVer < wantedversion) {
if (currentVer != wantedversion) {
let files = await fs.readdirAsync(gelectronFolder)
for (let i = 0; i < files.length; i++) {
await fs.unlinkAsync(Path.join(gelectronFolder, files[i]))
Expand Down

0 comments on commit 86af26c

Please sign in to comment.