diff --git a/QtScrcpy/res/QtScrcpy.rc b/QtScrcpy/res/QtScrcpy.rc index e526073..4697da1 100644 --- a/QtScrcpy/res/QtScrcpy.rc +++ b/QtScrcpy/res/QtScrcpy.rc @@ -1,10 +1,10 @@ #include "winres.h" #include "../util/version.h" -// 图标 +// ͼ IDI_ICON1 ICON PRODUCT_ICON -// 版本信息 +// 汾Ϣ VS_VERSION_INFO VERSIONINFO FILEVERSION FILE_VERSION PRODUCTVERSION PRODUCT_VERSION @@ -23,7 +23,7 @@ BEGIN BLOCK "080404b0" BEGIN VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION + VALUE "FileDescription", "׿ʵʱͬ" VALUE "FileVersion", FILE_VERSION_STR VALUE "LegalCopyright", LEGAL_COPYRIGHT VALUE "ProductName", PRODUCT_NAME @@ -34,4 +34,4 @@ BEGIN BEGIN VALUE "Translation", 0x804, 1200 END -END \ No newline at end of file +END diff --git a/QtScrcpy/util/version.h b/QtScrcpy/util/version.h index aa8e1ed..8ebdbfe 100644 --- a/QtScrcpy/util/version.h +++ b/QtScrcpy/util/version.h @@ -3,12 +3,34 @@ #define PRODUCT_ICON "QtScrcpy.ico" // 图标 -#define FILE_VERSION 1,0,1,0 // 文件版本 -#define FILE_VERSION_STR "1.0.1.0" -#define PRODUCT_VERSION 1,0,1,0 // 产品版本 -#define PRODUCT_VERSION_STR "1.0.1.0" +#define QTSCRCPY_MAJOR 1 +#define QTSCRCPY_MINOR 0 +#define QTSCRCPY_PATCH 1 + +#define QTSCRCPY_VERSION_CHK(major, minor, patch) \ + (((major)<<16) | ((minor)<<8) | (patch)) + +// 数值形式版本号,用于版本升级判断 +#define QTSCRCPY_VERSION QTSCRCPY_VERSION_CHK(QTSCRCPY_MAJOR, QTSCRCPY_MINOR, QTSCRCPY_PATCH) + +#define _TOSTR(x) #x +#define TOSTR(x) _TOSTR(x) + +// 字符串形式版本号,用于版本显示 +/* the following are compile time version */ +/* C++11 requires a space between literal and identifier */ +#define QTSCRCPY_VERSION_STR TOSTR(QTSCRCPY_MAJOR) "." TOSTR(QTSCRCPY_MINOR) "." TOSTR(QTSCRCPY_PATCH) + +// rc形式版本号,用于windos rc文件中指定版本号 +#define QTSCRCPY_VERSION_RES QTSCRCPY_MAJOR,QTSCRCPY_MINOR,QTSCRCPY_PATCH + + +// windos rc相关定义 +#define FILE_VERSION QTSCRCPY_VERSION_RES // 文件版本 +#define FILE_VERSION_STR QTSCRCPY_VERSION_STR +#define PRODUCT_VERSION QTSCRCPY_VERSION_RES // 产品版本 +#define PRODUCT_VERSION_STR QTSCRCPY_VERSION_STR #define COMPANY_NAME "RanKun" -#define INTERNAL_NAME "QtScrcpy.exe" #define FILE_DESCRIPTION "android real time projection software" // 文件说明 #define LEGAL_COPYRIGHT "Copyright (C) RanKun 2018-2028. All rights reserved." // 版权 #define PRODUCT_NAME "QtScrcpy" // 产品名称 diff --git a/TODO.md b/TODO.md index afc99f5..abb64f2 100644 --- a/TODO.md +++ b/TODO.md @@ -12,6 +12,7 @@ 0. [截屏保存为jpg](https://blog.csdn.net/m0_37684310/article/details/77950390) 1. mac版本号 2. linux打包以及版本号 +3. 自动打包脚本 # mark [ffmpeg编译参数详解](https://www.cnblogs.com/wainiwann/p/4204230.html)