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
OutputDir=.\
OutputBaseFilename=installer
Compression=lzma
SolidCompression=yes
Compression=zip
SolidCompression=no
WizardStyle=modern
[Languages]

View File

@ -85,14 +85,20 @@ jobs:
- uses: actions/upload-artifact@v2
with:
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
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.package.outputs.packageName }}.zip
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.zip
file: ./action-cli/installer.exe
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
tag: ${{ github.ref }}
overwrite: true

View File

@ -72,14 +72,20 @@ jobs:
- uses: actions/upload-artifact@v2
with:
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
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.package.outputs.packageName }}.zip
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.zip
file: ./action-cli/installer.exe
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe
tag: ${{ github.ref }}
overwrite: true

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,7 @@
#include "SettingsHelper.h"
#include <QDataStream>
#include <QStandardPaths>
SettingsHelper::SettingsHelper(QObject *parent) : QObject(parent)
{
@ -34,7 +35,7 @@ void SettingsHelper::init(char *argv[]){
auto applicationPath = QString::fromStdString(argv[0]);
const QFileInfo fileInfo(applicationPath);
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;
m_settings.reset(new QSettings(iniFilePath, QSettings::IniFormat));
}

View File

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

View File

@ -22,7 +22,7 @@ function Main() {
windeployqt --qmldir . --plugindir dist\plugins --no-translations --compiler-runtime dist\$targetName
# 删除不必要的文件
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
Remove-Item -Path dist -Include $excludeList -Recurse -Force
# 打包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){
QDir dir = _cacheDir;
if (!dir.exists(_cacheDir)){
dir.mkpath(_cacheDir);
QString path = FluTools::getInstance()->toLocalPath(QUrl(_cacheDir));
QDir dir = path;
if (!dir.exists(path)){
dir.mkpath(path);
}
auto filePath = _cacheDir+"/"+httpId;
auto filePath = path+"/"+httpId;
return filePath;
}

View File

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

View File

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

View File

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

View File

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