diff --git a/.github/workflows/build-flatpak.yml b/.github/workflows/build-flatpak.yml index b4b2af993..b2c264281 100644 --- a/.github/workflows/build-flatpak.yml +++ b/.github/workflows/build-flatpak.yml @@ -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 diff --git a/.gitmodules b/.gitmodules index 0bfa947ae..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "res/flatpak/shared-modules"] - path = build-aux/flatpak/shared-modules - url = https://github.com/flathub/shared-modules.git diff --git a/build-aux/flatpak/modules/ffmpeg.yml b/build-aux/flatpak/modules/ffmpeg.yml deleted file mode 100644 index 2af8141ea..000000000 --- a/build-aux/flatpak/modules/ffmpeg.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: ffmpeg - -# Add required libs to this file -#modules: -# ffmpeg-libs.yml - -config-opts: - - --disable-stripping - - --disable-doc - - --disable-static - - --enable-shared - - --disable-everything - - --enable-ffplay - - --enable-ffprobe - - --enable-gnutls - - --enable-libaom - - --enable-libdav1d - - --enable-libfdk-aac - - --enable-libmp3lame - - --enable-libfontconfig - - --enable-libfreetype - - --enable-libopus - - --enable-libpulse - - --enable-libspeex - - --enable-libtheora - - --enable-libvorbis - - --enable-libvpx - - --enable-libwebp - - --enable-openal - - --enable-opengl - - --enable-sdl2 - - --enable-vulkan - - --enable-zlib - - --enable-libv4l2 - - --enable-libxcb - - --enable-vdpau - - --enable-vaapi - - --enable-pthreads - - --enable-libopenh264 - - >- - --enable-hwaccel= - vp8_vaapi,mjpeg_vaapi,h263_vaapi,h264_vaapi,h264_vdpau,hevc_vaapi, - hevc_vdpau,mpeg4_vaapi,mpeg4_vdpau - - >- - --enable-parser= - aac,ac3,flac,mjpeg,mpegaudio,mpeg4video,opus,vp3,vp8,vp9,vorbis,hevc, - h263,h264,dca - - >- - --enable-muxer= - ac3,ass,flac,g722,gif,matroska,mp3,mpegvideo,rtp,ogg,opus,pcm_s16be, - pcm_s16le,wav,webm,asf,avi,h263,h264,hevc,mp4,rawvideo,apng,avif,image2 - - >- - --enable-demuxer= - aac,ac3,ass,flac,g722,gif,image_jpeg_pipe,image_png_pipe, - image_webp_pipe,matroska,mjpeg,mov,mp3,mpegvideo,ogg,pcm_mulaw,rawvideo, - pcm_alaw,pcm_s16be,pcm_s16le,rtp,wav,ape,asf,avi,h263,h264,hevc,m4v, - mjpeg_2000,mp4,wav,xwma,apng - - >- - --enable-filter= - atempo,crop,scale,overlay,amix,amerge,aresample,format,aformat,fps, - transpose,pad - - >- - --enable-indev= - v4l2,xcbgrab - - >- - --enable-protocol= - crypto,file,pipe,rtp,srtp,rtsp,tcp,udp,unix,fd - # Audio codecs - - >- - --enable-encoder= - ac3,alac,flac,libfdk_aac,g723_1,mp2,libmp3lame,libopus,libspeex, - pcm_alaw,pcm_mulaw,pcm_f32le,pcm_s16be,pcm_s24be,pcm_s16le, - pcm_s24le,pcm_s32le,pcm_u8,tta,libvorbis,wavpack,wmav1,wmav2 - - >- - --enable-decoder= - adpcm_g722,alac,flac,g723_1,g729,libfdk_aac,libopus,libspeex, - mp2,mp3,m4a,pcm_alaw,pcm_mulaw,pcm_f16le,pcm_f24le,pcm_f32be, - pcm_f32le,pcm_f64be,pcm_f64le,pcm_s16be,pcm_s16be_planar,pcm_s24be, - pcm_s16le,pcm_s16le_planar,pcm_s24le,pcm_s24le_planar,pcm_s32le, - pcm_s32le_planar,pcm_s64be,pcm_s64le,pcm_s8,pcm_s8_planar, - pcm_u8,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,tta,vorbis,wavpack, - ape,dca,eac3,mlp,tak,truehd,wmav1,wmav2,wmapro - - # Video codecs - - >- - --enable-encoder= - ass,ffv1,libaom_av1,libvpx_vp8,libvpx_vp9,mjpeg_vaapi,rawvideo, - theora,vp8_vaapi,libopenh264,h263,h263p,h264,ljpeg,mpeg4,wmv1,wmv2, - apng - - >- - --enable-decoder= - ass,ffv1,mjpeg,mjpegb,libaom_av1,libdav1d,libvpx_vp8,libvpx_vp9, - rawvideo,theora,vp8,vp9,libopenh264,cinepak,flv,hevc,h263,h264, - indeo2,indeo3,indeo4,indeo5,jpeg2000,mpeg2video,mpeg4,msmpeg4, - msmpeg4v1,msmpeg4v2,msmpeg4v3,vp6,vp6a,vp6f,wmv1,wmv2,wmv3, - wmv3image,apng - # Image codecs - - >- - --enable-encoder= - bmp,gif,jpegls,png,tiff,webp - - >- - --enable-decoder= - bmp,gif,jpegls,png,tiff,webp -cleanup: - - /share/ffmpeg/examples -sources: - - type: archive - url: https://ffmpeg.org/releases/ffmpeg-6.0.tar.xz - sha256: 57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 \ No newline at end of file diff --git a/build-aux/flatpak/shared-modules b/build-aux/flatpak/shared-modules deleted file mode 160000 index 50314360d..000000000 --- a/build-aux/flatpak/shared-modules +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 50314360ded6fa3b9f0b602513b1164b7a6636ed diff --git a/build-aux/flatpak/nightly/com.inochi2d.inochi-creator.yml b/build-aux/linux/flatpak/com.inochi2d.inochi-creator.yml similarity index 64% rename from build-aux/flatpak/nightly/com.inochi2d.inochi-creator.yml rename to build-aux/linux/flatpak/com.inochi2d.inochi-creator.yml index af322e2d4..b990e8d14 100644 --- a/build-aux/flatpak/nightly/com.inochi2d.inochi-creator.yml +++ b/build-aux/linux/flatpak/com.inochi2d.inochi-creator.yml @@ -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 @@ -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: @@ -70,4 +66,4 @@ modules: commit: a412602d346ba69c63237217ae286112e300927d - type: dir - path: ../../linux/flatpak/nightly/ \ No newline at end of file + path: ./nightly/ diff --git a/build-aux/linux/flatpak/nightly/com.inochi2d.inochi-creator.metainfo.xml b/build-aux/linux/flatpak/nightly/com.inochi2d.inochi-creator.metainfo.xml index d435510b6..6405d6c31 100644 --- a/build-aux/linux/flatpak/nightly/com.inochi2d.inochi-creator.metainfo.xml +++ b/build-aux/linux/flatpak/nightly/com.inochi2d.inochi-creator.metainfo.xml @@ -2,8 +2,10 @@ com.inochi2d.inochi-creator Inochi Creator - Tool to create and edit Inochi2D puppets. - Luna Nielsen + Create and edit Inochi2D puppets + + Luna the Foxgirl + com.inochi2d.inochi-creator.desktop CC0-1.0 BSD-2-Clause @@ -37,9 +39,13 @@ Graphics - + pointing keyboard - + + + #dbdbdb + #242424 + diff --git a/build-aux/linux/flatpak/release/com.inochi2d.inochi-creator.metainfo.xml b/build-aux/linux/flatpak/release/com.inochi2d.inochi-creator.metainfo.xml new file mode 100644 index 000000000..3a8b81875 --- /dev/null +++ b/build-aux/linux/flatpak/release/com.inochi2d.inochi-creator.metainfo.xml @@ -0,0 +1,44 @@ + + + com.inochi2d.inochi-creator + Inochi Creator + Create and edit Inochi2D puppets + + Luna the Foxgirl + + com.inochi2d.inochi-creator.desktop + CC0-1.0 + BSD-2-Clause + +

Inochi2D is a framework for realtime 2D puppet animation which can be used for VTubing, + game development and digital animation.

+

Inochi Creator is a tool that lets you create and edit Inochi2D puppets.

+
+ + + Title screen + https://user-images.githubusercontent.com/7032834/194462402-74c4a3e0-50ca-4b50-8e8d-164d97371f5a.png + + + + + + https://lunafoxgirlvt.itch.io/inochi-creator + https://github.com/Inochi2D/inochi-creator/issues + https://docs.inochi2d.com + https://inochi2d.com/#donate + https://github.com/Inochi2D/inochi-creator + https://github.com/Inochi2D/inochi-creator + + Graphics + + + pointing + keyboard + + + #dbdbdb + #242424 + + +
diff --git a/build-aux/linux/flatpak/release/inochi-creator.desktop b/build-aux/linux/flatpak/release/inochi-creator.desktop new file mode 100644 index 000000000..cd894ffd7 --- /dev/null +++ b/build-aux/linux/flatpak/release/inochi-creator.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Inochi Creator +Exec=inochi-creator +Icon=com.inochi2d.inochi-creator +Type=Application +Categories=Utility \ No newline at end of file diff --git a/source/creator/core/package.d b/source/creator/core/package.d index c125eaf09..23e93f8c5 100644 --- a/source/creator/core/package.d +++ b/source/creator/core/package.d @@ -195,6 +195,7 @@ ImGuiID incGetViewportDockSpace() { */ void incOpenWindow() { import std.process : environment; + import std.string : fromStringz; switch(environment.get("XDG_SESSION_DESKTOP")) { case "i3": @@ -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) {