mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Fixed various build problems
This commit is contained in:
@@ -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]',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user