调整生产工具编译环境

This commit is contained in:
yangjiaxuan 2023-07-25 15:07:06 +08:00
parent e2ddfd3453
commit 6a05de52ac
3 changed files with 58 additions and 30 deletions

View File

@ -19,41 +19,60 @@ TARGET = ProductionTool
RC_ICONS = image_rsc/logo/logo.ico RC_ICONS = image_rsc/logo/logo.ico
win32 { CONFIG(debug, debug|release) {
DEFINES += _CRT_SECURE_NO_WARNINGS MY_CONFIGURE = Debug
}
CONFIG(release, debug|release) {
MY_CONFIGURE = Release
}
contains(QT_ARCH, i386) { MY_OS = windows
LIBS += -L../../../sdk/lib/win/x86/Release -lHGBase -lHGImgFmt -lHGImgProc OEM_NAME = huagao
LIBS += -L../../../sdk/lib/win/x86/OEM/huagao -lsane OEM_PREFIX = HG
CONFIG(release, debug|release) {
LIBS += -L../../db/Release -lHGPdtToolDb win32 {
LIBS += -L../../code/base/Release/ -ltest
DESTDIR = ../../../release/win/x86/Release contains(QT_ARCH, i386) {
} MY_ARCH = x86
CONFIG(debug, debug|release) { }
LIBS += -L../../db/Debug -lHGPdtToolDb contains(QT_ARCH, x86_64) {
LIBS += -L../../code/base/Debug/ -ltest MY_ARCH = x64
} }
}
contains(QT_ARCH, x86_64){ LIBS += -L$$PWD/../../../code_app/build2/build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base -l$${OEM_PREFIX}ImgFmt -l$${OEM_PREFIX}ImgProc
LIBS += -L../../../sdk/lib/win/x64/Release -lHGBase -lHGImgFmt -lHGImgProc LIBS += -L$$PWD/../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -lsane
LIBS += -L../../../sdk/lib/win/x64/OEM/huagao -lsane
CONFIG(release, debug|release) { # sane.dll
LIBS += -L../../db/x64/Release -lHGPdtToolDb LIBS += -L$$PWD/../../../release/win/$${MY_ARCH}/OEM/$${OEM_NAME}
LIBS += -L../../code/base/x64/Release/ -ltest
DESTDIR = ../../../release/win/x64/Release LIBS += -L$$PWD/../../db/$${MY_CONFIGURE} -lHGPdtToolDb
} LIBS += -L$$PWD/../../code/base/$${MY_CONFIGURE} -ltest
CONFIG(debug, debug|release) {
LIBS += -L../../db/x64/Debug -lHGPdtToolDb
LIBS += -L../../code/base/x64/Debug/ -ltest
}
}
} }
INCLUDEPATH += $$PWD/../../../sdk/include/ INCLUDEPATH += $$PWD/../../../sdk/include/
INCLUDEPATH += $$PWD/../../db/HGPdtToolDb/ INCLUDEPATH += $$PWD/../../db/HGPdtToolDb/
INCLUDEPATH += $$PWD/../../code/base/ INCLUDEPATH += $$PWD/../../code/base/
DESTDIR = $$PWD/../../../code_app/build2/build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE}
win32 {
CONFIG(release, debug|release) {
DESTEXE_PATH = $${PWD}/../../../release/win/$${MY_ARCH}/$${MY_CONFIGURE}/
DESTEXE_PATH = $$replace(DESTEXE_PATH, /, \\)
message(DESTEXE_PATH: $$DESTEXE_PATH)
SRCEXE_FILE = $${DESTDIR}/$${TARGET}.exe
SRCEXE_FILE = $$replace(SRCEXE_FILE, /, \\)
message(SRCEXE_FILE: $$SRCEXE_FILE)
SRCPDB_FILE = $${DESTDIR}/$${TARGET}.pdb
SRCPDB_FILE = $$replace(SRCPDB_FILE, /, \\)
message(SRCPDB_FILE: $$SRCPDB_FILE)
QMAKE_POST_LINK += xcopy /y $$SRCEXE_FILE $$DESTEXE_PATH && xcopy /y $$SRCPDB_FILE $$DESTEXE_PATH
}
}
SOURCES += \ SOURCES += \
../../../code_app/utility/HGString.cpp \ ../../../code_app/utility/HGString.cpp \
HGImgView.cpp \ HGImgView.cpp \

View File

@ -75,6 +75,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);..\..\..\sdk\include;..\..\app\HGProductionTool\;$(IncludePath)</IncludePath> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);..\..\..\sdk\include;..\..\app\HGProductionTool\;$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);..\..\..\sdk\include;..\..\app\HGProductionTool\;</IncludePath> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);..\..\..\sdk\include;..\..\app\HGProductionTool\;</IncludePath>
@ -93,6 +94,9 @@
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
<PostBuildEvent>
<Command>copy $(OutDir)test.dll $(SolutionDir)..\..\..\code_app\build2\build\windows\huagao\x86\Debug\</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
@ -110,7 +114,8 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)test.dll $(SolutionDir)..\..\..\release\win\x86\Release\</Command> <Command>copy $(OutDir)test.dll $(SolutionDir)..\..\..\release\win\x86\Release\
copy $(OutDir)test.dll $(SolutionDir)..\..\..\code_app\build2\build\windows\huagao\x86\Release\</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

View File

@ -115,6 +115,9 @@
<AdditionalLibraryDirectories>../lib/x86;../../../sdk/lib/win/x86/Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>../lib/x86;../../../sdk/lib/win/x86/Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
<PostBuildEvent>
<Command>copy $(OutDir)HGPdtToolDb.dll $(SolutionDir)..\..\code_app\build2\build\windows\huagao\x86\Debug\</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
@ -141,7 +144,8 @@
<AdditionalOptions>/ignore:4099 /LTCG %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/ignore:4099 /LTCG %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)HGPdtToolDb.dll $(SolutionDir)..\..\release\win\x86\Release\</Command> <Command>copy $(OutDir)HGPdtToolDb.dll $(SolutionDir)..\..\release\win\x86\Release\
copy $(OutDir)HGPdtToolDb.dll $(SolutionDir)..\..\code_app\build2\build\windows\huagao\x86\Release\</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">