增加64位编译脚本

This commit is contained in:
luoliangyi 2022-08-08 10:22:51 +08:00
parent ef21a17faa
commit a06b47d0aa
4 changed files with 53 additions and 28 deletions

View File

@ -36,7 +36,7 @@ win32 {
}
}
else {
contains(QT_ARCH, x86_64){
LIBS += -L../../../../sdk/lib/win/x64/Release -lHGBase -lHGImgFmt -lHGImgProc
LIBS += -L../../../../sdk/lib/win/x64/OEM/huagao -lsane
CONFIG(release, debug|release) {

View File

@ -35,7 +35,7 @@ win32 {
}
}
else {
contains(QT_ARCH, x86_64){
LIBS += -L../../../../sdk/lib/win/x64/Release -lHGBase -lHGVersion
CONFIG(release, debug|release) {
DESTDIR = ../../../../release/win/x64/Release/

View File

@ -1,13 +1,14 @@
set OEM=%1
set ARCH=%2
if "%OEM%" == "hw" (
MSBuild.exe ./build/windows/HGSolution.sln /m:6 /p:Configuration=HWRelease /p:Platform=x86
MSBuild.exe ./build/windows/HGSolution.sln /m:6 /p:Configuration=HWRelease /p:Platform=%ARCH%
) else (
if "%OEM%" == "lsc" (
MSBuild.exe ./build/windows/HGSolution.sln /m:6 /p:Configuration=LSCRelease /p:Platform=x86
MSBuild.exe ./build/windows/HGSolution.sln /m:6 /p:Configuration=LSCRelease /p:Platform=%ARCH%
) else (
MSBuild.exe ./build/windows/HGSolution.sln /m:6 /p:Configuration=Release /p:Platform=x86
MSBuild.exe ./build/windows/HGSolution.sln /m:6 /p:Configuration=Release /p:Platform=%ARCH%
)
)
@ -21,8 +22,12 @@ if "%OEM%" == "hw" (
sed -i "s/HGImgFmt/HWImgFmt/g" HGScannerTmp.pro
sed -i "s/HGImgProc/HWImgProc/g" HGScannerTmp.pro
sed -i "s/logo.ico/Hanvon_logo1.ico/g" HGScannerTmp.pro
qmake -r -tp vc HGScannerTmp.pro
MSBuild.exe HanvonScan.vcxproj /m:6 /p:Configuration=Release /p:Platform=x86
if "%ARCH%" == "x64" (
%QT_PATH%/msvc2017_64/bin/qmake -r -tp vc HGScannerTmp.pro
) else (
%QT_PATH%/msvc2017/bin/qmake -r -tp vc HGScannerTmp.pro
)
MSBuild.exe HanvonScan.vcxproj /m:6 /p:Configuration=Release /p:Platform=%ARCH%
) else (
if "%OEM%" == "lsc" (
sed -i "s/OEM_HUAGAO/OEM_LISICHENG/g" HGScannerTmp.pro
@ -32,11 +37,19 @@ if "%OEM%" == "hw" (
sed -i "s/HGImgFmt/LSCImgFmt/g" HGScannerTmp.pro
sed -i "s/HGImgProc/LSCImgProc/g" HGScannerTmp.pro
sed -i "s/logo.ico/Lanxum_logo.ico/g" HGScannerTmp.pro
qmake -r -tp vc HGScannerTmp.pro
MSBuild.exe LanxumScan.vcxproj /m:6 /p:Configuration=Release /p:Platform=x86
if "%ARCH%" == "x64" (
%QT_PATH%/msvc2017_64/bin/qmake -r -tp vc HGScannerTmp.pro
) else (
qmake -r -tp vc HGScannerTmp.pro
MSBuild.exe HuaGoScan.vcxproj /m:6 /p:Configuration=Release /p:Platform=x86
%QT_PATH%/msvc2017/bin/qmake -r -tp vc HGScannerTmp.pro
)
MSBuild.exe LanxumScan.vcxproj /m:6 /p:Configuration=Release /p:Platform=%ARCH%
) else (
if "%ARCH%" == "x64" (
%QT_PATH%/msvc2017_64/bin/qmake -r -tp vc HGScannerTmp.pro
) else (
%QT_PATH%/msvc2017/bin/qmake -r -tp vc HGScannerTmp.pro
)
MSBuild.exe HuaGoScan.vcxproj /m:6 /p:Configuration=Release /p:Platform=%ARCH%
)
)
del /f /s /q *.h
@ -59,8 +72,12 @@ if "%OEM%" == "hw" (
sed -i "s/HGBase/HWBase/g" HGUpgradeTmp.pro
sed -i "s/HGVersion/HWVersion/g" HGUpgradeTmp.pro
sed -i "s/logo.ico/Hanvon_logo1.ico/g" HGUpgradeTmp.pro
qmake -r -tp vc HGUpgradeTmp.pro
MSBuild.exe HWUpgradeApp.vcxproj /m:6 /p:Configuration=Release /p:Platform=x86
if "%ARCH%" == "x64" (
%QT_PATH%/msvc2017_64/bin/qmake -r -tp vc HGUpgradeTmp.pro
) else (
%QT_PATH%/msvc2017/bin/qmake -r -tp vc HGUpgradeTmp.pro
)
MSBuild.exe HWUpgradeApp.vcxproj /m:6 /p:Configuration=Release /p:Platform=%ARCH%
) else (
if "%OEM%" == "lsc" (
sed -i "s/OEM_HUAGAO/OEM_LISICHENG/g" HGUpgradeTmp.pro
@ -68,11 +85,19 @@ if "%OEM%" == "hw" (
sed -i "s/HGBase/LSCBase/g" HGUpgradeTmp.pro
sed -i "s/HGVersion/LSCVersion/g" HGUpgradeTmp.pro
sed -i "s/logo.ico/Lanxum_logo.ico/g" HGUpgradeTmp.pro
qmake -r -tp vc HGUpgradeTmp.pro
MSBuild.exe LSCUpgradeApp.vcxproj /m:6 /p:Configuration=Release /p:Platform=x86
if "%ARCH%" == "x64" (
%QT_PATH%/msvc2017_64/bin/qmake -r -tp vc HGUpgradeTmp.pro
) else (
qmake -r -tp vc HGUpgradeTmp.pro
MSBuild.exe HGUpgradeApp.vcxproj /m:6 /p:Configuration=Release /p:Platform=x86
%QT_PATH%/msvc2017/bin/qmake -r -tp vc HGUpgradeTmp.pro
)
MSBuild.exe LSCUpgradeApp.vcxproj /m:6 /p:Configuration=Release /p:Platform=%ARCH%
) else (
if "%ARCH%" == "x64" (
%QT_PATH%/msvc2017_64/bin/qmake -r -tp vc HGUpgradeTmp.pro
) else (
%QT_PATH%/msvc2017/bin/qmake -r -tp vc HGUpgradeTmp.pro
)
MSBuild.exe HGUpgradeApp.vcxproj /m:6 /p:Configuration=Release /p:Platform=%ARCH%
)
)
del /f /s /q *.h

View File

@ -287,7 +287,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_CONSOLE;_WINSOCK_DEPRECATED_NO_WARNINGS;ZIP_STATIC;_CRT_SECURE_NO_WARNINGS;OEM_HUAGAO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_CONSOLE;_WINSOCK_DEPRECATED_NO_WARNINGS;ZIP_STATIC;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;OEM_HUAGAO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>../../../modules/;../../../third_party/sha1/;../../../third_party/base64/;../../../third_party/json/;../../../third_party/sqlite/;../../../utility/;../../../third_party/libzip/windows/include/;../../../third_party/libcurl/windows/include/;../../../../sdk/include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -295,7 +295,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>../x64/Debug/HGBase.lib;../x64/Debug/HGImgFmt.lib;../x64/Debug/HGImgProc.lib;../../../../sdk/lib/win/x64/OEM/huagao/sane.lib;../../../third_party/zlib/windows/lib/x64/zlib.lib;../../../third_party/libzip/windows/lib/x64/zip.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>../x64/Debug/HGBase.lib;../x64/Debug/HGImgFmt.lib;../x64/Debug/HGImgProc.lib;../../../../sdk/lib/win/x64/OEM/huagao/sane.lib;../../../third_party/zlib/windows/lib/x64/zlib.lib;../../../third_party/libzip/windows/lib/x64/zip.lib;../../../third_party/libcurl/windows/lib/x64/libcurld.lib;wldap32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/ignore:4098,4099,4075 /LTCG %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
@ -305,7 +305,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_CONSOLE;_WINSOCK_DEPRECATED_NO_WARNINGS;ZIP_STATIC;_CRT_SECURE_NO_WARNINGS;OEM_HUAGAO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_CONSOLE;_WINSOCK_DEPRECATED_NO_WARNINGS;ZIP_STATIC;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;OEM_HUAGAO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>../../../modules/;../../../third_party/sha1/;../../../third_party/base64/;../../../third_party/json/;../../../third_party/sqlite/;../../../utility/;../../../third_party/libzip/windows/include/;../../../third_party/libcurl/windows/include/;../../../../sdk/include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -315,8 +315,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>../x64/Release/HGBase.lib;../x64/Release/HGImgFmt.lib;../x64/Release/HGImgProc.lib;../../../../sdk/lib/win/x64/OEM/huagao/sane.lib;../../../third_party/zlib/windows/lib/x64/zlib.lib;../../../third_party/libzip/windows/lib/x64/zip.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>../x64/Release/HGBase.lib;../x64/Release/HGImgFmt.lib;../x64/Release/HGImgProc.lib;../../../../sdk/lib/win/x64/OEM/huagao/sane.lib;../../../third_party/zlib/windows/lib/x64/zlib.lib;../../../third_party/libzip/windows/lib/x64/zip.lib;../../../third_party/libcurl/windows/lib/x64/libcurl.lib;wldap32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/ignore:4099 /LTCG %(AdditionalOptions)</AdditionalOptions>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)HGWebService.exe $(SolutionDir)..\..\..\release\win\x64\Release\</Command>
@ -328,7 +328,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_CONSOLE;_WINSOCK_DEPRECATED_NO_WARNINGS;ZIP_STATIC;_CRT_SECURE_NO_WARNINGS;OEM_HANWANG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_CONSOLE;_WINSOCK_DEPRECATED_NO_WARNINGS;ZIP_STATIC;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;OEM_HANWANG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>../../../modules/;../../../third_party/sha1/;../../../third_party/base64/;../../../third_party/json/;../../../third_party/sqlite/;../../../utility/;../../../third_party/libzip/windows/include/;../../../third_party/libcurl/windows/include/;../../../../sdk/include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -338,8 +338,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>../x64/HWRelease/HWBase.lib;../x64/HWRelease/HWImgFmt.lib;../x64/HWRelease/HWImgProc.lib;../../../../sdk/lib/win/x64/OEM/hanvon/sane.lib;../../../third_party/zlib/windows/lib/x64/zlib.lib;../../../third_party/libzip/windows/lib/x64/zip.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>../x64/HWRelease/HWBase.lib;../x64/HWRelease/HWImgFmt.lib;../x64/HWRelease/HWImgProc.lib;../../../../sdk/lib/win/x64/OEM/hanvon/sane.lib;../../../third_party/zlib/windows/lib/x64/zlib.lib;../../../third_party/libzip/windows/lib/x64/zip.lib;../../../third_party/libcurl/windows/lib/x64/libcurl.lib;wldap32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/ignore:4099 /LTCG %(AdditionalOptions)</AdditionalOptions>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)HWWebService.exe $(SolutionDir)..\..\..\release\win\x64\Release\</Command>
@ -351,7 +351,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_CONSOLE;_WINSOCK_DEPRECATED_NO_WARNINGS;ZIP_STATIC;_CRT_SECURE_NO_WARNINGS;OEM_LISICHENG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_CONSOLE;_WINSOCK_DEPRECATED_NO_WARNINGS;ZIP_STATIC;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;OEM_LISICHENG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>../../../modules/;../../../third_party/sha1/;../../../third_party/base64/;../../../third_party/json/;../../../third_party/sqlite/;../../../utility/;../../../third_party/libzip/windows/include/;../../../third_party/libcurl/windows/include/;../../../../sdk/include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -361,8 +361,8 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>../x64/LSCRelease/LSCBase.lib;../x64/LSCRelease/LSCImgFmt.lib;../x64/LSCRelease/LSCImgProc.lib;../../../../sdk/lib/win/x64/OEM/lanxum/sane.lib;../../../third_party/zlib/windows/lib/x64/zlib.lib;../../../third_party/libzip/windows/lib/x64/zip.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>../x64/LSCRelease/LSCBase.lib;../x64/LSCRelease/LSCImgFmt.lib;../x64/LSCRelease/LSCImgProc.lib;../../../../sdk/lib/win/x64/OEM/lanxum/sane.lib;../../../third_party/zlib/windows/lib/x64/zlib.lib;../../../third_party/libzip/windows/lib/x64/zip.lib;../../../third_party/libcurl/windows/lib/x64/libcurl.lib;wldap32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/ignore:4099 /LTCG %(AdditionalOptions)</AdditionalOptions>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)LSCWebService.exe $(SolutionDir)..\..\..\release\win\x64\Release\</Command>