Fixed various build problems

This commit is contained in:
Geomitron
2020-05-10 21:43:43 -04:00
parent 3e3d3dd137
commit fb1908e063
8 changed files with 49 additions and 31 deletions

42
package-lock.json generated
View File

@@ -2142,15 +2142,6 @@
"integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==",
"dev": true
},
"@types/destroy": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@types/destroy/-/destroy-1.0.0.tgz",
"integrity": "sha512-nE3ePJLWPRu/qFHN8mj3fWnkr9K9ezwoiG4yOis2DuLeAawlnOOT/pM29JQkityrwfEvkblU5O9iS1bsiMqtDw==",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/electron-window-state": {
"version": "2.0.33",
"resolved": "https://registry.npmjs.org/@types/electron-window-state/-/electron-window-state-2.0.33.tgz",
@@ -4170,8 +4161,7 @@
"clean-stack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
"integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
"dev": true
"integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A=="
},
"cli-boxes": {
"version": "2.2.0",
@@ -5432,7 +5422,8 @@
"destroy": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
"dev": true
},
"detect-file": {
"version": "1.0.0",
@@ -5943,6 +5934,11 @@
}
}
},
"electron-is-dev": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-1.2.0.tgz",
"integrity": "sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw=="
},
"electron-publish": {
"version": "22.3.2",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-22.3.2.tgz",
@@ -6030,6 +6026,17 @@
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz",
"integrity": "sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw=="
},
"electron-unhandled": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/electron-unhandled/-/electron-unhandled-3.0.2.tgz",
"integrity": "sha512-IIqXnM5eNgV7k5sDA/GZ39ygJbpfF3WTArNGQ1TB4AI6ajQuuVztA0M6Mq9uEpmTh5gz4nR+YsTNWYsHLoM5rw==",
"requires": {
"clean-stack": "^2.1.0",
"electron-is-dev": "^1.0.1",
"ensure-error": "^2.0.0",
"lodash.debounce": "^4.0.8"
}
},
"electron-window-state": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/electron-window-state/-/electron-window-state-5.0.3.tgz",
@@ -6099,6 +6106,11 @@
"tapable": "^1.0.0"
}
},
"ensure-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ensure-error/-/ensure-error-2.1.0.tgz",
"integrity": "sha512-+BMSJHw9gxiJAAp2ZR1E0TNcL09dD3lOvkl7WVm4+Y6xnes/pMetP/TzCHiDduh8ihNDjbGfuYxl7l4PA1xZ8A=="
},
"entities": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
@@ -10829,6 +10841,11 @@
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
"dev": true
},
"lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
},
"lodash.defaults": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.1.2.tgz",
@@ -15097,7 +15114,6 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
}

View File

@@ -36,7 +36,7 @@
"@angular/router": "~9.1.4",
"cli-color": "^2.0.0",
"comparators": "^3.0.2",
"destroy": "^1.0.4",
"electron-unhandled": "^3.0.2",
"electron-window-state": "^5.0.3",
"fomantic-ui": "^2.8.3",
"jquery": "^3.4.1",
@@ -44,6 +44,7 @@
"needle": "^2.3.2",
"node-7z": "^2.0.5",
"node-unrar-js": "^0.8.1",
"rimraf": "^3.0.2",
"rxjs": "~6.5.5",
"sanitize-filename": "^1.6.3",
"tslib": "^1.10.0",
@@ -57,7 +58,6 @@
"@angular/compiler-cli": "~9.1.4",
"@angular/language-service": "~9.1.4",
"@types/cli-color": "^2.0.0",
"@types/destroy": "^1.0.0",
"@types/electron-window-state": "^2.0.33",
"@types/mv": "^2.1.0",
"@types/needle": "^2.0.4",
@@ -72,7 +72,6 @@
"eslint": "^6.8.0",
"nodemon": "^2.0.2",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"ts-node": "~7.0.0",
"typescript": "~3.8.3",
"wait-on": "^4.0.0"

View File

@@ -1,6 +1,6 @@
import { Component, AfterViewInit, Input, ViewChild, ElementRef } from '@angular/core'
import { SongResult } from '../../../../../electron/shared/interfaces/search.interface'
import { SelectionService } from 'src/app/core/services/selection.service'
import { SelectionService } from '../../../../core/services/selection.service'
@Component({
selector: 'tr[app-result-table-row]',

View File

@@ -1,9 +1,9 @@
import { Component, Output, EventEmitter, ViewChildren, QueryList, ViewChild, OnInit } from '@angular/core'
import { SongResult } from '../../../../electron/shared/interfaces/search.interface'
import { ResultTableRowComponent } from './result-table-row/result-table-row.component'
import { CheckboxDirective } from 'src/app/core/directives/checkbox.directive'
import { SearchService } from 'src/app/core/services/search.service'
import { SelectionService } from 'src/app/core/services/selection.service'
import { CheckboxDirective } from '../../../core/directives/checkbox.directive'
import { SearchService } from '../../../core/services/search.service'
import { SelectionService } from '../../../core/services/selection.service'
@Component({
selector: 'app-result-table',

View File

@@ -1,10 +1,10 @@
import { Component, ChangeDetectorRef } from '@angular/core'
import { DownloadService } from 'src/app/core/services/download.service'
import { ElectronService } from 'src/app/core/services/electron.service'
import { groupBy } from 'src/electron/shared/UtilFunctions'
import { VersionResult } from 'src/electron/shared/interfaces/songDetails.interface'
import { SearchService } from 'src/app/core/services/search.service'
import { SelectionService } from 'src/app/core/services/selection.service'
import { DownloadService } from '../../../core/services/download.service'
import { ElectronService } from '../../../core/services/electron.service'
import { groupBy } from '../../../../electron/shared/UtilFunctions'
import { VersionResult } from '../../../../electron/shared/interfaces/songDetails.interface'
import { SearchService } from '../../../core/services/search.service'
import { SelectionService } from '../../../core/services/selection.service'
@Component({
selector: 'app-status-bar',

View File

@@ -1,5 +1,5 @@
import { Injectable, EventEmitter } from '@angular/core'
import { SongResult } from 'src/electron/shared/interfaces/search.interface'
import { SongResult } from '../../../electron/shared/interfaces/search.interface'
import { SearchService } from './search.service'
// Note: this class prevents event cycles by only emitting events if the checkbox changes

View File

@@ -109,17 +109,19 @@ export class FileExtractor {
* Extracts a .zip or .7z archive found at `fullPath` and puts the extracted results in `this.sourceFolder`.
*/
private extract7z(fullPath: string) {
const stream = node7z.extractFull(fullPath, this.sourceFolder, { $progress: true, $bin: zipBin.path7za })
const zipBinPath = zipBin.path7za.replace('app.asar', 'app.asar.unpacked') // I love electron-builder packaging :)
const stream = node7z.extractFull(fullPath, this.sourceFolder, { $progress: true, $bin: zipBinPath })
stream.on('progress', this.cancelable((progress: { percent: number; fileCount: number }) => {
this.callbacks.extractProgress(progress.percent, isNaN(progress.fileCount) ? 0 : progress.fileCount)
}))
let extractErrorOccured = false
stream.on('error', this.cancelable(() => {
stream.on('error', this.cancelable((err) => {
extractErrorOccured = true
console.log(`Failed to extract [${fullPath}]; retrying with .rar extractor...`)
this.extract(fullPath, true)
this.callbacks.error({ header: '7zip Error', body: err }, () => this.extract(fullPath, extname(fullPath) == '.rar'))
// console.log(`Failed to extract [${fullPath}]; retrying with .rar extractor...`)
// this.extract(fullPath, true)
}))
stream.on('end', this.cancelable(() => {

View File

@@ -2,6 +2,7 @@ import { app, BrowserWindow, ipcMain } from 'electron'
import * as windowStateKeeper from 'electron-window-state'
import * as path from 'path'
import * as url from 'url'
require('electron-unhandled')({ showDialog: true })
// IPC Handlers
import { getIPCInvokeHandlers, getIPCEmitHandlers, IPCEmitEvents } from './shared/IPCHandler'