Skip to content

Commit cbc2a9c

Browse files
authored
Merge pull request #3 from runlevel5/0_6_14
Update to version 0.6.16
2 parents 5bb8c2a + e586983 commit cbc2a9c

9 files changed

+528
-18
lines changed

0001-fix-compilation-issue.patch

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From d49849a4a994e26876e2d19aa948f943a37718b8 Mon Sep 17 00:00:00 2001
2+
From: Trung Lê <[email protected]>
3+
Date: Sun, 24 Sep 2023 01:39:01 +1000
4+
Subject: [PATCH] Fix compilation issue
5+
6+
---
7+
CMakeLists.txt | 4 ++++
8+
1 file changed, 4 insertions(+)
9+
10+
diff --git a/CMakeLists.txt b/CMakeLists.txt
11+
index 57d6755..92523e8 100644
12+
--- a/CMakeLists.txt
13+
+++ b/CMakeLists.txt
14+
@@ -65,6 +65,10 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type -O0")
15+
# Fix build with Qt 5.13
16+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
17+
18+
+# Fix C++20 compat issue
19+
+# ref: https://github.com/MultiMC/Launcher/issues/5211
20+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++20-compat")
21+
+
22+
##################################### Set Application options #####################################
23+
24+
######## Set URLs ########
25+
--
26+
2.41.0
27+

0002-add-lin-system-layout.patch

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 57d6755a..4cfe848f 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -224,6 +224,17 @@ elseif(Launcher_LAYOUT_REAL STREQUAL "lin-nodeps")
6+
configure_file(launcher/Launcher.in "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" @ONLY)
7+
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" DESTINATION ${BUNDLE_DEST_DIR} RENAME ${Launcher_Name})
8+
9+
+elseif(Launcher_LAYOUT_REAL STREQUAL "lin-system")
10+
+ set(BINARY_DEST_DIR "bin")
11+
+ set(LIBRARY_DEST_DIR "lib")
12+
+ set(PLUGIN_DEST_DIR "plugins")
13+
+ set(BUNDLE_DEST_DIR ".")
14+
+ set(RESOURCES_DEST_DIR "resources")
15+
+ set(JARS_DEST_DIR "bin/jars")
16+
+
17+
+ # install as bundle with no dependencies included
18+
+ set(INSTALL_BUNDLE "nodeps")
19+
+
20+
elseif(Launcher_LAYOUT_REAL STREQUAL "win-bundle")
21+
set(BINARY_DEST_DIR ".")
22+
set(LIBRARY_DEST_DIR ".")
23+

0003-add-msa-client-id.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/notsecrets/Secrets.cpp b/notsecrets/Secrets.cpp
2+
index 88995635..ec83b583 100644
3+
--- a/notsecrets/Secrets.cpp
4+
+++ b/notsecrets/Secrets.cpp
5+
@@ -28,7 +28,7 @@ namespace {
6+
* If you intend to base your own launcher on this code, take care and customize this to obfuscate the client ID, so it cannot be trivially found by casual attackers.
7+
*/
8+
9+
-QString MSAClientID = "";
10+
+QString MSAClientID = "6b329578-bfec-42a3-b503-303ab3f2ac96";
11+
}
12+
13+
namespace Secrets {

multimc.desktop

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Desktop Entry]
2+
Version=1.0
3+
Name=MultiMC
4+
GenericName=Minecraft Launcher
5+
Comment=Free, open source launcher and instance manager for Minecraft.
6+
Type=Application
7+
Terminal=false
8+
Exec=multimc
9+
Icon=multimc
10+
Categories=Game
11+
Keywords=game;minecraft;

multimc.metainfo.xml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop">
3+
<id>multimc</id>
4+
<launchable type="desktop-id">multimc.desktop</launchable>
5+
<name>MultiMC</name>
6+
<summary>Manage Minecraft instances with ease</summary>
7+
<description>
8+
<p>Overview</p>
9+
<p>MultiMC is a free, open source launcher for Minecraft. It allows you to have multiple, cleanly separated instances of Minecraft (each with their own mods, texture packs, saves, etc) and helps you manage them and their associated options with a simple and powerful interface.</p>
10+
<p>Features</p>
11+
<ul>
12+
<li>Manage multiple instances of Minecraft at once</li>
13+
<li>Start Minecraft with a custom resolution</li>
14+
<li>Change Java's runtime options (including memory options)</li>
15+
<li>Shows Minecraft's console output in a colour coded window</li>
16+
<li>Kill Minecraft easily if it crashes / freezes</li>
17+
<li>Custom icons and groups for instances</li>
18+
<li>Forge integration (automatic installation, version downloads, mod management)</li>
19+
<li>Minecraft world management</li>
20+
<li>Import and export Minecraft instances to share them with anyone</li>
21+
<li>Supports every version of Minecraft that the vanilla launcher does</li>
22+
</ul>
23+
</description>
24+
<screenshots>
25+
<screenshot type="default">
26+
<image type="source" width="936" height="921">https://multimc.org/images/screenshots/main.png</image>
27+
</screenshot>
28+
<screenshot>
29+
<image type="source" width="936" height="998">https://multimc.org/images/screenshots/editmods.png</image>
30+
</screenshot>
31+
<screenshot>
32+
<image type="source" width="936" height="998">https://multimc.org/images/screenshots/version.png</image>
33+
</screenshot>
34+
<screenshot>
35+
<image type="source" width="936" height="998">https://multimc.org/images/screenshots/console.png</image>
36+
</screenshot>
37+
<screenshot>
38+
<image type="source" width="936" height="921">https://multimc.org/images/screenshots/settings.png</image>
39+
</screenshot>
40+
</screenshots>
41+
<releases>
42+
<release date="2021-01-07" version="5"/>
43+
</releases>
44+
<url type="homepage">https://multimc.org/</url>
45+
<url type="help">https://discord.gg/multimc</url>
46+
<url type="faq">https://github.com/MultiMC/Launcher/wiki/FAQ</url>
47+
<url type="bugtracker">https://github.com/MultiMC/Launcher/issues</url>
48+
<url type="translate">https://translate.multimc.org/</url>
49+
<url type="donation">https://www.patreon.com/multimc</url>
50+
<developer_name>The MultiMC Team</developer_name>
51+
<metadata_license>CC0-1.0</metadata_license>
52+
<project_license>Apache-2.0</project_license>
53+
<update_contact>peterix_at_gmail.com</update_contact>
54+
</component>

multimc.spec

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
%global libnbtplusplus_commit dc72a20b7efd304d12af2025223fad07b4b78464
55
%global libnbtplusplus_shortcommit %(c=%{libnbtplusplus_commit}; echo ${c:0:7})
6-
%global quazip_commit 3691d57d3af13f49b2be2b62accddefee3c26b9c
6+
%global quazip_commit b1a72ac0bb5a732bf887a535ab75c6f9bedb6b6b
77
%global quazip_shortcommit %(c=%{quazip_commit}; echo ${c:0:7})
88

99
Name: multimc
10-
Version: 0.6.13
10+
Version: 0.6.16
1111
Release: 1%{?dist}
1212
Summary: Minecraft launcher with ability to manage multiple instances
1313

@@ -59,15 +59,24 @@ Summary: Minecraft launcher with ability to manage multiple instances
5959

6060
License: CC-BY-SA and ASL 2.0 and BSD and Boost and LGPLv2 and LGPLv2+ and LGPLv3+ and GPLv2 and GPLv2+ and ISC and zlib
6161
URL: https://multimc.org
62-
Source0: https://github.com/MultiMC/MultiMC5/archive/%{version}/%{name}-%{version}.tar.gz
62+
Source0: https://github.com/MultiMC/Launcher/archive/%{version}/%{name}-%{version}.tar.gz
6363
Source1: https://github.com/MultiMC/libnbtplusplus/archive/%{libnbtplusplus_commit}/libnbtplusplus-%{libnbtplusplus_shortcommit}.tar.gz
6464
Source2: https://github.com/MultiMC/quazip/archive/%{quazip_commit}/quazip-%{quazip_shortcommit}.tar.gz
65+
Source3: %{expand:%%(pwd)/multimc.svg}
66+
Source4: %{expand:%%(pwd)/multimc.desktop}
67+
Source5: %{expand:%%(pwd)/multimc.metainfo.xml}
68+
Source6: %{expand:%%(pwd)/runner.sh}
69+
70+
Patch1: 0001-fix-compilation-issue.patch
71+
Patch2: 0002-add-lin-system-layout.patch
72+
Patch3: 0003-add-msa-client-id.patch
6573

6674
%if %{with ninja_build}
6775
BuildRequires: ninja-build
6876
%endif
6977

7078
BuildRequires: cmake3
79+
BuildRequires: /usr/bin/appstream-util
7180
BuildRequires: desktop-file-utils
7281
BuildRequires: gcc-c++
7382

@@ -94,23 +103,27 @@ a simple interface.
94103

95104

96105
%prep
97-
%autosetup -p1 -n MultiMC5-%{version}
106+
%autosetup -p1 -n Launcher-%{version}
98107

99108
tar -xvf %{SOURCE1} -C libraries
100109
tar -xvf %{SOURCE2} -C libraries
101110
rmdir libraries/libnbtplusplus libraries/quazip
102111
mv -f libraries/quazip-%{quazip_commit} libraries/quazip
103112
mv -f libraries/libnbtplusplus-%{libnbtplusplus_commit} libraries/libnbtplusplus
104113

114+
cp %{SOURCE3} .
115+
cp %{SOURCE4} .
116+
cp %{SOURCE5} .
117+
cp %{SOURCE6} .
105118

106119
%build
107120
%cmake \
108121
%{?with_ninja_build: -GNinja} \
109122
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
110-
-DMultiMC_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json \
111-
-DMultiMC_LAYOUT=lin-system \
112-
-DMultiMC_LIBRARY_DEST_DIR=%{_libdir}/%{name} \
113-
-DMultiMC_UPDATER=OFF \
123+
-DLauncher_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json \
124+
-DCMAKE_INSTALL_PREFIX=/opt/%{name} \
125+
-DLauncher_EMBED_SECRETS=OFF \
126+
-DLauncher_LAYOUT=lin-system \
114127
.
115128

116129
%cmake_build
@@ -120,35 +133,45 @@ mv -f libraries/libnbtplusplus-%{libnbtplusplus_commit} libraries/libnbtplusplus
120133
%cmake_install
121134

122135
# Install SVG icon...
123-
install -Dp -m 0644 launcher/resources/multimc/scalable/multimc.svg \
136+
install -Dp -m 0644 ./multimc.svg \
124137
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
125138

126139
# Install desktop file...
127-
desktop-file-install launcher/package/linux/multimc.desktop
140+
desktop-file-install ./multimc.desktop
141+
142+
# Install metainfo XML file...
143+
mkdir -p %{buildroot}%{_metainfodir}
144+
install -m 0644 ./multimc.metainfo.xml %{buildroot}%{_metainfodir}/multimc.metainfo.xml
145+
146+
# Install the runner file...
147+
mkdir -p %{buildroot}%{_bindir}
148+
install -m 0755 ./runner.sh %{buildroot}%{_bindir}/%{name}
128149

129150
# Proper library linking...
130151
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
131-
echo "%{_libdir}/%{name}" > "%{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf"
132-
152+
echo "/opt/%{name}/lib" > "%{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf"
133153

134154
%check
135-
%ctest
155+
%ctest %{?_smp_mflags}
136156
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
137-
157+
appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/multimc.metainfo.xml
138158

139159
%files
140160
%license COPYING.md
141161
%doc README.md changelog.md
142162
%{_bindir}/%{name}
143-
%{_libdir}/%{name}/*
144-
%{_datadir}/%{name}/*
163+
/opt/%{name}/*
145164
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
146165
%{_datadir}/applications/%{name}.desktop
166+
%{_metainfodir}/multimc.metainfo.xml
147167
%config %{_sysconfdir}/ld.so.conf.d/*
148168

149-
150-
151169
%changelog
170+
* Sat Sep 23 2023 Trung Lê <[email protected]> - 0.6.16-1
171+
- Update to version 0.6.16
172+
- Restore the deleted lin-system LAYOUT in CMakeList.txt
173+
- Bundle the metainfo, desktop and runner
174+
152175
* Fri Sep 24 2021 ElXreno - 0.6.13-1
153176
- Update to version 0.6.13
154177
Add recommended dependency (@critbase request)

0 commit comments

Comments
 (0)