Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flatpak builds to use 24.08 Freedesktop Runtime and SDK #455

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
options: --privileged

env:
MANIFEST_PATH: build-aux/flatpak/${{ inputs.flatpak_branch }}/com.inochi2d.inochi-creator.yml
MANIFEST_PATH: build-aux/linux/flatpak/com.inochi2d.inochi-creator.yml
FLATPAK_BRANCH: ${{ inputs.flatpak_branch }}
FLATPAK_BUILD_DIR: build-dir
FLATPAK_BUILD_REPO: build-repo
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "res/flatpak/shared-modules"]
path = build-aux/flatpak/shared-modules
url = https://github.com/flathub/shared-modules.git
109 changes: 0 additions & 109 deletions build-aux/flatpak/modules/ffmpeg.yml

This file was deleted.

1 change: 0 additions & 1 deletion build-aux/flatpak/shared-modules
Submodule shared-modules deleted from 503143
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
id: com.inochi2d.inochi-creator
runtime: org.freedesktop.Platform
runtime-version: '22.08'
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.ldc
- org.freedesktop.Sdk.Extension.llvm14
- org.freedesktop.Sdk.Extension.llvm18
add-extensions:
- org.freedesktop.Platform.ffmpeg-full:
version: '24.08'
directory: lib/ffmpeg
add-ld-path: .
command: inochi-creator
finish-args:
- --device=all #OpenGL rendering, webcams (may be required? not sure)
- --device=all # OpenGL rendering, webcams (may be required? not sure)
- --socket=fallback-x11
- --share=ipc
- --socket=wayland
- --filesystem=host #This is a dev tool, it should probably have as much access to the host as it can. Also needs it for "Recent Files"

## freedesktop ffmpeg extension doesn't provide rawvideo demuxer
##This extension will be needed in some newer releases, as of https://github.com/Inochi2D/inochi-creator/commit/5d67cded1273aced9033d327a8eb29c6f078a3c0
#add-extensions:
# org.freedesktop.Platform.ffmpeg-full:
# version: '22.08'
# autodownload: true
# autodelete: false

- --filesystem=host # This is a dev tool, it should probably have as much access to the host as it can. Also needs it for "Recent Files"
cleanup-commands:
- mkdir -p ${FLATPAK_DEST}/lib/ffmpeg

modules:

- ../shared-modules/SDL2/SDL2-with-libdecor.json

# Add ffmpeg to support animation recording
- ../modules/ffmpeg.yml

# --- Inochi Creator ---
- name: Inochi-Creator
buildsystem: simple
Expand All @@ -37,17 +30,20 @@ modules:
- "--share=network"

append-path: /usr/lib/sdk/ldc/bin
prepend-path: /usr/lib/sdk/llvm18/bin
prepend-ld-library-path: /usr/lib/sdk/llvm18/lib
env:
DFLAGS: '-g --d-debug'
build-commands:
- chmod +x ./gentl.sh; ./gentl.sh
- git clone https://github.com/Inochi2D/i2d-imgui.git --recurse-submodules;
git clone -b v0_8 https://github.com/Inochi2D/inochi2d.git;
git clone https://github.com/Inochi2D/dcv-i2d;
dub add-local i2d-imgui/ "0.8.0";
dub add-local inochi2d/ "0.8.5";
dub add-local dcv-i2d/ "0.3.0";
dub build --config=update-version;
dub build --config=meta;
dub build --config=linux-nightly --debug=InExperimental
- install -m 755 ./out/inochi-creator /app/bin/inochi-creator
- install -Dm 755 ./out/inochi-creator /app/bin/inochi-creator
- install -Dm644 ./out/*.mo /app/bin

sources:
Expand All @@ -70,4 +66,4 @@ modules:
commit: a412602d346ba69c63237217ae286112e300927d

- type: dir
path: ../../linux/flatpak/nightly/
path: ./nightly/
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<component type="desktop">
<id>com.inochi2d.inochi-creator</id>
<name>Inochi Creator</name>
<summary>Tool to create and edit Inochi2D puppets.</summary>
<developer_name>Luna Nielsen</developer_name>
<summary>Create and edit Inochi2D puppets</summary>
<developer id="com.inochi2d">
<name>Luna the Foxgirl</name>
</developer>
<launchable type="desktop-id">com.inochi2d.inochi-creator.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-2-Clause</project_license>
Expand Down Expand Up @@ -37,9 +39,13 @@
<categories>
<category>Graphics</category>
</categories>
<requires>
<recommends>
<control>pointing</control>
<control>keyboard</control>
</requires>
</recommends>
<branding>
<color type="primary" scheme_preference="light">#dbdbdb</color>
<color type="primary" scheme_preference="dark">#242424</color>
</branding>
<content_rating type="oars-1.1"/>
</component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>com.inochi2d.inochi-creator</id>
<name>Inochi Creator</name>
<summary>Create and edit Inochi2D puppets</summary>
<developer id="com.inochi2d">
<name>Luna the Foxgirl</name>
</developer>
<launchable type="desktop-id">com.inochi2d.inochi-creator.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-2-Clause</project_license>
<description>
<p>Inochi2D is a framework for realtime 2D puppet animation which can be used for VTubing,
game development and digital animation.</p>
<p>Inochi Creator is a tool that lets you create and edit Inochi2D puppets.</p>
</description>
<screenshots>
<screenshot type="default">
<caption>Title screen</caption>
<image type="source">https://user-images.githubusercontent.com/7032834/194462402-74c4a3e0-50ca-4b50-8e8d-164d97371f5a.png</image>
</screenshot>
</screenshots>
<releases>
<release version="stable"/>
</releases>
<url type="homepage">https://lunafoxgirlvt.itch.io/inochi-creator</url>
<url type="bugtracker">https://github.com/Inochi2D/inochi-creator/issues</url>
<url type="help">https://docs.inochi2d.com</url>
<url type="donation">https://inochi2d.com/#donate</url>
<url type="vcs-browser">https://github.com/Inochi2D/inochi-creator</url>
<url type="contribute">https://github.com/Inochi2D/inochi-creator</url>
<categories>
<category>Graphics</category>
</categories>
<recommends>
<control>pointing</control>
<control>keyboard</control>
</recommends>
<branding>
<color type="primary" scheme_preference="light">#dbdbdb</color>
<color type="primary" scheme_preference="dark">#242424</color>
</branding>
<content_rating type="oars-1.1"/>
</component>
6 changes: 6 additions & 0 deletions build-aux/linux/flatpak/release/inochi-creator.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Name=Inochi Creator
Exec=inochi-creator
Icon=com.inochi2d.inochi-creator
Type=Application
Categories=Utility
5 changes: 3 additions & 2 deletions source/creator/core/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ ImGuiID incGetViewportDockSpace() {
*/
void incOpenWindow() {
import std.process : environment;
import std.string : fromStringz;

switch(environment.get("XDG_SESSION_DESKTOP")) {
case "i3":
Expand Down Expand Up @@ -249,10 +250,10 @@ void incOpenWindow() {
}


int code = SDL_Init(SDL_INIT_EVERYTHING);
int code = SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO);
enforce(
code == 0,
"Error initializing SDL2! %s".format(SDL_GetError())
"Error initializing SDL2! %s".format(SDL_GetError().fromStringz)
);

version(Windows) {
Expand Down
Loading