summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorhuantian2021-08-31 16:31:14 -0700
committerhuantian2021-08-31 16:31:14 -0700
commit77f40d0431b8e2a6b7e318f5774398763ee71843 (patch)
tree246880dec8f41957ba6e3fa40a1f275a80a12cd8
parent63e5e9ceae14848cd5ea9bcd88908701b060e62f (diff)
downloadaur-77f40d0431b8e2a6b7e318f5774398763ee71843.tar.gz
1.1.15.beta.3
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD11
-rw-r--r--use-system-7za-and-disable-updater.patch122
3 files changed, 94 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a641671b93cf..efa85e424eb0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
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.2
- pkgrel = 2
+ pkgver = 1.1.15.beta.3
+ pkgrel = 1
url = https://gdevs.io
arch = x86_64
license = GPL3
@@ -25,9 +25,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.2.tar.gz
+ source = https://github.com/gorilla-devs/GDLauncher/archive/refs/tags/v1.1.15-beta.3.tar.gz
source = use-system-7za-and-disable-updater.patch
- md5sums = 06eff5e281d3f4c3896be2119c373711
- md5sums = 0ccba0e195278ab1de3fec6ea0445afa
+ md5sums = 0d8ff9bdcd1cc5df2be4962adfaa71cf
+ md5sums = 82fbdbfac2a7c41d1209734e1f5633b7
pkgname = gdlauncher-beta
diff --git a/PKGBUILD b/PKGBUILD
index 6c112d8aee6a..f0c42e2848ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,9 +2,9 @@
# Based on the PKGBUILD for gdlauncher.
pkgname="gdlauncher-beta"
_pkgname="gdlauncher"
-pkgver="1.1.15.beta.2"
-_pkgver="1.1.15-beta.2"
-pkgrel=2
+pkgver="1.1.15.beta.3"
+_pkgver="1.1.15-beta.3"
+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"
@@ -15,8 +15,8 @@ conflicts=('gdlauncher' 'gdlauncher-beta-bin' 'gdlauncher-appimage' 'gdlauncher-
provides=('gdlauncher')
source=("https://github.com/gorilla-devs/GDLauncher/archive/refs/tags/v${_pkgver}.tar.gz"
"use-system-7za-and-disable-updater.patch")
-md5sums=('06eff5e281d3f4c3896be2119c373711'
- '0ccba0e195278ab1de3fec6ea0445afa')
+md5sums=('0d8ff9bdcd1cc5df2be4962adfaa71cf'
+ '82fbdbfac2a7c41d1209734e1f5633b7')
icon_sizes=(48 128 256 1024)
prepare() {
@@ -38,7 +38,6 @@ build() {
cd "${srcdir}/GDLauncher-${_pkgver}/"
# Install required npm packages
- export CARGO_HOME="${srcdir}/cargo-cache"
npm install --cache="${srcdir}"/npm-cache
# Build the program
diff --git a/use-system-7za-and-disable-updater.patch b/use-system-7za-and-disable-updater.patch
index a07637c91352..c6d5effd7782 100644
--- a/use-system-7za-and-disable-updater.patch
+++ b/use-system-7za-and-disable-updater.patch
@@ -1,5 +1,5 @@
diff --git i/src/app/desktop/utils/index.js w/src/app/desktop/utils/index.js
-index 343d5ad8..45d5a927 100644
+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';
@@ -10,24 +10,86 @@ index 343d5ad8..45d5a927 100644
import path from 'path';
import crypto from 'crypto';
import { exec, spawn } from 'child_process';
-@@ -301,14 +300,7 @@ export const isLatestJavaDownloaded = async (meta, userData, retry) => {
- return isValid;
+@@ -313,34 +312,13 @@ export const isLatestJavaDownloaded = async (
+ return { isValid, log: log?.stderr };
};
-export const get7zPath = async () => {
- // Get userData from ipc because we can't always get this from redux
-- const baseDir = await ipcRenderer.invoke('getUserData');
+- let baseDir = await ipcRenderer.invoke('getExecutablePath');
+- 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.join(baseDir, '7zip-bin/mac/x64');
+- }
+- }
- if (process.platform === 'darwin' || process.platform === 'linux') {
- return path.join(baseDir, '7za');
- }
- return path.join(baseDir, '7za.exe');
-};
-+export const get7zPath = async () => '/usr/bin/7za';
+-
+-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';
- export const extractNatives = async (libraries, instancePath) => {
- const extractLocation = path.join(instancePath, 'natives');
+@@ -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,
diff --git i/public/electron.js w/public/electron.js
-index 800a66f8..58bfb998 100644
+index d9d436fd..45801af6 100644
--- i/public/electron.js
+++ w/public/electron.js
@@ -12,7 +12,6 @@ const {
@@ -38,51 +100,35 @@ index 800a66f8..58bfb998 100644
const log = require('electron-log');
const fss = require('fs');
const { promisify } = require('util');
-@@ -179,43 +178,6 @@ log.log(process.env.REACT_APP_RELEASE_TYPE, app.getVersion());
+@@ -199,27 +198,6 @@ if (
- const isDev = process.env.NODE_ENV === 'development';
+ log.log(process.env.REACT_APP_RELEASE_TYPE, app.getVersion());
--async function extract7z() {
-- const baseDir = path.join(app.getAppPath(), 'node_modules', '7zip-bin');
--
-- let zipLocationAsar = path.join(baseDir, 'linux', 'x64', '7za');
-- if (process.platform === 'darwin') {
-- zipLocationAsar = path.join(baseDir, 'mac', 'x64', '7za');
-- }
-- if (process.platform === 'win32') {
-- zipLocationAsar = path.join(baseDir, 'win', 'x64', '7za.exe');
+-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');
- }
-- try {
-- await fs.copyFile(
-- zipLocationAsar,
-- path.join(app.getPath('userData'), path.basename(zipLocationAsar))
-- );
-
+- try {
- if (process.platform === 'linux' || process.platform === 'darwin') {
-- await promisify(exec)(
-- `chmod +x "${path.join(
-- app.getPath('userData'),
-- path.basename(zipLocationAsar)
-- )}"`
-- );
-- await promisify(exec)(
-- `chmod 755 "${path.join(
-- app.getPath('userData'),
-- path.basename(zipLocationAsar)
-- )}"`
-- );
+- await promisify(exec)(`chmod +x "${sevenZipPath}"`);
+- await promisify(exec)(`chmod 755 "${sevenZipPath}"`);
- }
- } catch (e) {
- log.error(e);
- }
-}
-
--extract7z();
+-if (!isDev) patchSevenZip();
-
function createWindow() {
mainWindow = new BrowserWindow({
width: 1100,
-@@ -609,79 +571,3 @@ ipcMain.handle('calculateMurmur2FromPath', (e, filePath) => {
+@@ -617,79 +595,3 @@ ipcMain.handle('calculateMurmur2FromPath', (e, filePath) => {
});
});
});