app可执行文件增加版本信息
This commit is contained in:
parent
5536b0a932
commit
507ec3ed84
|
@ -3194,7 +3194,7 @@ void MainWindow::on_act_about_triggered()
|
||||||
|
|
||||||
#if defined (OEM_LISICHENG)
|
#if defined (OEM_LISICHENG)
|
||||||
buildVersion = 14;
|
buildVersion = 14;
|
||||||
#elif defined (OEM_HANWNAG)
|
#elif defined (OEM_HANWANG)
|
||||||
buildVersion = 16;
|
buildVersion = 16;
|
||||||
#elif defined (OEM_CANGTIAN)
|
#elif defined (OEM_CANGTIAN)
|
||||||
buildVersion = 18;
|
buildVersion = 18;
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ 生成的包含文件。
|
||||||
|
// 供 HuaGoScan2.rc 使用
|
||||||
|
//
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
|
@ -0,0 +1,170 @@
|
||||||
|
// Microsoft Visual C++ generated resource script.
|
||||||
|
//
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "winres.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// 中文(简体,中国) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
|
||||||
|
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||||
|
#pragma code_page(936)
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"#include ""winres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Icon
|
||||||
|
//
|
||||||
|
|
||||||
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
|
// remains consistent on all systems.
|
||||||
|
#if defined(OEM_HANWANG)
|
||||||
|
IDI_ICON1 ICON "image_rsc\\logo\\Hanvon_logo1.ico"
|
||||||
|
#elif defined(OEM_LISICHENG)
|
||||||
|
IDI_ICON1 ICON "image_rsc\\logo\\Lanxum_logo.ico"
|
||||||
|
#elif defined(OEM_CANGTIAN)
|
||||||
|
IDI_ICON1 ICON "image_rsc\\logo\\Cumtenn_logo.ico"
|
||||||
|
#elif defined(OEM_ZHONGJING)
|
||||||
|
IDI_ICON1 ICON "image_rsc\\logo\\Microtek_logo.ico"
|
||||||
|
#elif defined(OEM_ZIGUANG)
|
||||||
|
IDI_ICON1 ICON "image_rsc\\logo\\uniscan.ico"
|
||||||
|
#elif defined(OEM_NEUTRAL)
|
||||||
|
IDI_ICON1 ICON "image_rsc\\logo\\NoBrand_logo.ico"
|
||||||
|
#elif defined(OEM_DELI)
|
||||||
|
IDI_ICON1 ICON "image_rsc\\logo\\deli.ico"
|
||||||
|
#else
|
||||||
|
IDI_ICON1 ICON "image_rsc\\logo\\logo.ico"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // 中文(简体,中国) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION 0,0,0,0
|
||||||
|
PRODUCTVERSION 0,0,0,0
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS__WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "000403a8"
|
||||||
|
BEGIN
|
||||||
|
VALUE "FileVersion", "0.0.0.0\0"
|
||||||
|
VALUE "ProductVersion", "0.0.0.0\0"
|
||||||
|
#if defined(OEM_HANWANG)
|
||||||
|
VALUE "ProductName", "HANVONSCAN\0"
|
||||||
|
VALUE "CompanyName", "汉王科技股份有限公司\0"
|
||||||
|
VALUE "FileDescription", "汉王扫描仪应用程序\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) HANVONSCAN 2023\0"
|
||||||
|
VALUE "InternalName", "HanvonScan.exe\0"
|
||||||
|
VALUE "OriginalFilename", "HanvonScan.exe\0"
|
||||||
|
#elif defined(OEM_LISICHENG)
|
||||||
|
VALUE "ProductName", "LANXUMSCAN\0"
|
||||||
|
VALUE "CompanyName", "立思辰信息科技有限公司\0"
|
||||||
|
VALUE "FileDescription", "立思辰扫描仪应用程序\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) LANXUMSCAN 2023\0"
|
||||||
|
VALUE "InternalName", "LanxumScan.exe\0"
|
||||||
|
VALUE "OriginalFilename", "LanxumScan.exe\0"
|
||||||
|
#elif defined(OEM_CANGTIAN)
|
||||||
|
VALUE "ProductName", "CUMTENNSCAN\0"
|
||||||
|
VALUE "CompanyName", "浙江沧田智能信息科技有限公司\0"
|
||||||
|
VALUE "FileDescription", "沧田扫描仪应用程序\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) CUMTENNSCAN 2023\0"
|
||||||
|
VALUE "InternalName", "CumtennScan.exe\0"
|
||||||
|
VALUE "OriginalFilename", "CumtennScan.exe\0"
|
||||||
|
#elif defined(OEM_ZHONGJING)
|
||||||
|
VALUE "ProductName", "MICROTEKSCAN\0"
|
||||||
|
VALUE "CompanyName", "Microtek DocWizard EX\0"
|
||||||
|
VALUE "FileDescription", "Microtek DocWizard EX App\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) MICROTEKSCAN 2023\0"
|
||||||
|
VALUE "InternalName", "MicrotekScan.exe\0"
|
||||||
|
VALUE "OriginalFilename", "MicrotekScan.exe\0"
|
||||||
|
#elif defined(OEM_ZIGUANG)
|
||||||
|
VALUE "ProductName", "UNISCAN\0"
|
||||||
|
VALUE "CompanyName", "紫光股份有限公司\0"
|
||||||
|
VALUE "FileDescription", "紫光扫描仪应用程序\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) UNISCAN 2023\0"
|
||||||
|
VALUE "InternalName", "UniScan.exe\0"
|
||||||
|
VALUE "OriginalFilename", "UniScan.exe\0"
|
||||||
|
#elif defined(OEM_NEUTRAL)
|
||||||
|
VALUE "ProductName", "SCANNER\0"
|
||||||
|
VALUE "CompanyName", "Scanner\0"
|
||||||
|
VALUE "FileDescription", "Scanner\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) SCANNER 2023\0"
|
||||||
|
VALUE "InternalName", "NeuScan.exe\0"
|
||||||
|
VALUE "OriginalFilename", "NeuScan.exe\0"
|
||||||
|
#elif defined(OEM_DELI)
|
||||||
|
VALUE "ProductName", "DELISCAN\0"
|
||||||
|
VALUE "CompanyName", "得力信息科技有限公司\0"
|
||||||
|
VALUE "FileDescription", "得力扫描仪应用程序\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) DELISCAN 2023\0"
|
||||||
|
VALUE "InternalName", "DeliScan.exe\0"
|
||||||
|
VALUE "OriginalFilename", "DeliScan.exe\0"
|
||||||
|
#else
|
||||||
|
VALUE "ProductName", "HUAGOSCAN\0"
|
||||||
|
VALUE "CompanyName", "宁波华高信息科技有限公司\0"
|
||||||
|
VALUE "FileDescription", "华高扫描仪应用程序\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) HUAGOSCAN 2023\0"
|
||||||
|
VALUE "InternalName", "HuaGoScan.exe\0"
|
||||||
|
VALUE "OriginalFilename", "HuaGoScan.exe\0"
|
||||||
|
#endif
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0004, 936
|
||||||
|
END
|
||||||
|
END
|
||||||
|
/* End of Version info */
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
64
build.bat
64
build.bat
|
@ -3,14 +3,18 @@ set OEM=%1
|
||||||
cd /d ./build2/qt
|
cd /d ./build2/qt
|
||||||
|
|
||||||
if "%OEM%" == "hw" (
|
if "%OEM%" == "hw" (
|
||||||
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_HANWANG" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_HANWANG USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -cpu=x64 -oemName=OEM_HANWANG
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_HANWANG" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_HANWANG" -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe HWTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HWTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d ../
|
cd /d ../
|
||||||
|
|
||||||
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_HANWANG" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_HANWANG USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -oemName=OEM_HANWANG
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_HANWANG" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_HANWANG" -r -tp vc HGTwainUI.pro
|
||||||
|
@ -18,14 +22,18 @@ if "%OEM%" == "hw" (
|
||||||
cd /d ../
|
cd /d ../
|
||||||
) else (
|
) else (
|
||||||
if "%OEM%" == "lsc" (
|
if "%OEM%" == "lsc" (
|
||||||
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_LISICHENG" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_LISICHENG USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -cpu=x64 -oemName=OEM_LISICHENG
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_LISICHENG" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_LISICHENG" -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe LSCTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe LSCTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d ../
|
cd /d ../
|
||||||
|
|
||||||
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_LISICHENG" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_LISICHENG USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -oemName=OEM_LISICHENG
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_LISICHENG" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_LISICHENG" -r -tp vc HGTwainUI.pro
|
||||||
|
@ -33,14 +41,18 @@ if "%OEM%" == "hw" (
|
||||||
cd /d ../
|
cd /d ../
|
||||||
) else (
|
) else (
|
||||||
if "%OEM%" == "cts" (
|
if "%OEM%" == "cts" (
|
||||||
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_CANGTIAN" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_CANGTIAN USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -cpu=x64 -oemName=OEM_CANGTIAN
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_CANGTIAN" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_CANGTIAN" -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe CTSTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe CTSTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d ../
|
cd /d ../
|
||||||
|
|
||||||
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_CANGTIAN" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_CANGTIAN USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -oemName=OEM_CANGTIAN
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_CANGTIAN" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_CANGTIAN" -r -tp vc HGTwainUI.pro
|
||||||
|
@ -48,14 +60,18 @@ if "%OEM%" == "hw" (
|
||||||
cd /d ../
|
cd /d ../
|
||||||
) else (
|
) else (
|
||||||
if "%OEM%" == "zj" (
|
if "%OEM%" == "zj" (
|
||||||
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_ZHONGJING" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_ZHONGJING USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -cpu=x64 -oemName=OEM_ZHONGJING
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_ZHONGJING" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_ZHONGJING" -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe ZJTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe ZJTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d ../
|
cd /d ../
|
||||||
|
|
||||||
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_ZHONGJING" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_ZHONGJING USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -oemName=OEM_ZHONGJING
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_ZHONGJING" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_ZHONGJING" -r -tp vc HGTwainUI.pro
|
||||||
|
@ -63,14 +79,18 @@ if "%OEM%" == "hw" (
|
||||||
cd /d ../
|
cd /d ../
|
||||||
) else (
|
) else (
|
||||||
if "%OEM%" == "zg" (
|
if "%OEM%" == "zg" (
|
||||||
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_ZIGUANG" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_ZIGUANG USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -cpu=x64 -oemName=OEM_ZIGUANG
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_ZIGUANG" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_ZIGUANG" -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe ZGTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe ZGTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d ../
|
cd /d ../
|
||||||
|
|
||||||
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_ZIGUANG" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_ZIGUANG USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -oemName=OEM_ZIGUANG
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_ZIGUANG" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_ZIGUANG" -r -tp vc HGTwainUI.pro
|
||||||
|
@ -78,14 +98,18 @@ if "%OEM%" == "hw" (
|
||||||
cd /d ../
|
cd /d ../
|
||||||
) else (
|
) else (
|
||||||
if "%OEM%" == "neu" (
|
if "%OEM%" == "neu" (
|
||||||
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_NEUTRAL" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_NEUTRAL USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -cpu=x64 -oemName=OEM_NEUTRAL
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_NEUTRAL" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_NEUTRAL" -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe NEUTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe NEUTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d ../
|
cd /d ../
|
||||||
|
|
||||||
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_NEUTRAL" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_NEUTRAL USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -oemName=OEM_NEUTRAL
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_NEUTRAL" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_NEUTRAL" -r -tp vc HGTwainUI.pro
|
||||||
|
@ -93,28 +117,36 @@ if "%OEM%" == "hw" (
|
||||||
cd /d ../
|
cd /d ../
|
||||||
) else (
|
) else (
|
||||||
if "%OEM%" == "dl" (
|
if "%OEM%" == "dl" (
|
||||||
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_DELI" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += OEM_DELI USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -cpu=x64 -oemName=OEM_DELI
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_DELI" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_DELI" -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe DLTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe DLTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d ../
|
cd /d ../
|
||||||
|
|
||||||
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_DELI" -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017/bin/qmake "DEFINES += OEM_DELI USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -oemName=OEM_DELI
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_DELI" -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake "DEFINES += OEM_DELI" -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe DLTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe DLTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d ../
|
cd /d ../
|
||||||
) else (
|
) else (
|
||||||
%QT_PATH%/msvc2017_64/bin/qmake -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017_64/bin/qmake "DEFINES += USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc -cpu=x64
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x64-windows-static-md/tools/qt5/bin/qmake -r -tp vc HGTwainUI.pro
|
||||||
MSBuild.exe HGTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
MSBuild.exe HGTwainUI.vcxproj -t:rebuild /m:8 /p:Configuration=Release /p:Platform=x64
|
||||||
cd /d ../
|
cd /d ../
|
||||||
|
|
||||||
%QT_PATH%/msvc2017/bin/qmake -r -tp vc HGSolutionWin.pro
|
%QT_PATH%/msvc2017/bin/qmake "DEFINES += USE_SCRIPT" -r -tp vc HGSolutionWin.pro
|
||||||
|
cp %~dp0\app\scanner2\resource.rc %~dp0\app\scanner2\resourceTmp.rc
|
||||||
|
%~dp0\tools\hgsetver\release\hgsetver.exe -brandFile=%~dp0\..\sdk\include\huagao\brand.h -resourceFile=%~dp0\app\scanner2\resourceTmp.rc
|
||||||
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
MSBuild.exe HGSolutionWin.sln -t:rebuild /m:8 /p:Configuration=Release
|
||||||
cd /d HGTwainUI
|
cd /d HGTwainUI
|
||||||
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake -r -tp vc HGTwainUI.pro
|
%QT_STATIC_PATH%/x86-windows-static-md/tools/qt5/bin/qmake -r -tp vc HGTwainUI.pro
|
||||||
|
|
|
@ -22,34 +22,26 @@ DEFINES += QT_NO_VERSION_TAGGING
|
||||||
include($$PWD/../HGOEM.pri)
|
include($$PWD/../HGOEM.pri)
|
||||||
|
|
||||||
if (contains(DEFINES, OEM_HANWANG)) {
|
if (contains(DEFINES, OEM_HANWANG)) {
|
||||||
RC_ICONS = ../../../app/scanner2/image_rsc/logo/Hanvon_logo1.ico
|
|
||||||
TARGET = HanvonScan2
|
TARGET = HanvonScan2
|
||||||
} else {
|
} else {
|
||||||
if (contains(DEFINES, OEM_LISICHENG)) {
|
if (contains(DEFINES, OEM_LISICHENG)) {
|
||||||
RC_ICONS = ../../../app/scanner2/image_rsc/logo/Lanxum_logo.ico
|
|
||||||
TARGET = LanxumScan2
|
TARGET = LanxumScan2
|
||||||
} else {
|
} else {
|
||||||
if (contains(DEFINES, OEM_CANGTIAN)) {
|
if (contains(DEFINES, OEM_CANGTIAN)) {
|
||||||
RC_ICONS = ../../../app/scanner2/image_rsc/logo/Cumtenn_logo.ico
|
|
||||||
TARGET = CumtennScan2
|
TARGET = CumtennScan2
|
||||||
} else {
|
} else {
|
||||||
if (contains(DEFINES, OEM_ZHONGJING)) {
|
if (contains(DEFINES, OEM_ZHONGJING)) {
|
||||||
RC_ICONS = ../../../app/scanner2/image_rsc/logo/Microtek_logo.ico
|
|
||||||
TARGET = MicrotekScan2
|
TARGET = MicrotekScan2
|
||||||
} else {
|
} else {
|
||||||
if (contains(DEFINES, OEM_ZIGUANG)) {
|
if (contains(DEFINES, OEM_ZIGUANG)) {
|
||||||
RC_ICONS = ../../../app/scanner2/image_rsc/logo/uniscan.ico
|
|
||||||
TARGET = UniScan2
|
TARGET = UniScan2
|
||||||
} else {
|
} else {
|
||||||
if (contains(DEFINES, OEM_NEUTRAL)) {
|
if (contains(DEFINES, OEM_NEUTRAL)) {
|
||||||
RC_ICONS = ../../../app/scanner2/image_rsc/logo/NoBrand_logo.ico
|
|
||||||
TARGET = NeuScan2
|
TARGET = NeuScan2
|
||||||
} else {
|
} else {
|
||||||
if (contains(DEFINES, OEM_DELI)) {
|
if (contains(DEFINES, OEM_DELI)) {
|
||||||
RC_ICONS = ../../../app/scanner2/image_rsc/logo/deli.ico
|
|
||||||
TARGET = "DELI SCAN2"
|
TARGET = "DELI SCAN2"
|
||||||
} else {
|
} else {
|
||||||
RC_ICONS = ../../../app/scanner2/image_rsc/logo/logo.ico
|
|
||||||
TARGET = HuaGoScan2
|
TARGET = HuaGoScan2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,6 +60,11 @@ CONFIG(release, debug|release) {
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
|
|
||||||
|
if (contains(DEFINES, USE_SCRIPT)) {
|
||||||
|
RC_FILE += ../../../app/scanner2/resourceTmp.rc
|
||||||
|
} else {
|
||||||
|
RC_FILE += ../../../app/scanner2/resource.rc
|
||||||
|
}
|
||||||
MY_OS = windows
|
MY_OS = windows
|
||||||
|
|
||||||
contains(QT_ARCH, i386) {
|
contains(QT_ARCH, i386) {
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,222 @@
|
||||||
|
// hgsetver.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
static bool isLeap(int year)
|
||||||
|
{
|
||||||
|
if ((year % 400 == 0) || (year % 4 == 0 && year % 100 != 0))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int getDays(int year, int month)
|
||||||
|
{
|
||||||
|
if (2 == month)
|
||||||
|
{
|
||||||
|
if (isLeap(year))
|
||||||
|
return 29;
|
||||||
|
else
|
||||||
|
return 28;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (4 == month || 6 == month || 9 == month || 11 == month)
|
||||||
|
{
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 31;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int getPatchVersion()
|
||||||
|
{
|
||||||
|
SYSTEMTIME st;
|
||||||
|
GetLocalTime(&st);
|
||||||
|
|
||||||
|
int year = st.wYear;
|
||||||
|
int day = st.wDay;
|
||||||
|
int month = st.wMonth;
|
||||||
|
|
||||||
|
int ret = year % 100;
|
||||||
|
ret *= 1000;
|
||||||
|
|
||||||
|
for (int i = 1; i < month; ++i)
|
||||||
|
{
|
||||||
|
ret += getDays(year, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret += day;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
std::string brandFile;
|
||||||
|
std::string resourceFile;
|
||||||
|
std::string oemName = "OEM_HUAGAO";
|
||||||
|
std::string cpu = "x86";
|
||||||
|
|
||||||
|
for (int i = 1; i < argc; i++)
|
||||||
|
{
|
||||||
|
char* z = argv[i];
|
||||||
|
|
||||||
|
if (z == strstr(z, "-brandFile="))
|
||||||
|
brandFile = z + strlen("-brandFile=");
|
||||||
|
else if (z == strstr(z, "-resourceFile="))
|
||||||
|
resourceFile = z + strlen("-resourceFile=");
|
||||||
|
else if (z == strstr(z, "-oemName="))
|
||||||
|
oemName = z + strlen("-oemName=");
|
||||||
|
else if (z == strstr(z, "-cpu="))
|
||||||
|
cpu = z + strlen("-cpu=");
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("brandFile:%s\n", brandFile.c_str());
|
||||||
|
printf("resourceFile:%s\n", resourceFile.c_str());
|
||||||
|
printf("oemName:%s\n", oemName.c_str());
|
||||||
|
printf("cpu:%s\n", cpu.c_str());
|
||||||
|
|
||||||
|
if (brandFile.empty() || resourceFile.empty())
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int mainVersion = 0;
|
||||||
|
int subVersion = 0;
|
||||||
|
int buildVersion = 0;
|
||||||
|
int patchVersion = 0;
|
||||||
|
|
||||||
|
FILE* fp = fopen(brandFile.c_str(), "r");
|
||||||
|
if (fp != NULL)
|
||||||
|
{
|
||||||
|
while (feof(fp) == 0)
|
||||||
|
{
|
||||||
|
char lineContent[2048] = { 0 };
|
||||||
|
if (NULL == fgets(lineContent, 2048, fp))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 == mainVersion)
|
||||||
|
{
|
||||||
|
char* p = strstr(lineContent, "VERSION_MAIN");
|
||||||
|
if (NULL != p)
|
||||||
|
{
|
||||||
|
p += strlen("VERSION_MAIN");
|
||||||
|
while (isspace(*p))
|
||||||
|
++p;
|
||||||
|
mainVersion = atoi(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 == subVersion)
|
||||||
|
{
|
||||||
|
char *p = strstr(lineContent, "VERSION_SUB");
|
||||||
|
if (NULL != p)
|
||||||
|
{
|
||||||
|
p += strlen("VERSION_SUB");
|
||||||
|
while (isspace(*p))
|
||||||
|
++p;
|
||||||
|
subVersion = atoi(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 != mainVersion && 0 != subVersion)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oemName == "OEM_LISICHENG")
|
||||||
|
buildVersion = 14;
|
||||||
|
else if (oemName == "OEM_HANWANG")
|
||||||
|
buildVersion = 16;
|
||||||
|
else if (oemName == "OEM_CANGTIAN")
|
||||||
|
buildVersion = 18;
|
||||||
|
else if (oemName == "OEM_ZHONGJING")
|
||||||
|
buildVersion = 20;
|
||||||
|
else if (oemName == "OEM_ZIGUANG")
|
||||||
|
buildVersion = 22;
|
||||||
|
else if (oemName == "OEM_DELI")
|
||||||
|
buildVersion = 24;
|
||||||
|
else if (oemName == "OEM_NEUTRAL")
|
||||||
|
buildVersion = 26;
|
||||||
|
else
|
||||||
|
buildVersion = 10;
|
||||||
|
|
||||||
|
buildVersion = buildVersion * 10;
|
||||||
|
|
||||||
|
if (cpu == "x64")
|
||||||
|
buildVersion += 1;
|
||||||
|
else
|
||||||
|
buildVersion += 0;
|
||||||
|
|
||||||
|
buildVersion *= 100;
|
||||||
|
|
||||||
|
patchVersion = getPatchVersion();
|
||||||
|
|
||||||
|
char version1[32] = { 0 };
|
||||||
|
sprintf(version1, "%d.%d.%d.%d", mainVersion, subVersion, buildVersion, patchVersion);
|
||||||
|
char version2[32] = { 0 };
|
||||||
|
sprintf(version2, "%d,%d,%d,%d", mainVersion, subVersion, buildVersion, patchVersion);
|
||||||
|
|
||||||
|
std::string resourceData;
|
||||||
|
fp = fopen(resourceFile.c_str(), "r");
|
||||||
|
if (NULL != fp)
|
||||||
|
{
|
||||||
|
fseek(fp, 0, SEEK_END);
|
||||||
|
long size = ftell(fp);
|
||||||
|
|
||||||
|
fseek(fp, 0, SEEK_SET);
|
||||||
|
char* buf = new char[size + 1];
|
||||||
|
fread(buf, 1, size, fp);
|
||||||
|
buf[size] = 0;
|
||||||
|
resourceData = buf;
|
||||||
|
delete [] buf;
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (resourceData.empty())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t offset = 0;
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
size_t pos = resourceData.find("0,0,0,0", offset);
|
||||||
|
if (std::string::npos == pos)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
resourceData.replace(pos, strlen("0,0,0,0"), version2);
|
||||||
|
offset = pos + strlen(version2);
|
||||||
|
}
|
||||||
|
|
||||||
|
offset = 0;
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
size_t pos = resourceData.find("0.0.0.0", offset);
|
||||||
|
if (std::string::npos == pos)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
resourceData.replace(pos, strlen("0.0.0.0"), version1);
|
||||||
|
offset = pos + strlen(version1);
|
||||||
|
}
|
||||||
|
|
||||||
|
fp = fopen(resourceFile.c_str(), "w");
|
||||||
|
if (NULL != fp)
|
||||||
|
{
|
||||||
|
fwrite(&resourceData[0], 1, resourceData.size(), fp);
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.32228.343
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hgsetver", "hgsetver.vcxproj", "{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}.Release|x64.Build.0 = Release|x64
|
||||||
|
{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{39A8C4E8-FF2B-4FEA-8959-8AF962279CDD}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {5DE3477A-31B2-4C22-A7C6-56DD0D6E014B}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,151 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>16.0</VCProjectVersion>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<ProjectGuid>{39a8c4e8-ff2b-4fea-8959-8af962279cdd}</ProjectGuid>
|
||||||
|
<RootNamespace>hgsetver</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="hgsetver.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
Loading…
Reference in New Issue