Skip to content

Commit 866544d

Browse files
committed
AppImage structure (symlinks)
1 parent 499bdd5 commit 866544d

File tree

4 files changed

+57
-16
lines changed

4 files changed

+57
-16
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Emulsion is **reproducible** - one single config file - and **arcade ready** ; P
3838
- [**Linux RPM**](https://github.com/yphil-dev/emulsion/releases/latest/download/emulsion_x86_64.rpm)
3939
- [**Linux AppImage**](https://github.com/yphil-dev/emulsion/releases/latest/download/emulsion_x86_64.AppImage)
4040
- [**Linux Arch**](https://github.com/yphil-dev/emulsion/releases/latest/download/emulsion_x86_64.pacman)
41-
- [**FreeBSD**](https://github.com/yphil-dev/emulsion/releases/latest/download/emulsion_x86_64.freebsd)
41+
- [**FreeBSD**](https://github.com/yphil-dev/emulsion/releases/latest/download/emulsion_x86_64.freebsd) (untested, working on it)
4242
- [**Windows**](https://github.com/yphil-dev/emulsion/releases/latest/download/emulsion_x64.exe)
4343
- [**Mac OS** (testers needed)](https://github.com/yphil-dev/emulsion/releases/latest/download/emulsion_x64.dmg)
4444

@@ -86,9 +86,9 @@ Emulsion finds your emulators, helps you install the ones you don’t have, and
8686

8787
![Emulators management](https://yphil.gitlab.io/images/emulsion-emulators-n64.png?cache=x)
8888

89-
Emulsion is up-to-date on Linux emulators and the way they work (extensions + arguments) ; Smart, [DWIM](https://en.wikipedia.org/wiki/DWIM) & and hassle-free.
89+
Emulsion keeps up-to-date on platforms emulators and their extensions and arguments.
9090

91-
> ⚠️ **Note**: Automatic emulator installation / selection is currently only available on Linux. On Windows and macOS, emulators must be installed manually. No biggie, the result is the same anyway: setup and forget.
91+
> ⚠️ **Note**: Automatic emulator installation / selection is currently only available on Linux. On BSD, macOS and Windows, emulators must be installed manually. No biggie, the result is the same anyway: setup and forget.
9292
9393
#### Other OSes
9494

build/after-pack.js

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,26 @@ export default async (context) => {
2828
// Generate XML content
2929
const xmlContent = `<?xml version="1.0" encoding="UTF-8"?>
3030
<component type="desktop-application">
31-
<id>emulsion.desktop</id>
31+
<id>io.gitlab.yphil.emulsion</id>
32+
<metadata_license>CC0-1.0</metadata_license>
33+
<project_license>GPL-3.0+</project_license>
3234
<name>Emulsion</name>
33-
<summary>Game collection manager</summary>
35+
<developer_name>yPhil</developer_name>
36+
<summary>Better gaming throught chemistry</summary>
37+
<releases>
38+
<release version="${version}" date="${currentDate}"/>
39+
</releases>
3440
<description>
3541
<p>Display your games collection into responsive galleries, manage game metadata, cover art and emulator configuration. Launch your games in style.</p>
3642
</description>
43+
<launchable type="desktop-id">io.gitlab.yphil.emulsion.desktop</launchable>
44+
<url type="homepage">https://yphil.gitlab.io/emulsion/</url>
45+
<url type="help">https://gitlab.com/yphil/emulsion</url>
46+
<url type="bugtracker">https://gitlab.com/yphil/emulsion/-/issues</url>
3747
<categories>
38-
<category>Utility</category>
39-
<category>Game</category>
48+
<category>Games</category>
49+
<category>Productivity</category>
4050
</categories>
41-
<developer_name>yPhil</developer_name>
42-
<license>GPL-3.0+</license>
43-
<homepage>https://yphil.gitlab.io/emulsion</homepage>
4451
<screenshots>
4552
<screenshot type="default">
4653
<image>https://yphil.gitlab.io/images/emulsion-screenshot_01.png</image>
@@ -49,9 +56,6 @@ export default async (context) => {
4956
<image>https://yphil.gitlab.io/images/emulsion-screenshot_02.png</image>
5057
</screenshot>
5158
</screenshots>
52-
<releases>
53-
<release version="${version}" date="${currentDate}"/>
54-
</releases>
5559
</component>`;
5660

5761
// Create metainfo directory if it doesn't exist
@@ -63,4 +67,41 @@ export default async (context) => {
6367
// Write the XML file
6468
fs.writeFileSync(targetFile, xmlContent, 'utf8');
6569
console.log(` • AppStream metadata OK: ${targetFile} (version: ${version}, date: ${currentDate})`);
70+
71+
console.log(' • Generating desktop file for AppImage...');
72+
73+
const applicationsDir = path.join(appOutDir, 'usr', 'share', 'applications');
74+
const desktopFile = path.join(applicationsDir, 'io.gitlab.yphil.emulsion.desktop');
75+
76+
// Generate desktop file content
77+
const desktopContent = `[Desktop Entry]
78+
Name=Emulsion (AppImage)
79+
Comment=Display your games collection into responsive galleries, manage game metadata, cover art and emulator configuration. Launch your games in style.
80+
Exec=emulsion
81+
Icon=emulsion
82+
StartupNotify=true
83+
Terminal=false
84+
Type=Application
85+
Categories=Games;Productivity;
86+
`;
87+
88+
// Create applications directory if it doesn't exist
89+
if (!fs.existsSync(applicationsDir)) {
90+
fs.mkdirSync(applicationsDir, { recursive: true });
91+
console.log(` • Created directory: ${applicationsDir}`);
92+
}
93+
94+
// Write the desktop file
95+
fs.writeFileSync(desktopFile, desktopContent, 'utf8');
96+
console.log(` • Desktop file OK: ${desktopFile}`);
97+
98+
// Create symlink in the root directory
99+
const symlinkPath = path.join(appOutDir, 'io.gitlab.yphil.emulsion.desktop');
100+
try {
101+
fs.symlinkSync(desktopFile, symlinkPath);
102+
console.log(` • Symlink created: ${symlinkPath} -> ${desktopFile}`);
103+
} catch (error) {
104+
// Symlink might already exist or fail on some filesystems
105+
console.log(` • Warning: Could not create symlink: ${error.message}`);
106+
}
66107
};

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "emulsion",
3-
"version": "0.10.15",
3+
"version": "0.10.16",
44
"summary": "Better gaming throught chemistry",
55
"description": "Display your games collection into responsive galleries, manage game metadata, cover art and emulator configuration. Launch your games in style.",
66
"homepage": "https://yphil.gitlab.io/emulsion",

0 commit comments

Comments
 (0)