Compare commits

..

No commits in common. "cbe26ce4cd4e0b72672094c3a8102199c8b5f868" and "d8e3cf00b4496a24b7bd22f5169ea0ce7e0b69c5" have entirely different histories.

16 changed files with 24 additions and 44 deletions

View File

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

View File

@ -85,20 +85,14 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: ${{ steps.package.outputs.packageName }} name: ${{ steps.package.outputs.packageName }}
path: dist path: ${{ steps.package.outputs.packageName }}
- 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: ./action-cli/installer.exe file: ${{ steps.package.outputs.packageName }}.zip
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.zip
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

View File

@ -72,20 +72,14 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: ${{ steps.package.outputs.packageName }} name: ${{ steps.package.outputs.packageName }}
path: dist path: ${{ steps.package.outputs.packageName }}
- 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: ./action-cli/installer.exe file: ${{ steps.package.outputs.packageName }}.zip
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.zip
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: dist path: ${{ steps.package.outputs.packageName }}
- 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: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation) + "/cache/http" property string cacheDirPath: FluTools.getApplicationDirPath() + "/cache/http"
property bool isDownCompleted: false property bool isDownCompleted: false
FluHttp{ FluHttp{

View File

@ -3,7 +3,6 @@ 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{
@ -48,7 +47,7 @@ FluScrollablePage{
FluScreenshot{ FluScreenshot{
id:screenshot id:screenshot
captrueMode: FluScreenshotType.File captrueMode: FluScreenshotType.File
saveFolder: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation)+"/screenshot" saveFolder: FluTools.getApplicationDirPath()+"/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: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation) + "/cache/http" property string cacheDirPath: FluTools.getApplicationDirPath() + "/cache/http"
property bool isDownCompleted: false property bool isDownCompleted: false
FluHttp{ FluHttp{

View File

@ -3,7 +3,6 @@ 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"
@ -49,7 +48,7 @@ FluScrollablePage{
FluScreenshot{ FluScreenshot{
id:screenshot id:screenshot
captrueMode: FluScreenshotType.File captrueMode: FluScreenshotType.File
saveFolder: StandardPaths.writableLocation(StandardPaths.AppLocalDataLocation)+"/screenshot" saveFolder: FluTools.getApplicationDirPath()+"/screenshot"
onCaptrueCompleted: onCaptrueCompleted:
(captrue)=>{ (captrue)=>{
image.source = captrue image.source = captrue

View File

@ -1,7 +1,6 @@
#include "SettingsHelper.h" #include "SettingsHelper.h"
#include <QDataStream> #include <QDataStream>
#include <QStandardPaths>
SettingsHelper::SettingsHelper(QObject *parent) : QObject(parent) SettingsHelper::SettingsHelper(QObject *parent) : QObject(parent)
{ {
@ -35,7 +34,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 = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/" + iniFileName; const QString iniFilePath = fileInfo.dir().path() + "/" + 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,6 +27,7 @@ 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);
@ -39,7 +40,6 @@ 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 dist -Include $excludeList -Recurse -Force Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
# 打包zip # 打包zip
Compress-Archive -Path dist $archiveName'.zip' Compress-Archive -Path dist $archiveName'.zip'
} }

View File

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

View File

@ -11,7 +11,6 @@ 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
@ -45,7 +44,6 @@ 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 FluTools.toLocalPath(Qt.resolvedUrl(control.saveFolder)) return control.saveFolder
}else{ }else{
return FluTools.toLocalPath(control.saveFolder) return FluTools.toLocalPath(control.saveFolder)
} }

View File

@ -11,7 +11,6 @@ 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
@ -45,7 +44,6 @@ 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 FluTools.toLocalPath(Qt.resolvedUrl(control.saveFolder)) return control.saveFolder
}else{ }else{
return FluTools.toLocalPath(control.saveFolder) return FluTools.toLocalPath(control.saveFolder)
} }