feat: Implemented AppImage building
This commit is contained in:
parent
d8f471dadc
commit
6a288f765e
38 changed files with 1036 additions and 147 deletions
7
.config/flatpak/com.simeonradivoev.gameflow-deck.desktop
Normal file
7
.config/flatpak/com.simeonradivoev.gameflow-deck.desktop
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Name=GameFlow
|
||||
Comment=GameFlow Deck
|
||||
Exec=gameflow
|
||||
Icon=com.simeonradivoev.gameflow-deck
|
||||
Type=Application
|
||||
Categories=Game;
|
||||
96
.config/flatpak/com.simeonradivoev.gameflow-deck.json
Normal file
96
.config/flatpak/com.simeonradivoev.gameflow-deck.json
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"app-id": "com.simeonradivoev.gameflow-deck",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "6.10",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"command": "/app/bin/gameflow",
|
||||
"base": "io.qt.qtwebengine.BaseApp",
|
||||
"base-version": "6.10",
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--share=network",
|
||||
"--socket=pulseaudio",
|
||||
"--socket=wayland",
|
||||
"--socket=x11",
|
||||
"--device=all",
|
||||
"--filesystem=host",
|
||||
"--filesystem=home",
|
||||
"--env=PKG_CONFIG_LIBDIR=/app/lib",
|
||||
"--env=FLATPAK_BUILD=true",
|
||||
"--allow=devel"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "gameflow-bun",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"mkdir -p /app/bin",
|
||||
"mkdir -p /app/share/gameflow",
|
||||
"mkdir -p /app/lib",
|
||||
"install -Dm644 256x256.png /app/share/icons/hicolor/256x256/apps/com.simeonradivoev.gameflow-deck.png",
|
||||
"install -Dm644 com.simeonradivoev.gameflow-deck.desktop /app/share/applications/com.simeonradivoev.gameflow-deck.desktop",
|
||||
"mv libvips-cpp.so.* /app/lib",
|
||||
"mv * /app/share/gameflow/",
|
||||
"mv /app/share/gameflow/gameflow /app/bin",
|
||||
"mv /app/share/gameflow/bun /app/bin",
|
||||
"chmod +x /app/bin/gameflow",
|
||||
"chmod +x /app/bin/bun"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "../build/linux"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "../flatpak/com.simeonradivoev.gameflow-deck.desktop"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "../src/mainview/assets/256x256.png"
|
||||
},
|
||||
{
|
||||
"type": "script",
|
||||
"dest-filename": "gameflow",
|
||||
"commands": [
|
||||
"cd /app/share/gameflow",
|
||||
"exec bun run index.js \"$@\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://github.com/oven-sh/bun/releases/download/bun-v1.3.9/bun-linux-x64.zip",
|
||||
"sha256": "4680e80e44e32aa718560ceae85d22ecfbf2efb8f3641782e35e4b7efd65a1aa",
|
||||
"only-arches": [
|
||||
"x86_64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://github.com/oven-sh/bun/releases/download/bun-v1.3.9/bun-linux-aarch64.zip",
|
||||
"sha256": "a2c2862bcc1fd1c0b3a8dcdc8c7efb5e2acd871eb20ed2f17617884ede81c844",
|
||||
"only-arches": [
|
||||
"aarch64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "../node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3",
|
||||
"only-arches": [
|
||||
"x86_64"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "webview",
|
||||
"buildsystem": "cmake-ninja",
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "../flatpak/webview"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
35
.config/flatpak/webview/CMakeLists.txt
Normal file
35
.config/flatpak/webview/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(SimpleWebView LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Required for Qt WebEngine
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS
|
||||
Core
|
||||
Widgets
|
||||
WebEngineWidgets,
|
||||
Gamepad
|
||||
)
|
||||
|
||||
add_executable(webview
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(webview PRIVATE
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
Qt6::WebEngineWidgets,
|
||||
Qt6::Gamepad
|
||||
)
|
||||
|
||||
|
||||
# Install binary into Flatpak prefix (/app)
|
||||
install(TARGETS webview
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
14
.config/flatpak/webview/main.cpp
Normal file
14
.config/flatpak/webview/main.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <QApplication>
|
||||
#include <QWebEngineView>
|
||||
#include <QWebEngineSettings>
|
||||
#include <QUrl>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
if (argc < 2) { return 1; }
|
||||
QWebEngineView view;
|
||||
view.setUrl(QUrl(argv[1]));
|
||||
view.showFullScreen();
|
||||
return app.exec();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue