Create hello-platform for Linux (#13)
Co-authored-by: Михаил Капелько <kornerr@gmail.com>
This commit is contained in:
1 parent
45ca185094
commit
614392c921
23 files changed
+4720
-7
No files matched your search
@@ -195,3 +195,31 @@ AGP 8.7.3 does not accept every newer JDK.
|
||||
the macOS file, so `prepare-ios` regenerates the same source. The Kotlin
|
||||
`dialect.kt` lives in `ver-android` and is generated from the same
|
||||
`dialect.yml`.
|
||||
|
||||
## Linux launcher icon
|
||||
|
||||
`ver-linux` uses GtkBackend with application ID
|
||||
`org.opengamestudio.hello-platform`. On Linux run
|
||||
`hello/hello-platform/util/build-linux` from the repository root to build and install
|
||||
the executable under `~/.local/bin`, the desktop entry under
|
||||
`${XDG_DATA_HOME:-~/.local/share}/applications`, and the shared 1024px
|
||||
`res/AppIcon.png` under the matching hicolor icon name. The launcher uses an
|
||||
absolute executable path. Launch from the desktop application menu after
|
||||
installation; GTK's application ID matches the desktop and icon names.
|
||||
Desktop-entry installation uses `cp` and GNU `sed -i`; Python is not required.
|
||||
The replacement supports spaces but assumes paths contain no sed replacement
|
||||
metacharacters (`&`, `|`, backslashes) or desktop-entry quoting characters.
|
||||
Requires the normal Swift/GTK build dependencies. Installation is per-user and
|
||||
requires no root privileges.
|
||||
|
||||
The Linux build runs `step/buildLinux` followed by `step/packageLinux`.
|
||||
The shared launcher template is `res/linux-app.desktop`; packaging copies it
|
||||
and substitutes `%APP_NAME%`, `%APP_EXEC%` and `%APP_ID%`.
|
||||
`util/run-linux` uses `gtk-launch org.opengamestudio.hello-platform` to launch
|
||||
the installed desktop entry with its icon association. Run `util/build-linux`
|
||||
first to install/update that entry and executable; `gtk-launch` must be available.
|
||||
`packageLinux` is sourced with the target and display name, like `packageMac`;
|
||||
it installs the executable, launcher and icon for the current user and refreshes
|
||||
the desktop/icon caches. It requires GNU sed, gtk-update-icon-cache and
|
||||
update-desktop-database. The standalone `install-linux` script has been replaced
|
||||
by this packaging step.
|
||||
Reference in new issue
Block a user