diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..da5b308 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,61 @@ +cmake_minimum_required(VERSION 3.5) + +set(PROJECT_NAME spark-store-cutefish) +project(${PROJECT_NAME}) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT Core Gui Quick QuickControls2 Widgets DBus LinguistTools) +find_package(Qt5 REQUIRED ${QT}) + +# Get the installation directory from qmake +get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION) +if(NOT QT_QMAKE_EXECUTABLE) + message(FATAL_ERROR "qmake is not found.") +endif() + +execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_QML + OUTPUT_VARIABLE INSTALL_QMLDIR + OUTPUT_STRIP_TRAILING_WHITESPACE +) +if(INSTALL_QMLDIR) + message(STATUS "qml directory:" "${INSTALL_QMLDIR}") +else() + message(FATAL_ERROR "qml directory cannot be detected.") +endif() + +set(SRCS + src/main.cpp +) + +set(RESOURCES + src/resources.qrc +) + +add_executable(${PROJECT_NAME} ${SRCS} ${RESOURCES}) +target_link_libraries(${PROJECT_NAME} + Qt5::Core + Qt5::Quick + Qt5::QuickControls2 + Qt5::Widgets + Qt5::DBus +) + +file(GLOB TS_FILES translations/*.ts) +qt5_create_translation(QM_FILES ${TS_FILES}) +add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES}) +add_dependencies(${PROJECT_NAME} translations) +install(FILES ${QM_FILES} DESTINATION /usr/share/spark-store-cutefish/translations) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION /usr/bin) + +install(FILES + spark-store-cutefish.desktop + DESTINATION /usr/share/applications/ + COMPONENT Runtime +) diff --git a/README.en.md b/README.en.md index 83a3c16..82915e3 100644 --- a/README.en.md +++ b/README.en.md @@ -1,36 +1,39 @@ -# Spark-Store-Cutefish +<p align="center"> +<img src="https://gitee.com/deepin-community-store/spark-store-new/raw/master/pkg/usr/share/icons/hicolor/scalable/apps/spark-store.svg" height=200 width=200/> +</p> -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} +<div align="center"> -#### Software Architecture -Software architecture description +# Spark App Store -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request +The `Spark App Store` is now designed for Cutefish! -#### Gitee Feature +</div> -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +--- + +As we all know, there are few Linux applications in our country, wine applications are hard to get, high-quality tools are scattered in various folk forums, unable to form synergy, difficult to improve the ecology +Ecological construction does not need one party to fight alone, but everyone to act, gather sparks, resulting in a prairie fire + +We created this app store, which includes a wide range of software packages we need, a collection of quality widgets, an active adaptation of wine apps, and a repository for everyone to access + +We support: Deepin 20; Ubuntu 20.04LTS; UOS Home 20; CutefishOS + +We’d love to see some of you join us as well, and we’d love to help build the Linux application ecosystem + + + +## 🙌 A simple start + + +If you want to install the `Spark App Store`, open the [Release] page on the right, find the latest version, and select the installation package that works for your current system. + + + +**Watch** project to get updates on the application. + + +## 🚀 Collaboration + +Many thanks to interested developers or enthusiasts for participating in the Spark App Store project and sharing your insights and ideas. \ No newline at end of file diff --git a/README.md b/README.md index ee7b8e9..d0063ef 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,36 @@ -# Spark-Store-Cutefish +<p align="center"> +<img src="https://gitee.com/deepin-community-store/spark-store-new/raw/master/pkg/usr/share/icons/hicolor/scalable/apps/spark-store.svg" height=200 width=200/> +</p> -#### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} +<div align="center"> -#### 软件架构 -软件架构说明 +# 星火应用商店 + +`星火应用商店` 现在为 Cutefish 设计! + + +</div> + +--- + +众所周知,国内的Linux应用比较少,wine应用难以获取,优质工具分散在民间各大论坛,无法形成合力,难以改善生态 + +生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势 + +我们创建了这个应用商店,广泛收录大家需要的软件包,搜集优质小工具,主动适配wine应用,存放到储存库供大家获取 + +我们支持:Deepin 20 ; Ubuntu 20.04 LTS ; UOS Home 20 ; CutefishOS + +希望看到这里的人也可以加入我们的队伍,开发或者投递应用都很欢迎,共同构建Linux应用生态 -#### 安装教程 +## 🙌 简单的开始 -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request +如果想安装 `星火应用商店` ,请打开右侧的 [Release] 页面,找到最新版本,并选择适用于当前系统的安装包下载。 -#### 特技 +**Watch** 项目,以获取应用的更新动态。 -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +## 🚀 协作 + +非常感谢有兴趣的开发者或爱好者参与 `星火应用商店` 项目,分享你的见解与思路。 \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..c95cab5 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,38 @@ +#include <QApplication> +#include <QQmlApplicationEngine> +#include <QQmlContext> +#include <QLocale> +#include <QTranslator> +#include <QFile> +#include <QIcon> + +#include "processhelper.h" +#include "utils.h" +#include "fonts.h" + +int main(int argc, char *argv[]) +{ + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); + QApplication app(argc, argv); + app.setOrganizationName("spark-store"); + app.setWindowIcon(QIcon::fromTheme("spark-store")); + + QQmlApplicationEngine engine; + + // Translations + QLocale locale; + QString qmFilePath = QString("%1/%2.qm").arg("/usr/share/spark-store-cutefish/translations/").arg(locale.name()); + if (QFile::exists(qmFilePath)) { + QTranslator *translator = new QTranslator(QGuiApplication::instance()); + if (translator->load(qmFilePath)) { + QGuiApplication::installTranslator(translator); + } else { + translator->deleteLater(); + } + } + engine.addImportPath(QStringLiteral("qrc:/")); + engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); + + return app.exec(); +} \ No newline at end of file diff --git a/src/qml/main.qml b/src/qml/main.qml new file mode 100644 index 0000000..f9b74c8 --- /dev/null +++ b/src/qml/main.qml @@ -0,0 +1,7 @@ +import QtQuick 2.12 +import QtQml.Models 2.12 +import QtQuick.Controls 2.12 +import QtQuick.Layouts 1.12 +import QtGraphicalEffects 1.0 + +import FishUI 1.0 as FishUI \ No newline at end of file diff --git a/src/resources.qrc b/src/resources.qrc new file mode 100644 index 0000000..e69de29 diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts new file mode 100644 index 0000000..e69de29