From 287117c04bbde5e9df49a4b515476e5a9da3a528 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sun, 11 Sep 2022 13:29:06 +0200 Subject: [PATCH 1/5] refactor: fix for whatsnew dialog in electron app --- src/app/shared/components/header/header.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/components/header/header.component.html b/src/app/shared/components/header/header.component.html index 8ebf5f799..34aa58d1a 100644 --- a/src/app/shared/components/header/header.component.html +++ b/src/app/shared/components/header/header.component.html @@ -71,7 +71,7 @@ Date: Sun, 11 Sep 2022 14:40:46 +0200 Subject: [PATCH 2/5] build: remove deprecated ia32 support for linux --- electron-builder.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/electron-builder.json b/electron-builder.json index 9d45c24dd..a80047eab 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -40,19 +40,19 @@ "target": [ { "target": "AppImage", - "arch": ["x64", "ia32", "armv7l", "arm64"] + "arch": ["x64", "armv7l", "arm64"] }, { "target": "deb", - "arch": ["x64", "ia32", "armv7l", "arm64"] + "arch": ["x64", "armv7l", "arm64"] }, { "target": "rpm", - "arch": ["x64", "ia32", "arm64", "armv7l"] + "arch": ["x64", "arm64", "armv7l"] }, { "target": "Snap", - "arch": ["x64", "ia32", "arm64", "armv7l"] + "arch": ["x64", "arm64", "armv7l"] } ] } From 2a30cbd251e38c033b89e1376913e8ed74a8a457 Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Sun, 11 Sep 2022 15:09:18 +0200 Subject: [PATCH 3/5] ci: remove deprecated support of ia32 for linux --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3a64141a..ce891595b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,11 +37,9 @@ jobs: npx electron-builder --linux snap --armv7l --publish always npx electron-builder --linux snap --x64 --publish always npx electron-builder --linux deb rpm --x64 --publish always - npx electron-builder --linux deb --ia32 --publish always npx electron-builder --linux deb --arm64 --publish always npx electron-builder --linux deb --armv7l --publish always npx electron-builder --linux AppImage --x64 --publish always - npx electron-builder --linux AppImage --ia32 --publish always npx electron-builder --linux AppImage --arm64 --publish always npx electron-builder --linux AppImage --armv7l --publish always env: @@ -69,4 +67,4 @@ jobs: # If the commit is tagged with a version (e.g. "v1.0.0"), # release the app after building - release: ${{ startsWith(github.ref, 'refs/tags/v') }} \ No newline at end of file + release: ${{ startsWith(github.ref, 'refs/tags/v') }} From df4e99a4ae7186322eddcab8b6a81a04bd4c2e1a Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Sun, 18 Sep 2022 21:55:20 +0000 Subject: [PATCH 4/5] fix: disable service worker in electron app --- src/app/app.module.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 769a2f530..1139a2af7 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -61,12 +61,14 @@ export function DataFactory(dbService: NgxIndexedDBService, http: HttpClient) { deps: [HttpClient], }, }), - ServiceWorkerModule.register('ngsw-worker.js', { - enabled: AppConfig.production, - // Register the ServiceWorker as soon as the app is stable - // or after 30 seconds (whichever comes first). - registrationStrategy: 'registerWhenStable:30000', - }), + !isElectron + ? ServiceWorkerModule.register('ngsw-worker.js', { + enabled: AppConfig.production, + // Register the ServiceWorker as soon as the app is stable + // or after 30 seconds (whichever comes first). + registrationStrategy: 'registerWhenStable:30000', + }) + : [], ], providers: [ { From 166637670490000a05e85f6c6df1f2b20b92e3ea Mon Sep 17 00:00:00 2001 From: 4gray Date: Mon, 19 Sep 2022 11:41:24 +0200 Subject: [PATCH 5/5] build: back to "dist" folder --- angular.json | 2 +- electron-builder.json | 14 ++++++++++---- electron/main.ts | 4 ++-- electron/menu.ts | 2 +- package-lock.json | 4 ++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/angular.json b/angular.json index 809b24515..7e2aadcde 100644 --- a/angular.json +++ b/angular.json @@ -21,7 +21,7 @@ "build": { "builder": "@angular-builders/custom-webpack:browser", "options": { - "outputPath": "build", + "outputPath": "dist", "index": "src/index.html", "main": "src/main.ts", "tsConfig": "src/tsconfig.app.json", diff --git a/electron-builder.json b/electron-builder.json index a80047eab..3b4ce1294 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -5,9 +5,12 @@ }, "files": [ "**/*", + "dist", "!**/*.ts", "!*.code-workspace", "!LICENSE.md", + "!README.md", + "!CHANGELOG.md", "!package.json", "!package-lock.json", "!src/", @@ -15,10 +18,13 @@ "!hooks/", "!angular.json", "!tsconfig.json", - "!tslint.json" + "!tsconfig.*.json", + "!tslint.json", + "!*.png", + "!coverage" ], "win": { - "icon": "build/assets/icons", + "icon": "dist/assets/icons", "compression": "maximum", "target": [ { @@ -28,14 +34,14 @@ ] }, "mac": { - "icon": "build/assets/icons/icon-1024.png", + "icon": "dist/assets/icons/icon-1024.png", "target": { "target": "dmg", "arch": ["universal"] } }, "linux": { - "icon": "build/assets/icons", + "icon": "dist/assets/icons", "category": "Video", "target": [ { diff --git a/electron/main.ts b/electron/main.ts index a1f3457cb..c10a0162a 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -33,7 +33,7 @@ function createWindow(): BrowserWindow { }, resizable: true, darkTheme: true, - icon: path.join(__dirname, '../build/assets/icons/icon.png'), + icon: path.join(__dirname, '../dist/assets/icons/icon.png'), titleBarStyle: 'hidden', frame: false, minWidth: 900, @@ -50,7 +50,7 @@ function createWindow(): BrowserWindow { } else { win.loadURL( url.format({ - pathname: path.join(__dirname, '../build/index.html'), + pathname: path.join(__dirname, '../dist/index.html'), protocol: 'file:', slashes: true, }) diff --git a/electron/menu.ts b/electron/menu.ts index 78f3daf28..3e0fd9eb8 100644 --- a/electron/menu.ts +++ b/electron/menu.ts @@ -111,7 +111,7 @@ export class AppMenu { openAboutWindow({ icon_path: path.join( __dirname, - 'build/assets/icons/icon.png' + '../dist/assets/icons/icon.png' ), copyright: 'Copyright (c) 2020-2022 4gray', package_json_dir: __dirname, diff --git a/package-lock.json b/package-lock.json index 5c44bcd2c..b9cc15fc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iptvnator", - "version": "0.10.0", + "version": "0.11.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iptvnator", - "version": "0.10.0", + "version": "0.11.0", "hasInstallScript": true, "dependencies": { "@angular/animations": "14.0.6",