feat: Implemented AppImage building
This commit is contained in:
parent
d8f471dadc
commit
6a288f765e
38 changed files with 1036 additions and 147 deletions
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