初始化

This commit is contained in:
柚子 2022-05-11 04:00:28 +00:00 committed by Gitee
parent 4c8308a453
commit 86f54414dc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 167 additions and 61 deletions

61
CMakeLists.txt Normal file

@ -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
)

@ -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 <div align="center">
{**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**}
#### Software Architecture # Spark App Store
Software architecture description
#### Installation The `Spark App Store` is now designed for Cutefish!
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
#### 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) 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
4. The most valuable open source project [GVP](https://gitee.com/gvp) Ecological construction does not need one party to fight alone, but everyone to act, gather sparks, resulting in a prairie fire
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/) 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
Wed love to see some of you join us as well, and wed 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.

@ -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>
#### 介绍 <div align="center">
{**以下是 Gitee 平台说明,您可以替换此简介**
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN。专为开发者提供稳定、高效、安全的云端软件开发协作平台
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
#### 软件架构 # 星火应用商店
软件架构说明
`星火应用商店` 现在为 Cutefish 设计!
</div>
---
众所周知国内的Linux应用比较少wine应用难以获取优质工具分散在民间各大论坛无法形成合力难以改善生态
生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势
我们创建了这个应用商店广泛收录大家需要的软件包搜集优质小工具主动适配wine应用存放到储存库供大家获取
我们支持Deepin 20 ; Ubuntu 20.04 LTS ; UOS Home 20 ; CutefishOS
希望看到这里的人也可以加入我们的队伍开发或者投递应用都很欢迎共同构建Linux应用生态
#### 安装教程 ## 🙌 简单的开始
1. xxxx 如果想安装 `星火应用商店` ,请打开右侧的 [Release] 页面,找到最新版本,并选择适用于当前系统的安装包下载。
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技 **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/)

38
src/main.cpp Normal file

@ -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();
}

7
src/qml/main.qml Normal file

@ -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

0
src/resources.qrc Normal file

0
translations/zh_CN.ts Normal file