From 4d5b6e06616675b54dec03c233b7fe9245b69adf Mon Sep 17 00:00:00 2001 From: Kylart Date: Fri, 28 Apr 2017 09:35:07 +0200 Subject: [PATCH] Corrected version to 0.4.0 and put AboutPanel only if platform is darwin --- assets/scripts/dist.js | 137 ----------------------------------------- layouts/default.vue | 2 +- main.js | 13 ++-- 3 files changed, 9 insertions(+), 143 deletions(-) delete mode 100644 assets/scripts/dist.js diff --git a/assets/scripts/dist.js b/assets/scripts/dist.js deleted file mode 100644 index f0efa3c..0000000 --- a/assets/scripts/dist.js +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Created by Kylart on 16/04/2017. - */ - -/** - * First check electron-packager api: - * https://github.com/electron-userland/electron-packager/blob/master/docs/api.md - * - * Then electron-installer dmg: - * https://github.com/mongodb-js/electron-installer-dmg - * - * Then windows-installer - * https://github.com/electron/windows-installer - * - * Then maybe ? (Linux) - * https://github.com/unindented/electron-installer-debian - */ - -const {join} = require('path') - -// packages -const packager = require('electron-packager') -const materialPath = join(__dirname, '..', 'build', 'material') - -// Installers -const createDMG = require('electron-installer-dmg') -const createDebInstaller = require('electron-installer-debian') -const targz = require('tar.gz') -const createWinInstaller = require('electron-winstaller').createWindowsInstaller - -const colors = require('colors') - -const packOptions = { - name: 'KawAnime', - dir: join(__dirname, '..', '..'), - out: join(__dirname, '..', 'build', 'dists'), - appCopyright: `© 2016 - ${(new Date()).getYear() + 1900} Kylart`, - all: true, - icon: join(materialPath, 'icon'), - overwrite: true - // Check for signing app -} - -const dmgOptions = { - appPath: join(materialPath, '..', 'dists', 'KawAnime-darwin-x64', 'KawAnime.app'), - name: 'KawAnime', - background: join(materialPath, 'background.png'), - icon: join(materialPath, 'icon.icns'), - overwrite: true, - out: join(materialPath, '..', 'dists'), - "icon-size": 80 -} - -const debOptions = (version) => { - return { - productName: 'KawAnime', - src: join(materialPath, '..', 'dists', `KawAnime-linux-${version}`), - dest: join(materialPath, '..', 'dists'), - arch: version === 'x64' ? 'amd64' : 'x32', - icon: join(materialPath, 'icon.png') - } -} - -const winConfig = (version) => { - return { - appDirectory: join(materialPath, '..', 'dists', `KawAnime-win32-${version}`), - outputDirectory: join(materialPath, '..', 'dists'), - authors: 'Kylart', - exe: 'KawAnime.exe', - noMsi: true, - setupExe: 'KawAnime.exe' - } -} - -const makeDMG = () => { - console.log('[Builder]: Creating DMG...'.yellow) - - createDMG(dmgOptions, function done(err) { - if (err) - { - console.log('[Builder]: An error occurred while creating DMG.'.red) - throw err - } - - console.log('[Builder]: Successfully built DMG!'.green) - }) -} - -const makeDebInstaller = (version) => { - console.log(`[Builder]: Creating ${version} Deb package...`.yellow) - createDebInstaller(debOptions(version), (err) => { - if (err) - { - console.log(`[Builder]: An error occurred while creating ${version} Deb package!`.red) - throw err - } - - console.log(`[Builder]: Successfully built ${version} Deb package!`.green) - }) -} - -const makeTarGZ = () => { - console.log('[Builder]: Creating tar.gz for armv7l...'.yellow) - targz().compress(join(materialPath, '..', 'dists', 'KawAnime-linux-armv7l'), join(materialPath, '..', 'dists', 'KawAnime.tar.gz')) - .then(function () { - console.log('[Builder]: Successfully built armv7l tar.gz!'.green); - }) - .catch(function (err) { - console.log('[Builder]: An error occurred while making armv7l tar.gz!'.red) - throw err - }) -} - -const buildDists = () => { - makeDMG() - makeDebInstaller('x64') - makeDebInstaller('ia32') - makeTarGZ() -} - -const pack = () => { - packager(packOptions, function done_callback(err, appPaths) { - if (err) - { - console.log('[Builder]: An occurred while packaging KawAnime!'.red) - throw err - } - - appPaths.forEach((path) => { - console.log(`[Builder]: Successfully built ${path}!`.green) - }) - - buildDists() - }) -} - -(() => pack())() \ No newline at end of file diff --git a/layouts/default.vue b/layouts/default.vue index ec6d2fc..5e0ff5d 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -51,7 +51,7 @@

かわニメ - - v0.3.0 + v0.4.0