调整生产工具编译环境

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
CONFIG(debug, debug|release) {
MY_CONFIGURE = Debug
}
CONFIG(release, debug|release) {
MY_CONFIGURE = Release
}
MY_OS = windows
OEM_NAME = huagao
OEM_PREFIX = HG
win32 {
DEFINES += _CRT_SECURE_NO_WARNINGS
contains(QT_ARCH, i386) {
LIBS += -L../../../sdk/lib/win/x86/Release -lHGBase -lHGImgFmt -lHGImgProc
LIBS += -L../../../sdk/lib/win/x86/OEM/huagao -lsane
CONFIG(release, debug|release) {
LIBS += -L../../db/Release -lHGPdtToolDb
LIBS += -L../../code/base/Release/ -ltest
DESTDIR = ../../../release/win/x86/Release
}
CONFIG(debug, debug|release) {
LIBS += -L../../db/Debug -lHGPdtToolDb
LIBS += -L../../code/base/Debug/ -ltest
}
}
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) {
LIBS += -L../../db/x64/Release -lHGPdtToolDb
LIBS += -L../../code/base/x64/Release/ -ltest
DESTDIR = ../../../release/win/x64/Release
}
CONFIG(debug, debug|release) {
LIBS += -L../../db/x64/Debug -lHGPdtToolDb
LIBS += -L../../code/base/x64/Debug/ -ltest
MY_ARCH = x86
}
contains(QT_ARCH, x86_64) {
MY_ARCH = x64
}
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$$PWD/../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -lsane
# sane.dll
LIBS += -L$$PWD/../../../release/win/$${MY_ARCH}/OEM/$${OEM_NAME}
LIBS += -L$$PWD/../../db/$${MY_CONFIGURE} -lHGPdtToolDb
LIBS += -L$$PWD/../../code/base/$${MY_CONFIGURE} -ltest
}
INCLUDEPATH += $$PWD/../../../sdk/include/
INCLUDEPATH += $$PWD/../../db/HGPdtToolDb/
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 += \
../../../code_app/utility/HGString.cpp \
HGImgView.cpp \

View File

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

View File

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