diff options
author | huantian | 2021-09-21 18:12:43 -0700 |
---|---|---|
committer | huantian | 2021-09-21 18:12:43 -0700 |
commit | 8ad0ab56a269859e3484779efff794e9c77cc61f (patch) | |
tree | abaa236c06138ee40ad91a11b49aeff21caffccd | |
parent | 77f40d0431b8e2a6b7e318f5774398763ee71843 (diff) | |
download | aur-8ad0ab56a269859e3484779efff794e9c77cc61f.tar.gz |
v1.1.15.beta.4
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | use-system-7za-and-disable-updater.patch | 109 |
3 files changed, 55 insertions, 92 deletions
@@ -1,16 +1,14 @@ pkgbase = gdlauncher-beta pkgdesc = GDLauncher is simple, yet powerful Minecraft custom launcher with a strong focus on the user experience - pkgver = 1.1.15.beta.3 + pkgver = 1.1.15.beta.4 pkgrel = 1 url = https://gdevs.io arch = x86_64 license = GPL3 makedepends = gendesk - makedepends = git makedepends = nodejs makedepends = npm makedepends = rust - makedepends = imagemagick depends = libnotify depends = libxss depends = libxtst @@ -25,9 +23,9 @@ pkgbase = gdlauncher-beta conflicts = gdlauncher-git conflicts = gdlauncher-bin conflicts = gdlauncher-appimage - source = https://github.com/gorilla-devs/GDLauncher/archive/refs/tags/v1.1.15-beta.3.tar.gz + source = https://github.com/gorilla-devs/GDLauncher/archive/refs/tags/v1.1.15-beta.4.tar.gz source = use-system-7za-and-disable-updater.patch - md5sums = 0d8ff9bdcd1cc5df2be4962adfaa71cf - md5sums = 82fbdbfac2a7c41d1209734e1f5633b7 + md5sums = 76c87c38980d6856f8a89795283154be + md5sums = c72fed43c676c710c8cfa3397270a977 pkgname = gdlauncher-beta @@ -2,22 +2,21 @@ # Based on the PKGBUILD for gdlauncher. pkgname="gdlauncher-beta" _pkgname="gdlauncher" -pkgver="1.1.15.beta.3" -_pkgver="1.1.15-beta.3" +pkgver="1.1.15.beta.4" +_pkgver="1.1.15-beta.4" pkgrel=1 arch=('x86_64') pkgdesc="GDLauncher is simple, yet powerful Minecraft custom launcher with a strong focus on the user experience" url="https://gdevs.io" license=('GPL3') -makedepends=('gendesk' 'git' 'nodejs' 'npm' 'rust' 'imagemagick') +makedepends=('gendesk' 'nodejs' 'npm' 'rust') depends=('libnotify' 'libxss' 'libxtst' 'libindicator-gtk3' 'libappindicator-gtk3' 'electron' 'p7zip') conflicts=('gdlauncher' 'gdlauncher-beta-bin' 'gdlauncher-appimage' 'gdlauncher-git' 'gdlauncher-bin' 'gdlauncher-appimage') provides=('gdlauncher') source=("https://github.com/gorilla-devs/GDLauncher/archive/refs/tags/v${_pkgver}.tar.gz" "use-system-7za-and-disable-updater.patch") -md5sums=('0d8ff9bdcd1cc5df2be4962adfaa71cf' - '82fbdbfac2a7c41d1209734e1f5633b7') -icon_sizes=(48 128 256 1024) +md5sums=('76c87c38980d6856f8a89795283154be' + 'c72fed43c676c710c8cfa3397270a977') prepare() { # Generate .desktop @@ -31,14 +30,16 @@ prepare() { -e 's$public/electron.js$build/electron.js$' \ -e '/"dependencies"/i\ "bundledDependencies": ["7zip-bin"],' patch -p1 -i "${srcdir}/use-system-7za-and-disable-updater.patch" - mkdir .git # Husky needs a .git folder to not die + + # Create .git folder to stop Husky from crashing + mkdir -p .git } build() { cd "${srcdir}/GDLauncher-${_pkgver}/" # Install required npm packages - npm install --cache="${srcdir}"/npm-cache + npm install --cache="${srcdir}/npm-cache" # Build the program export CI=false \ @@ -46,7 +47,7 @@ build() { NODE_ENV=production \ REACT_APP_RELEASE_TYPE=setup npx craco build - npx webpack --config scripts/electronWebpackConfig.js + npx webpack --config ./scripts/electronWebpackConfig.js } package() { @@ -57,7 +58,7 @@ package() { # Create run script install -d -m755 "${pkgdir}/usr/bin/" - printf '#!/bin/sh\nexec electron /usr/lib/gdlauncher "$@"' > "${pkgdir}/usr/bin/gdlauncher" + printf '#!/bin/sh\ncd /usr/lib/gdlauncher/\nexec electron . "$@"' > "${pkgdir}/usr/bin/gdlauncher" chmod a+x "${pkgdir}/usr/bin/gdlauncher" # Desktop entry @@ -65,8 +66,9 @@ package() { install -D -m644 "${srcdir}/GDLauncher.desktop" "${pkgdir}/usr/share/applications/GDLauncher.desktop" # Install icons - for size in "${icon_sizes[@]}"; do - install -d -m755 "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/" - convert "${srcdir}/GDLauncher-${_pkgver}/public/icon.png" -resize "${size}x${size}" "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${_pkgname}.png" + cd "${srcdir}/GDLauncher-${_pkgver}/public/linux-icons/" + for icon in *.png; do + install -d -m755 "${pkgdir}/usr/share/icons/hicolor/${icon::-4}/apps/" + cp "$icon" "${pkgdir}/usr/share/icons/hicolor/${icon::-4}/apps/${_pkgname}.png" done } diff --git a/use-system-7za-and-disable-updater.patch b/use-system-7za-and-disable-updater.patch index c6d5effd7782..edb76d175531 100644 --- a/use-system-7za-and-disable-updater.patch +++ b/use-system-7za-and-disable-updater.patch @@ -2,7 +2,7 @@ diff --git i/src/app/desktop/utils/index.js w/src/app/desktop/utils/index.js index 57399c69..3447920f 100644 --- i/src/app/desktop/utils/index.js +++ w/src/app/desktop/utils/index.js -@@ -5,7 +5,6 @@ import { extractFull } from 'node-7z'; +@@ -5,7 +5,6 @@ import jimp from 'jimp/es'; import makeDir from 'make-dir'; import { promisify } from 'util'; @@ -10,11 +10,10 @@ index 57399c69..3447920f 100644 import path from 'path'; import crypto from 'crypto'; import { exec, spawn } from 'child_process'; -@@ -313,34 +312,13 @@ export const isLatestJavaDownloaded = async ( - return { isValid, log: log?.stderr }; +@@ -314,25 +313,7 @@ }; --export const get7zPath = async () => { + export const get7zPath = async () => { - // Get userData from ipc because we can't always get this from redux - let baseDir = await ipcRenderer.invoke('getExecutablePath'); - if (process.env.NODE_ENV === 'development') { @@ -24,70 +23,20 @@ index 57399c69..3447920f 100644 - } else if (process.platform === 'linux') { - baseDir = path.join(baseDir, '7zip-bin/linux/x64'); - } else if (process.platform === 'darwin') { -- baseDir = path.join(baseDir, '7zip-bin/mac/x64'); +- baseDir = path.resolve(baseDir, '../../../', '7zip-bin/mac/x64'); - } - } -- if (process.platform === 'darwin' || process.platform === 'linux') { +- if (process.platform === 'linux') { - return path.join(baseDir, '7za'); - } +- if (process.platform === 'darwin') { +- return path.resolve(baseDir, '../', '7za'); +- } - return path.join(baseDir, '7za.exe'); --}; -- --get7zPath(); -- - export const extractAll = async ( - source, - destination, - args = {}, - funcs = {} - ) => { -- const sevenZipPath = await get7zPath(); -+ const sevenZipPath = '/usr/bin/7za'; - const extraction = extractFull(source, destination, { - ...args, - yes: true, -diff --git i/src/common/reducers/actions.js w/src/common/reducers/actions.js -index 040414d8..8ec014e4 100644 ---- i/src/common/reducers/actions.js -+++ w/src/common/reducers/actions.js -@@ -83,7 +83,6 @@ import { - } from '../utils/selectors'; - import { - librariesMapper, -- get7zPath, - extractNatives, - getJVMArguments112, - copyAssetsToResources, -@@ -1193,7 +1192,7 @@ export function downloadForge(instanceName) { - `${loader?.mcVersion}.json` - ); - -- const sevenZipPath = await get7zPath(); -+ const sevenZipPath = '/usr/bin/7za'; - const pre152 = lte(coerce(loader?.mcVersion), coerce('1.5.2')); - const pre132 = lte(coerce(loader?.mcVersion), coerce('1.3.2')); - const baseUrl = 'https://maven.minecraftforge.net/net/minecraftforge/forge'; -diff --git i/src/common/modals/InstanceExport/CurseForge/ThirdStep.js w/src/common/modals/InstanceExport/CurseForge/ThirdStep.js -index fef48aab..553c6c84 100644 ---- i/src/common/modals/InstanceExport/CurseForge/ThirdStep.js -+++ w/src/common/modals/InstanceExport/CurseForge/ThirdStep.js -@@ -10,7 +10,6 @@ import makeDir from 'make-dir'; - import { Transition } from 'react-transition-group'; - import styled from 'styled-components'; - import pMap from 'p-map'; --import { get7zPath } from '../../../../app/desktop/utils'; - import { FABRIC, VANILLA, FORGE } from '../../../utils/constants'; - import { getAddon } from '../../../api'; ++ return '/usr/bin/7za'; + }; -@@ -21,7 +20,7 @@ import { getAddon } from '../../../api'; - * @param {Array} filesArray Array of files to include. Relative to current working directory unless full path is passed for each file. - */ - const createZip = async (archiveName, zipDestPath, filesArray) => { -- const sevenZipPath = await get7zPath(); -+ const sevenZipPath = '/usr/bin/7za'; - const zipCreation = add7z( - path.join(zipDestPath, `${archiveName}.zip`), - filesArray, + get7zPath(); diff --git i/public/electron.js w/public/electron.js index d9d436fd..45801af6 100644 --- i/public/electron.js @@ -100,21 +49,35 @@ index d9d436fd..45801af6 100644 const log = require('electron-log'); const fss = require('fs'); const { promisify } = require('util'); -@@ -199,27 +198,6 @@ if ( - +@@ -199,40 +199,9 @@ log.log(process.env.REACT_APP_RELEASE_TYPE, app.getVersion()); --async function patchSevenZip() { -- let sevenZipPath = null; -- const baseDir = path.dirname(app.getPath('exe')); -- if (process.platform === 'darwin' || process.platform === 'linux') { -- sevenZipPath = path.join(baseDir, '7za'); -- } else { -- sevenZipPath = path.join(baseDir, '7za.exe'); + const get7zPath = async () => { +- let baseDir = path.dirname(app.getPath('exe')); +- if (process.env.NODE_ENV === 'development') { +- baseDir = path.resolve(baseDir, '../../'); +- if (process.platform === 'win32') { +- baseDir = path.join(baseDir, '7zip-bin/win/x64'); +- } else if (process.platform === 'linux') { +- baseDir = path.join(baseDir, '7zip-bin/linux/x64'); +- } else if (process.platform === 'darwin') { +- baseDir = path.resolve(baseDir, '../../../', '7zip-bin/mac/x64'); +- } - } -- +- if (process.platform === 'linux') { +- return path.join(baseDir, '7za'); +- } +- if (process.platform === 'darwin') { +- return path.resolve(baseDir, '../', '7za'); +- } +- return path.join(baseDir, '7za.exe'); ++ return '/usr/bin/7za'; + }; + +-async function patchSevenZip() { - try { - if (process.platform === 'linux' || process.platform === 'darwin') { +- const sevenZipPath = await get7zPath(); - await promisify(exec)(`chmod +x "${sevenZipPath}"`); - await promisify(exec)(`chmod 755 "${sevenZipPath}"`); - } @@ -123,7 +86,7 @@ index d9d436fd..45801af6 100644 - } -} - --if (!isDev) patchSevenZip(); +-patchSevenZip(); - function createWindow() { mainWindow = new BrowserWindow({ |