Compare commits

...

4 Commits

Author SHA1 Message Date
朱子楚\zhuzi cbe26ce4cd update 2023-09-29 19:30:22 +08:00
朱子楚\zhuzi c048336de1 update 2023-09-29 18:15:24 +08:00
朱子楚\zhuzi d65d6fbbac update 2023-09-29 17:49:05 +08:00
朱子楚\zhuzi 674009e394 update 2023-09-29 17:39:45 +08:00
16 changed files with 44 additions and 24 deletions

View File

@ -25,8 +25,8 @@ DisableProgramGroupPage=yes
;PrivilegesRequired=lowest ;PrivilegesRequired=lowest
OutputDir=.\ OutputDir=.\
OutputBaseFilename=installer OutputBaseFilename=installer
Compression=lzma Compression=zip
SolidCompression=yes SolidCompression=no
WizardStyle=modern WizardStyle=modern
[Languages] [Languages]

View File

@ -85,14 +85,20 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: ${{ steps.package.outputs.packageName }} name: ${{ steps.package.outputs.packageName }}
path: ${{ steps.package.outputs.packageName }} path: dist
- name: inno setup install
if: startsWith(github.event.ref, 'refs/tags/')
uses: zhuzichu520/inno-setup-action@v1.0.0
with:
filepath: ./action-cli/InstallerScript.iss
- name: uploadRelease - name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.package.outputs.packageName }}.zip file: ./action-cli/installer.exe
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.zip asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

View File

@ -72,14 +72,20 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: ${{ steps.package.outputs.packageName }} name: ${{ steps.package.outputs.packageName }}
path: ${{ steps.package.outputs.packageName }} path: dist
- name: inno setup install
if: startsWith(github.event.ref, 'refs/tags/')
uses: zhuzichu520/inno-setup-action@v1.0.0
with:
filepath: ./action-cli/InstallerScript.iss
- name: uploadRelease - name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.package.outputs.packageName }}.zip file: ./action-cli/installer.exe
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.zip asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

View File

@ -74,7 +74,7 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: ${{ steps.package.outputs.packageName }} name: ${{ steps.package.outputs.packageName }}
path: ${{ steps.package.outputs.packageName }} path: dist
- name: inno setup install - name: inno setup install
if: startsWith(github.event.ref, 'refs/tags/') if: startsWith(github.event.ref, 'refs/tags/')

View File

@ -10,7 +10,7 @@ import "qrc:///example/qml/component"
FluContentPage{ FluContentPage{
title:"Http" title:"Http"
property string cacheDirPath: FluTools.getApplicationDirPath() + "/cache/http" property string cacheDirPath: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation) + "/cache/http"
property bool isDownCompleted: false property bool isDownCompleted: false
FluHttp{ FluHttp{

View File

@ -3,6 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import Qt.labs.platform
import "qrc:///example/qml/component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{
@ -47,7 +48,7 @@ FluScrollablePage{
FluScreenshot{ FluScreenshot{
id:screenshot id:screenshot
captrueMode: FluScreenshotType.File captrueMode: FluScreenshotType.File
saveFolder: FluTools.getApplicationDirPath()+"/screenshot" saveFolder: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation)+"/screenshot"
onCaptrueCompleted: onCaptrueCompleted:
(captrue)=>{ (captrue)=>{
image.source = captrue image.source = captrue

View File

@ -11,7 +11,7 @@ import "../component"
FluContentPage{ FluContentPage{
title:"Http" title:"Http"
property string cacheDirPath: FluTools.getApplicationDirPath() + "/cache/http" property string cacheDirPath: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation) + "/cache/http"
property bool isDownCompleted: false property bool isDownCompleted: false
FluHttp{ FluHttp{

View File

@ -3,6 +3,7 @@ import QtQuick.Layouts 1.15
import QtQuick.Window 2.15 import QtQuick.Window 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import FluentUI 1.0 import FluentUI 1.0
import Qt.labs.platform 1.0
import "qrc:///example/qml/component" import "qrc:///example/qml/component"
import "../component" import "../component"
@ -48,7 +49,7 @@ FluScrollablePage{
FluScreenshot{ FluScreenshot{
id:screenshot id:screenshot
captrueMode: FluScreenshotType.File captrueMode: FluScreenshotType.File
saveFolder: FluTools.getApplicationDirPath()+"/screenshot" saveFolder: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation)+"/screenshot"
onCaptrueCompleted: onCaptrueCompleted:
(captrue)=>{ (captrue)=>{
image.source = captrue image.source = captrue

View File

@ -1,6 +1,7 @@
#include "SettingsHelper.h" #include "SettingsHelper.h"
#include <QDataStream> #include <QDataStream>
#include <QStandardPaths>
SettingsHelper::SettingsHelper(QObject *parent) : QObject(parent) SettingsHelper::SettingsHelper(QObject *parent) : QObject(parent)
{ {
@ -34,7 +35,7 @@ void SettingsHelper::init(char *argv[]){
auto applicationPath = QString::fromStdString(argv[0]); auto applicationPath = QString::fromStdString(argv[0]);
const QFileInfo fileInfo(applicationPath); const QFileInfo fileInfo(applicationPath);
const QString iniFileName = fileInfo.completeBaseName() + ".ini"; const QString iniFileName = fileInfo.completeBaseName() + ".ini";
const QString iniFilePath = fileInfo.dir().path() + "/" + iniFileName; const QString iniFilePath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/" + iniFileName;
qDebug()<<"Application configuration file path->"<<iniFilePath; qDebug()<<"Application configuration file path->"<<iniFilePath;
m_settings.reset(new QSettings(iniFilePath, QSettings::IniFormat)); m_settings.reset(new QSettings(iniFilePath, QSettings::IniFormat));
} }

View File

@ -27,7 +27,6 @@ FRAMELESSHELPER_USE_NAMESPACE
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
SettingsHelper::getInstance()->init(argv);
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
@ -40,6 +39,7 @@ int main(int argc, char *argv[])
QGuiApplication::setOrganizationName("ZhuZiChu"); QGuiApplication::setOrganizationName("ZhuZiChu");
QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io"); QGuiApplication::setOrganizationDomain("https://zhuzichu520.github.io");
QGuiApplication::setApplicationName("FluentUI"); QGuiApplication::setApplicationName("FluentUI");
SettingsHelper::getInstance()->init(argv);
if(SettingsHelper::getInstance()->getReander()=="software"){ if(SettingsHelper::getInstance()->getReander()=="software"){
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
QQuickWindow::setGraphicsApi(QSGRendererInterface::Software); QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);

View File

@ -22,7 +22,7 @@ function Main() {
windeployqt --qmldir . --plugindir dist\plugins --no-translations --compiler-runtime dist\$targetName windeployqt --qmldir . --plugindir dist\plugins --no-translations --compiler-runtime dist\$targetName
# 删除不必要的文件 # 删除不必要的文件
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb") $excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force Remove-Item -Path dist -Include $excludeList -Recurse -Force
# 打包zip # 打包zip
Compress-Archive -Path dist $archiveName'.zip' Compress-Archive -Path dist $archiveName'.zip'
} }

View File

@ -527,11 +527,12 @@ bool FluHttp::cacheExists(const QString& httpId){
} }
QString FluHttp::getCacheFilePath(const QString& httpId){ QString FluHttp::getCacheFilePath(const QString& httpId){
QDir dir = _cacheDir; QString path = FluTools::getInstance()->toLocalPath(QUrl(_cacheDir));
if (!dir.exists(_cacheDir)){ QDir dir = path;
dir.mkpath(_cacheDir); if (!dir.exists(path)){
dir.mkpath(path);
} }
auto filePath = _cacheDir+"/"+httpId; auto filePath = path+"/"+httpId;
return filePath; return filePath;
} }

View File

@ -11,6 +11,7 @@ FluPopup {
property string neutralText: "Neutral" property string neutralText: "Neutral"
property string negativeText: "Negative" property string negativeText: "Negative"
property string positiveText: "Positive" property string positiveText: "Positive"
property alias messageTextFormart: text_message.textFormat
property int delayTime: 100 property int delayTime: 100
signal neutralClicked signal neutralClicked
signal negativeClicked signal negativeClicked
@ -44,6 +45,7 @@ FluPopup {
Flickable{ Flickable{
id:sroll_message id:sroll_message
contentWidth: width contentWidth: width
clip: true
anchors{ anchors{
top:text_title.bottom top:text_title.bottom
left: parent.left left: parent.left

View File

@ -48,7 +48,7 @@ Item{
captureMode:control.captrueMode captureMode:control.captrueMode
saveFolder: { saveFolder: {
if(typeof control.saveFolder === 'string'){ if(typeof control.saveFolder === 'string'){
return control.saveFolder return FluTools.toLocalPath(Qt.resolvedUrl(control.saveFolder))
}else{ }else{
return FluTools.toLocalPath(control.saveFolder) return FluTools.toLocalPath(control.saveFolder)
} }

View File

@ -11,6 +11,7 @@ FluPopup {
property string neutralText: "Neutral" property string neutralText: "Neutral"
property string negativeText: "Negative" property string negativeText: "Negative"
property string positiveText: "Positive" property string positiveText: "Positive"
property alias messageTextFormart: text_message.textFormat
property int delayTime: 100 property int delayTime: 100
signal neutralClicked signal neutralClicked
signal negativeClicked signal negativeClicked
@ -44,6 +45,7 @@ FluPopup {
Flickable{ Flickable{
id:sroll_message id:sroll_message
contentWidth: width contentWidth: width
clip: true
anchors{ anchors{
top:text_title.bottom top:text_title.bottom
left: parent.left left: parent.left

View File

@ -48,7 +48,7 @@ Item{
captureMode:control.captrueMode captureMode:control.captrueMode
saveFolder: { saveFolder: {
if(typeof control.saveFolder === 'string'){ if(typeof control.saveFolder === 'string'){
return control.saveFolder return FluTools.toLocalPath(Qt.resolvedUrl(control.saveFolder))
}else{ }else{
return FluTools.toLocalPath(control.saveFolder) return FluTools.toLocalPath(control.saveFolder)
} }