update
parent
a258d429c2
commit
afeb6daea5
|
@ -5,6 +5,9 @@ project(example VERSION 0.1 LANGUAGES CXX)
|
|||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
#设置版本号
|
||||
add_definitions(-DVERSION=1,2,9,0)
|
||||
|
||||
#获取文件路径分隔符(解决执行命令的时候有些平台会报错)
|
||||
file(TO_CMAKE_PATH "/" PATH_SEPARATOR)
|
||||
|
||||
|
@ -39,9 +42,16 @@ foreach(filepath ${RES_PATHS})
|
|||
endforeach(filepath)
|
||||
|
||||
#添加可执行文件
|
||||
qt_add_executable(example
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
qt_add_executable(example
|
||||
${sources_files}
|
||||
)
|
||||
example.rc
|
||||
)
|
||||
else ()
|
||||
qt_add_executable(example
|
||||
${sources_files}
|
||||
)
|
||||
endif ()
|
||||
|
||||
#复制动态库到可执行文件同级目录下
|
||||
if(WIN32)
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
#include <windows.h>
|
||||
|
||||
IDI_ICON1 ICON "favicon.ico"
|
||||
|
||||
#define STR(x) #x
|
||||
#define VER_JOIN(a,b,c,d) STR(a.b.c.d)
|
||||
#define VER_JOIN_(x) VER_JOIN x
|
||||
#define VER_STR VER_JOIN_((VERSION))
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VERSION
|
||||
PRODUCTVERSION VERSION
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "Built by the FluentUI."
|
||||
VALUE "CompanyName", "zhuzichu"
|
||||
VALUE "FileDescription", "example"
|
||||
VALUE "FileVersion", VER_STR
|
||||
VALUE "InternalName", ""
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||
VALUE "OriginalFilename", ""
|
||||
VALUE "ProductName", "example"
|
||||
VALUE "ProductVersion", VER_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
|
@ -1,11 +1,17 @@
|
|||
#include "AppInfo.h"
|
||||
#include "lang/En.h"
|
||||
#include "lang/Zh.h"
|
||||
#include <QDebug>
|
||||
|
||||
#define STR(x) #x
|
||||
#define VER_JOIN(a,b,c,d) STR(a.b.c.d)
|
||||
#define VER_JOIN_(x) VER_JOIN x
|
||||
#define VER_STR VER_JOIN_((VERSION))
|
||||
|
||||
AppInfo::AppInfo(QObject *parent)
|
||||
: QObject{parent}
|
||||
{
|
||||
version("1.2.8");
|
||||
version(VER_STR);
|
||||
lang(new En());
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ project(fluentui LANGUAGES CXX)
|
|||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
#设置版本号
|
||||
add_definitions(-DVERSION=1,2,9,0)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/debug)
|
||||
else()
|
||||
|
@ -39,7 +42,7 @@ qt_add_qml_module(fluentui
|
|||
OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/FluentUI
|
||||
VERSION 1.0
|
||||
URI "FluentUI"
|
||||
SOURCES ${sources_files}
|
||||
SOURCES ${sources_files} fluentui.rc
|
||||
QML_FILES ${qml_files}
|
||||
RESOURCES ${resource_files}
|
||||
)
|
||||
|
|
|
@ -40,7 +40,6 @@ public:
|
|||
Q_INVOKABLE void setFluApp(FluApp* val);
|
||||
Q_INVOKABLE void setFluTheme(FluTheme* val);
|
||||
Q_INVOKABLE void setFluColors(FluColors* val);
|
||||
|
||||
public:
|
||||
QMap<quint64, QQuickWindow*> wnds;
|
||||
static FluApp* fluApp;
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
#include <windows.h>
|
||||
|
||||
#define STR(x) #x
|
||||
#define VER_JOIN(a,b,c,d) STR(a.b.c.d)
|
||||
#define VER_JOIN_(x) VER_JOIN x
|
||||
#define VER_STR VER_JOIN_((VERSION))
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VERSION
|
||||
PRODUCTVERSION VERSION
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "FluentUI for QML."
|
||||
VALUE "CompanyName", "zhuzichu"
|
||||
VALUE "FileDescription", "fluentui"
|
||||
VALUE "FileVersion", VER_STR
|
||||
VALUE "InternalName", ""
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||
VALUE "OriginalFilename", ""
|
||||
VALUE "ProductName", "fluentui"
|
||||
VALUE "ProductVersion", VER_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
Loading…
Reference in New Issue