调整编译脚本。(build_all.bat OEM ARCH)即可编译指定OEM指定CPU架构的所有组件。(build_all.bat all)编译所有OEM所有平台架构的组件。build_base.bat用于编译lang/scanner/sane三个组件;build_ds.bat只用于编译TWAIN数据源
This commit is contained in:
parent
3f3fcc6ab2
commit
021e0d2ce2
94
build.bat
94
build.bat
|
@ -1,94 +0,0 @@
|
|||
@echo off
|
||||
echo "Parameter 1:hg | lsc| hw | zj | cts"
|
||||
echo "Parameter 2:x86 | x64 "
|
||||
echo "Parameter 3:0x100 | 0x... "
|
||||
echo "Parameter 4:0 | 1 , is 1 var++ ,is 0 var unchanged "
|
||||
echo "Parameter 5:onlytwain | all ,is onlytwain build twain ,is all ,build scanner.dll sane.dll and twain..."
|
||||
set OEM=%1
|
||||
set CPU=%2
|
||||
set PID=%3
|
||||
set NOV=%4
|
||||
set ISTWAIN=%5
|
||||
set COMPILE_RANGE="none"
|
||||
set NOT_INCREASE_VER=""
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%OEM%" equ "hg" goto oem
|
||||
if "%OEM%" equ "hw" goto oem
|
||||
if "%OEM%" equ "lsc" goto oem
|
||||
if "%OEM%" equ "zj" goto oem
|
||||
if "%OEM%" equ "cts" goto oem
|
||||
echo "Parameter 1:oem is fail"
|
||||
exit 1
|
||||
:oem
|
||||
echo %OEM%
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%CPU%" equ "x64" goto sys
|
||||
if "%CPU%" equ "x86" goto sys
|
||||
echo "Parameter 2:sys is fail"
|
||||
exit 1
|
||||
:sys
|
||||
echo %CPU%
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%PID:~0,2%" equ "0x" goto pid
|
||||
echo "Parameter 3:pid is fail"
|
||||
exit 1
|
||||
:pid
|
||||
echo %PID%
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%NOV%" equ "0" (
|
||||
set NOT_INCREASE_VER="-nov"
|
||||
goto nov
|
||||
)
|
||||
if "%NOV%" equ "1" goto nov
|
||||
echo "Parameter 4:ver is 0 or 1"
|
||||
exit 1
|
||||
:nov
|
||||
echo var:%NOV% NOT_INCREASE_VER:%NOT_INCREASE_VER%
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%ISTWAIN%" equ "onlytwain" (
|
||||
set COMPILE_RANGE="-only-twain"
|
||||
goto istwain
|
||||
)
|
||||
if "%ISTWAIN%" equ "all" goto istwain
|
||||
echo "Parameter 5:istwain is onlytwain or all"
|
||||
exit 1
|
||||
:istwain
|
||||
|
||||
echo istwain:"%ISTWAIN%" COMPILE_RANGE:%COMPILE_RANGE%
|
||||
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
echo oem=%OEM%
|
||||
echo cpu=%CPU%
|
||||
echo pid=%PID%
|
||||
|
||||
if "%COMPILE_RANGE%"=="none" (
|
||||
set dev=""
|
||||
for /f "tokens=1,2,* " %%i in ('reg QUERY "HKEY_CLASSES_ROOT\CLSID\{2E1517DA-87BF-4443-984A-D2BF18F5A908}\LocalServer32" /ve') do set dev=%%k
|
||||
echo dev=%dev%
|
||||
|
||||
if "%dev%"=="" (
|
||||
echo "Can not find Visual-Studio installing path"
|
||||
goto end
|
||||
)
|
||||
call %dev%\..\..\..\vc\auxiliary\build\vcvars32.bat
|
||||
)
|
||||
|
||||
"%~dp0\sln\release\hgsetver.exe" "%~dp0\..\sdk\include\huagao\brand.h" -oem %OEM% -cpu %CPU% -pid %PID% %COMPILE_RANGE% %NOT_INCREASE_VER%
|
||||
if %COMPILE_RANGE%=="none" (
|
||||
MSBuild.exe "%~dp0\lang\lang.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
|
||||
MSBuild.exe "%~dp0\device\scanner.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
|
||||
MSBuild.exe "%~dp0\sane\sane.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
|
||||
)
|
||||
MSBuild.exe "%~dp0\twain\twain.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
|
||||
|
||||
|
||||
:end
|
234
build_all.bat
234
build_all.bat
|
@ -1,85 +1,167 @@
|
|||
REM build_all.bat all|hg|hw|lsc|cts... x86|x64
|
||||
echo off
|
||||
set OEM=""
|
||||
set NOV=""
|
||||
set OEM=%1
|
||||
set CPU=%2
|
||||
|
||||
if "%1"=="hw" (
|
||||
set OEM=%1
|
||||
) else if "%1"=="lsc" (
|
||||
set OEM=%1
|
||||
) else if "%1"=="cts" (
|
||||
set OEM=%1
|
||||
)else if "%2"=="hw" (
|
||||
set OEM=%2
|
||||
) else if "%2"=="lsc" (
|
||||
set OEM=%2
|
||||
) else if "%2"=="cts" (
|
||||
set OEM=%2
|
||||
)else if "%3"=="hw" (
|
||||
set OEM=%3
|
||||
) else if "%3"=="lsc" (
|
||||
set OEM=%3
|
||||
) else if "%3"=="cts" (
|
||||
set OEM=%3
|
||||
)
|
||||
if "%1"=="nov" (
|
||||
set NOV=%1
|
||||
) else if "%2"=="nov" (
|
||||
set NOV=%2
|
||||
) else if "%3"=="nov" (
|
||||
set NOV=%3
|
||||
)
|
||||
echo oem=%OEM%
|
||||
if "%CPU%"=="" (
|
||||
set CPU=x86
|
||||
)
|
||||
set BUILD_HG=false
|
||||
set BUILD_HW=false
|
||||
set BUILD_LSC=false
|
||||
set BUILD_CTS=false
|
||||
set BUILD_ZJ=false
|
||||
|
||||
set BUILD_X86=true
|
||||
set BUILD_X64=true
|
||||
|
||||
echo build -cpu %CPU% -oem %OEM% %NOV%
|
||||
|
||||
set CPU=x64
|
||||
if "%OEM%"=="hw" (
|
||||
build.bat %OEM% x64 0x1000 %NOV%
|
||||
build.bat %OEM% x64 onlytwain 0x1002 nov
|
||||
build.bat %OEM% x64 onlytwain 0x7000 nov
|
||||
build.bat %OEM% x64 onlytwain 0x7002 nov
|
||||
build.bat %OEM% x64 onlytwain 0x7039 nov
|
||||
build.bat %OEM% x64 onlytwain 0x8000 nov
|
||||
build.bat %OEM% x64 onlytwain 0x9000 nov
|
||||
set CPU=x86
|
||||
build.bat %OEM% x86 0x1000 nov
|
||||
build.bat %OEM% x86 onlytwain 0x1002 nov
|
||||
build.bat %OEM% x86 onlytwain 0x7000 nov
|
||||
build.bat %OEM% x86 onlytwain 0x7002 nov
|
||||
build.bat %OEM% x86 onlytwain 0x7039 nov
|
||||
build.bat %OEM% x86 onlytwain 0x8000 nov
|
||||
build.bat %OEM% x86 onlytwain 0x9000 nov
|
||||
set BUILD_HW=true
|
||||
) else if "%OEM%" == "lsc" (
|
||||
build.bat %OEM% x64 0x8420 %NOV%
|
||||
build.bat %OEM% x64 onlytwain 0x8520 nov
|
||||
build.bat %OEM% x64 onlytwain 0x8620 nov
|
||||
build.bat %OEM% x64 onlytwain 0x8730 nov
|
||||
set CPU=x86
|
||||
build.bat %OEM% x86 0x8420 nov
|
||||
build.bat %OEM% x86 onlytwain 0x8520 nov
|
||||
build.bat %OEM% x86 onlytwain 0x8620 nov
|
||||
build.bat %OEM% x86 onlytwain 0x8730 nov
|
||||
set BUILD_LSC=true
|
||||
) else if "%OEM%" == "cts" (
|
||||
build.bat %OEM% x64 0x6006 %NOV%
|
||||
build.bat %OEM% x64 onlytwain 0x6005 nov
|
||||
build.bat %OEM% x64 onlytwain 0x0238 nov
|
||||
build.bat %OEM% x64 onlytwain 0x0138 nov
|
||||
set CPU=x86
|
||||
build.bat %OEM% x86 0x6006 nov
|
||||
build.bat %OEM% x86 onlytwain 0x6005 nov
|
||||
build.bat %OEM% x86 onlytwain 0x0238 nov
|
||||
build.bat %OEM% x86 onlytwain 0x0138 nov
|
||||
set BUILD_CTS=true
|
||||
) else if "%OEM%" == "zj" (
|
||||
set BUILD_ZJ=true
|
||||
) else if "%OEM%" == "all" (
|
||||
set BUILD_HG=true
|
||||
set BUILD_HW=true
|
||||
set BUILD_LSC=true
|
||||
set BUILD_CTS=true
|
||||
set BUILD_ZJ=true
|
||||
)else (
|
||||
build.bat x64 0x100 %NOV%
|
||||
build.bat x64 onlytwain 0x200 nov
|
||||
build.bat x64 onlytwain 0x300 nov
|
||||
build.bat x64 onlytwain 0x400 nov
|
||||
set CPU=x86
|
||||
build.bat x86 0x100 nov
|
||||
build.bat x86 onlytwain 0x200 nov
|
||||
build.bat x86 onlytwain 0x300 nov
|
||||
build.bat x86 onlytwain 0x400 nov
|
||||
set BUILD_HG=true
|
||||
set OEM=hg
|
||||
)
|
||||
|
||||
if "%CPU%"=="x86" (
|
||||
set BUILD_X64=false
|
||||
) else if "%CPU%"=="x64" (
|
||||
set BUILD_X86=false
|
||||
) else (
|
||||
set CPU=x64 and x86
|
||||
)
|
||||
|
||||
echo build OEM:%OEM%, ARCH:%CPU%
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%VSCMD_VER%" neq "" goto compile
|
||||
set dev=""
|
||||
for /f "tokens=1,2,* " %%i in ('reg QUERY "HKEY_CLASSES_ROOT\CLSID\{2E1517DA-87BF-4443-984A-D2BF18F5A908}\LocalServer32" /ve') do set dev=%%k
|
||||
echo dev=%dev%
|
||||
|
||||
if %dev% == "" (
|
||||
echo "Can not find Visual-Studio installing path"
|
||||
goto end
|
||||
)
|
||||
call %dev%\..\..\..\vc\auxiliary\build\vcvars64.bat
|
||||
|
||||
|
||||
|
||||
rem ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
:compile
|
||||
|
||||
if "%BUILD_HW%"=="true" (
|
||||
if "%BUILD_X86%"=="true" call :compile_hw hw x86
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
if "%BUILD_X64%"=="true" call :compile_hw hw x64
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
)
|
||||
if "%BUILD_LSC%"=="true" (
|
||||
if "%BUILD_X86%"=="true" call :compile_lsc lsc x86
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
if "%BUILD_X64%"=="true" call :compile_lsc lsc x64
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
)
|
||||
if "%BUILD_CTS%"=="true" (
|
||||
if "%BUILD_X86%"=="true" call :compile_ct cts x86
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
if "%BUILD_X64%"=="true" call :compile_ct cts x64
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
)
|
||||
if "%BUILD_ZJ%"=="true" (
|
||||
if "%BUILD_X86%"=="true" call :compile_zj zj x86
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
if "%BUILD_X64%"=="true" call :compile_zj zj x64
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
)
|
||||
if "%BUILD_HG%"=="true" (
|
||||
if "%BUILD_X86%"=="true" call :compile_hg hg x86
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
if "%BUILD_X64%"=="true" call :compile_hg hg x64
|
||||
)
|
||||
goto end
|
||||
|
||||
|
||||
rem ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
REM parameters for all OEM compiling procedure are: oem cpu
|
||||
|
||||
:compile_hg
|
||||
call build_base.bat %1 %2
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 100
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 200
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 300
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 400
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
EXIT /B 0
|
||||
|
||||
:compile_hw
|
||||
call build_base.bat %1 %2
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 1000
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 1002
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 7000
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 7002
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 7039
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 8000
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 9000
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
EXIT /B 0
|
||||
|
||||
:compile_lsc
|
||||
call build_base.bat %1 %2
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 8420
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 8520
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 8620
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 8730
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
EXIT /B 0
|
||||
|
||||
:compile_ct
|
||||
call build_base.bat %1 %2
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 138
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 238
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 6005
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 6006
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
EXIT /B 0
|
||||
|
||||
:compile_zj
|
||||
call build_base.bat %1 %2
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
call build_ds.bat %1 %2 9200
|
||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||
EXIT /B 0
|
||||
|
||||
|
||||
|
||||
:end
|
||||
echo final result = %ERRORLEVEL%
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
@echo off
|
||||
echo "Parameter 1:hg | lsc| hw | zj | cts"
|
||||
echo "Parameter 2:x86 | x64 "
|
||||
echo "Parameter 3:0x100 | 0x... "
|
||||
echo "Parameter 4:0 | 1 , is 1 var++ ,is 0 var unchanged "
|
||||
echo "Parameter 5:onlytwain | all ,is onlytwain build twain ,is all ,build scanner.dll sane.dll and twain..."
|
||||
|
||||
|
||||
call build.bat hg x86 0x100 0 all
|
||||
call build.bat hg x86 0x200 0 onlytwain
|
||||
call build.bat hg x86 0x300 0 onlytwain
|
||||
call build.bat hg x86 0x400 0 onlytwain
|
||||
|
||||
call build.bat hg x64 0x100 0 all
|
||||
call build.bat hg x64 0x200 0 onlytwain
|
||||
call build.bat hg x64 0x300 0 onlytwain
|
||||
call build.bat hg x64 0x400 0 onlytwain
|
||||
|
||||
call build.bat hw x86 0x1000 0 all
|
||||
call build.bat hw x86 0x1002 0 onlytwain
|
||||
call build.bat hw x86 0x7000 0 onlytwain
|
||||
call build.bat hw x86 0x7002 0 onlytwain
|
||||
call build.bat hw x86 0x7039 0 onlytwain
|
||||
call build.bat hw x86 0x8000 0 onlytwain
|
||||
call build.bat hw x86 0x9000 0 onlytwain
|
||||
|
||||
call build.bat hw x64 0x1000 0 all
|
||||
call build.bat hw x64 0x1002 0 onlytwain
|
||||
call build.bat hw x64 0x7000 0 onlytwain
|
||||
call build.bat hw x64 0x7002 0 onlytwain
|
||||
call build.bat hw x64 0x7039 0 onlytwain
|
||||
call build.bat hw x64 0x8000 0 onlytwain
|
||||
call build.bat hw x64 0x9000 0 onlytwain
|
||||
|
||||
call build.bat lsc x86 0x8420 0 all
|
||||
call build.bat lsc x86 0x8520 0 onlytwain
|
||||
call build.bat lsc x86 0x8620 0 onlytwain
|
||||
call build.bat lsc x86 0x8730 0 onlytwain
|
||||
|
||||
call build.bat lsc x64 0x8420 0 all
|
||||
call build.bat lsc x64 0x8520 0 onlytwain
|
||||
call build.bat lsc x64 0x8620 0 onlytwain
|
||||
call build.bat lsc x64 0x8730 0 onlytwain
|
||||
|
||||
call build.bat cts x86 0x6006 0 all
|
||||
call build.bat cts x86 0x6005 0 onlytwain
|
||||
call build.bat cts x86 0x0238 0 onlytwain
|
||||
call build.bat cts x86 0x0138 0 onlytwain
|
||||
|
||||
call build.bat cts x64 0x6006 0 all
|
||||
call build.bat cts x64 0x6005 0 onlytwain
|
||||
call build.bat cts x64 0x0238 0 onlytwain
|
||||
call build.bat cts x64 0x0138 0 onlytwain
|
||||
|
||||
call build.bat zj x64 0x9200 0 all
|
||||
|
||||
call build.bat zj x86 0x9200 0 all
|
|
@ -0,0 +1,107 @@
|
|||
@echo off
|
||||
echo "Parameter 1:hg | lsc| hw | zj | cts"
|
||||
echo "Parameter 2:x86 | x64 "
|
||||
|
||||
set OEM=%1
|
||||
set CPU=%2
|
||||
set OEM_DIR=""
|
||||
set TMP_PATH=%~dp0..\tmp\%CPU%
|
||||
set BIN_PATH=%~dp0..\release\win\%CPU%
|
||||
set LIB_PATH=%~dp0..\sdk\lib\win\%CPU%
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%OEM%" equ "hg" (
|
||||
set OEM_DIR=huagao
|
||||
set CL=/DOEM_HUAGAO /DBACKEND_NAME=hgsane
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "hw" (
|
||||
set OEM_DIR=hanvon
|
||||
set CL=/DOEM_HANWANG /DBACKEND_NAME=hwsane
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "lsc" (
|
||||
set OEM_DIR=lanxum
|
||||
set CL=/DOEM_LISICHENG /DBACKEND_NAME=lscsane
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "zj" (
|
||||
set OEM_DIR=zhongj
|
||||
set CL=/DOEM_ZHONGJING /DBACKEND_NAME=zjsane
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "cts" (
|
||||
set OEM_DIR=cunten
|
||||
set CL=/DOEM_CANGTIAN /DBACKEND_NAME=ctssane
|
||||
goto oem
|
||||
)
|
||||
echo "Parameter 1:oem is fail"
|
||||
exit 1
|
||||
:oem
|
||||
echo %OEM%
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%CPU%" equ "x64" goto sys
|
||||
if "%CPU%" equ "x86" goto sys
|
||||
echo "Parameter 2:sys is fail"
|
||||
exit 1
|
||||
:sys
|
||||
echo %CPU%
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
set TMP_PATH=%TMP_PATH%\%OEM_DIR%\Release
|
||||
set BIN_PATH=%BIN_PATH%\OEM\%OEM_DIR%
|
||||
set LIB_PATH=%LIB_PATH%\OEM\%OEM_DIR%
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
echo oem=%OEM%
|
||||
echo cpu=%CPU%
|
||||
echo pe-path=%BIN_PATH%
|
||||
echo lib-path=%LIB_PATH%
|
||||
echo tmp-path=%TMP_PATH%
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%VSCMD_VER%" neq "" goto compile
|
||||
set dev=""
|
||||
for /f "tokens=1,2,* " %%i in ('reg QUERY "HKEY_CLASSES_ROOT\CLSID\{2E1517DA-87BF-4443-984A-D2BF18F5A908}\LocalServer32" /ve') do set dev=%%k
|
||||
echo dev=%dev%
|
||||
|
||||
if %dev% == "" (
|
||||
echo "Can not find Visual-Studio installing path"
|
||||
goto end
|
||||
)
|
||||
:env
|
||||
call %dev%\..\..\..\vc\auxiliary\build\vcvars64.bat
|
||||
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
:compile
|
||||
|
||||
"%~dp0\sln\release\hgsetver.exe" "%~dp0\..\sdk\include\huagao\brand.h" -oem %OEM% -cpu %CPU% -nov
|
||||
|
||||
mkdir %LIB_PATH%
|
||||
|
||||
MSBuild.exe "%~dp0\lang\lang.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\lang\ /p:OutDir=%BIN_PATH%\
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
call :move_libs %BIN_PATH% lang %LIB_PATH%
|
||||
MSBuild.exe "%~dp0\device\scanner.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\scanner\ /p:OutDir=%BIN_PATH%\
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
call :move_libs %BIN_PATH% scanner %LIB_PATH%
|
||||
MSBuild.exe "%~dp0\sane\sane.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\sane\ /p:OutDir=%BIN_PATH%\
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
call :move_libs %BIN_PATH% sane %LIB_PATH%
|
||||
goto end
|
||||
|
||||
REM move_libs src_dir src_name dst_dir
|
||||
|
||||
:move_libs
|
||||
move /Y "%1\%2.exp" "%3"
|
||||
move /Y "%1\%2.lib" "%3"
|
||||
move /Y "%1\%2.pdb" "%3"
|
||||
EXIT /B 0
|
||||
|
||||
:end
|
|
@ -0,0 +1,115 @@
|
|||
@echo off
|
||||
echo "Parameter 1:hg | lsc| hw | zj | cts"
|
||||
echo "Parameter 2:x86 | x64 "
|
||||
echo "Parameter 3: 100 | 200 ... "
|
||||
|
||||
set OEM=%1
|
||||
set CPU=%2
|
||||
set PID=%3
|
||||
set OEM_DIR=""
|
||||
set NAME=twain%3.ds
|
||||
set TMP_PATH=%~dp0..\tmp\%CPU%
|
||||
set BIN_PATH=%~dp0..\release\win\%CPU%
|
||||
set LIB_PATH=%~dp0..\sdk\lib\win\%CPU%
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%OEM%" equ "hg" (
|
||||
set OEM_DIR=huagao
|
||||
set CL=/DOEM_HUAGAO /DPRODUCT_ID=%PID%
|
||||
set NAME=huagao%NAME%
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "hw" (
|
||||
set OEM_DIR=hanvon
|
||||
set CL=/DOEM_HANWANG /DPRODUCT_ID=%PID%
|
||||
set NAME=hanvon%NAME%
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "lsc" (
|
||||
set OEM_DIR=lanxum
|
||||
set CL=/DOEM_LISICHENG /DPRODUCT_ID=%PID%
|
||||
set NAME=lanxum%NAME%
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "zj" (
|
||||
set OEM_DIR=zhongj
|
||||
set CL=/DOEM_ZHONGJING /DPRODUCT_ID=%PID%
|
||||
set NAME=microtek%NAME%
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "cts" (
|
||||
set OEM_DIR=cunten
|
||||
set CL=/DOEM_CANGTIAN /DPRODUCT_ID=%PID%
|
||||
set NAME=cumtenn%NAME%
|
||||
goto oem
|
||||
)
|
||||
echo "Parameter 1:oem is fail"
|
||||
exit 1
|
||||
:oem
|
||||
echo %OEM%
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%CPU%" equ "x64" goto sys
|
||||
if "%CPU%" equ "x86" goto sys
|
||||
echo "Parameter 2:sys is fail"
|
||||
exit 1
|
||||
:sys
|
||||
echo %CPU%
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%PID%" equ "" (
|
||||
echo "Lost PID parameter"
|
||||
exit 1
|
||||
)
|
||||
|
||||
set TMP_PATH=%TMP_PATH%\%OEM_DIR%\Release
|
||||
set BIN_PATH=%BIN_PATH%\OEM\%OEM_DIR%
|
||||
set LIB_PATH=%LIB_PATH%\OEM\%OEM_DIR%
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
echo oem=%OEM%
|
||||
echo cpu=%CPU%
|
||||
echo pe-path=%BIN_PATH%
|
||||
echo lib-path=%LIB_PATH%
|
||||
echo tmp-path=%TMP_PATH%
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if "%VSCMD_VER%" neq "" goto compile
|
||||
set dev=""
|
||||
for /f "tokens=1,2,* " %%i in ('reg QUERY "HKEY_CLASSES_ROOT\CLSID\{2E1517DA-87BF-4443-984A-D2BF18F5A908}\LocalServer32" /ve') do set dev=%%k
|
||||
echo dev=%dev%
|
||||
|
||||
if %dev% == "" (
|
||||
echo "Can not find Visual-Studio installing path"
|
||||
goto end
|
||||
)
|
||||
:env
|
||||
call %dev%\..\..\..\vc\auxiliary\build\vcvars64.bat
|
||||
|
||||
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
:compile
|
||||
|
||||
mkdir %LIB_PATH%
|
||||
|
||||
echo delete %TMP_PATH%\twain\huagaods.obj ...
|
||||
del "%TMP_PATH%\twain\*.obj" /q /f
|
||||
MSBuild.exe "%~dp0\twain\twain.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\twain\ /p:OutDir=%BIN_PATH% /p:TargetName=%NAME%
|
||||
if %ERRORLEVEL% neq 0 goto end
|
||||
move /Y "%BIN_PATH%\%NAME%.dll" "%BIN_PATH%\%NAME%"
|
||||
call :move_libs %BIN_PATH% %NAME% %LIB_PATH%
|
||||
goto end
|
||||
|
||||
REM move_libs src_dir src_name dst_dir
|
||||
|
||||
:move_libs
|
||||
move /Y "%1\%2.exp" "%3"
|
||||
move /Y "%1\%2.lib" "%3"
|
||||
move /Y "%1\%2.pdb" "%3"
|
||||
EXIT /B 0
|
||||
|
||||
:end
|
|
@ -73,36 +73,36 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)..\..\code_device\hgdriver\3rdparty\nick;$(SolutionDir)..\..\sdk\include\opencv\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\cyusb\inc\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\libtiff\include\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\log4cplus\include\;$(SolutionDir)..\..\code_device\sdk\;$(SolutionDir)..\..\code_device\hgdriver\ImageProcess\;$(SolutionDir)..\..\sdk\include\;$(SolutionDir)..\..\code_device\hgdriver\hgdev\;$(SolutionDir)..\..\code_device\hgdriver\wrapper\;$(ProjectDir);$(SolutionDir)..\..\code_device\hgdriver\3rdparty\tiff\include\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\openssl\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LibraryPath>$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\oem\huagao;$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)..\..\code_device\hgdriver\3rdparty\nick;$(SolutionDir)..\..\sdk\include\opencv\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\cyusb\inc\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\libtiff\include\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\log4cplus\include\;$(SolutionDir)..\..\code_device\sdk\;$(SolutionDir)..\..\code_device\hgdriver\ImageProcess\;$(SolutionDir)..\..\sdk\include\;$(SolutionDir)..\..\code_device\hgdriver\hgdev\;$(SolutionDir)..\..\code_device\hgdriver\wrapper\;$(ProjectDir);$(SolutionDir)..\..\code_device\hgdriver\3rdparty\tiff\include\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\openssl\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LibraryPath>$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\oem\huagao;$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IncludePath>$(SolutionDir)..\..\code_device\hgdriver\3rdparty\nick;$(SolutionDir)..\..\sdk\include\opencv\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\cyusb\inc\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\libtiff\include\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\log4cplus\include\;$(SolutionDir)..\..\code_device\sdk\;$(SolutionDir)..\..\code_device\hgdriver\ImageProcess\;$(SolutionDir)..\..\sdk\include\;$(SolutionDir)..\..\code_device\hgdriver\hgdev\;$(SolutionDir)..\..\code_device\hgdriver\wrapper\;$(ProjectDir);$(SolutionDir)..\..\code_device\hgdriver\3rdparty\tiff\include\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\openssl\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath>$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\oem\huagao;$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IncludePath>$(SolutionDir)..\..\code_device\hgdriver\3rdparty\nick;$(SolutionDir)..\..\sdk\include\opencv\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\cyusb\inc\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\libtiff\include\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\log4cplus\include\;$(SolutionDir)..\..\code_device\sdk\;$(SolutionDir)..\..\code_device\hgdriver\ImageProcess\;$(SolutionDir)..\..\sdk\include\;$(SolutionDir)..\..\code_device\hgdriver\hgdev\;$(SolutionDir)..\..\code_device\hgdriver\wrapper\;$(ProjectDir);$(SolutionDir)..\..\code_device\hgdriver\3rdparty\tiff\include\;$(SolutionDir)..\..\code_device\hgdriver\3rdparty\openssl\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath>$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\oem\huagao;$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;HGSCANNER_EXPORT;CUSTOM_USBVIEW;OEM_NONE;_DIRECT_BUILD;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HGSCANNER_EXPORT;CUSTOM_USBVIEW;_DIRECT_BUILD;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -118,15 +118,8 @@
|
|||
</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir %FINAL_DIR%
|
||||
copy "$(TargetPath)" "$(SolutionDir)..\..\release\win\$(PlatformTarget)\$(Configuration)"
|
||||
copy "$(TargetPath)" C:\Program Files\HuaGoScan /y
|
||||
copy "$(TargetPath)" F:\boxroom\HuaGoScan /y
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -135,13 +128,11 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;HGSCANNER_EXPORT;CUSTOM_USBVIEW;OEM_NONE;_DIRECT_BUILD;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HGSCANNER_EXPORT;CUSTOM_USBVIEW;_DIRECT_BUILD;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>
|
||||
</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -156,19 +147,15 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir %FINAL_DIR%
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HGSCANNER_EXPORT;CUSTOM_USBVIEW;OEM_NONE;_DIRECT_BUILD;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HGSCANNER_EXPORT;CUSTOM_USBVIEW;_DIRECT_BUILD;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>4996;</DisableSpecificWarnings>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -182,14 +169,8 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<ModuleDefinitionFile>$(ProjectDir)device.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir %FINAL_DIR%
|
||||
copy "$(TargetPath)" "$(SolutionDir)..\..\release\win\$(PlatformTarget)\$(Configuration)"
|
||||
copy "$(TargetPath)" "C:\Program Files\HuaGoScan"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -198,7 +179,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HGSCANNER_EXPORT;CUSTOM_USBVIEW;OEM_NONE;NDEBUG;_CONSOLE;_DIRECT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HGSCANNER_EXPORT;CUSTOM_USBVIEW;NDEBUG;_CONSOLE;_DIRECT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>4996;</DisableSpecificWarnings>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
@ -215,11 +196,8 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<ModuleDefinitionFile>$(ProjectDir)device.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir %FINAL_DIR%
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -71,23 +71,23 @@
|
|||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\lang</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\lang\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\lang</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\lang\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
|
@ -106,14 +106,8 @@
|
|||
<ModuleDefinitionFile>lang.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)
|
||||
mkdir %FINAL_DIR%
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
|
||||
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -137,19 +131,9 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<ModuleDefinitionFile>lang.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)
|
||||
set FINAL_LANGDIR=$(SolutionDir)..\..\release\win\$(PlatformTarget)\Release
|
||||
mkdir %FINAL_DIR%
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
copy $(OutDir)$(TargetName)$(TargetExt) "%FINAL_LANGDIR%" /y
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
|
@ -167,13 +151,8 @@ copy $(OutDir)$(TargetName)$(TargetExt) "%FINAL_LANGDIR%" /y
|
|||
<ModuleDefinitionFile>lang.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)
|
||||
mkdir %FINAL_DIR%
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -197,22 +176,9 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<ModuleDefinitionFile>lang.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)
|
||||
set FINAL_LANGDIR=$(SolutionDir)..\..\release\win\$(PlatformTarget)\Release
|
||||
mkdir %FINAL_DIR%
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
copy $(OutDir)$(TargetName)$(TargetExt) "%FINAL_LANGDIR%" /y
|
||||
|
||||
|
||||
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\code_lang\base_pak.h" />
|
||||
|
|
|
@ -74,36 +74,36 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include;$(SolutionDir)..\..\code_device\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\OEM\huagao;$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LibraryPath>$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\oem\huagao;$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include;$(SolutionDir)..\..\code_device\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\OEM\huagao;$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LibraryPath>$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\oem\huagao;$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include;$(SolutionDir)..\..\code_device\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\OEM\huagao;$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath>$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\oem\huagao;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include;$(SolutionDir)..\..\code_device\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\OEM\huagao;$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath>$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(ProjectDir)..\..\sdk\lib\win\$(PlatformTarget)\oem\huagao;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>BACKEND_NAME=hgsane;TWPP_IS_DS;EXPORT_SANE_API;WIN32;OEM_NONE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>TWPP_IS_DS;EXPORT_SANE_API;WIN32;OEM_NONE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
|
@ -118,14 +118,8 @@
|
|||
</AdditionalManifestDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir %FINAL_DIR%
|
||||
copy "$(TargetPath)" "$(SolutionDir)..\..\release\win\$(PlatformTarget)\$(Configuration)"
|
||||
copy "$(TargetPath)" F:\boxroom\HuaGoScan /y
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -134,7 +128,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>BACKEND_NAME=hgsane;TWPP_IS_DS;EXPORT_SANE_API;WIN32;OEM_NONE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>TWPP_IS_DS;EXPORT_SANE_API;WIN32;OEM_NONE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
|
@ -150,19 +144,15 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir %FINAL_DIR%
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);BACKEND_NAME=hgsane;TWPP_IS_DS;EXPORT_SANE_API;OEM_NONE</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);TWPP_IS_DS;EXPORT_SANE_API;OEM_NONE</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -174,13 +164,8 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<ModuleDefinitionFile>$(ProjectDir)sane.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir %FINAL_DIR%
|
||||
copy "$(TargetPath)" "$(SolutionDir)..\..\release\win\$(PlatformTarget)\$(Configuration)"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -189,7 +174,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions);BACKEND_NAME=hgsane;TWPP_IS_DS;EXPORT_SANE_API;OEM_NONE</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions);TWPP_IS_DS;EXPORT_SANE_API;OEM_NONE</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
@ -204,12 +189,8 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
|||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir %FINAL_DIR%
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
|
||||
</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
Binary file not shown.
|
@ -428,11 +428,11 @@ namespace rc
|
|||
if (bgn)
|
||||
str.erase(0, bgn);
|
||||
}
|
||||
static bool get_version_from_file(const wchar_t* file, int* v1, int* v2, int* v3, int* v4, std::wstring* company_name, std::wstring* short_company_name, std::wstring* vendor_name)
|
||||
static bool get_version_from_file(const wchar_t* file, oem o, int* v1, int* v2, int* v3, int* v4, std::wstring* company_name, std::wstring* short_company_name, std::wstring* vendor_name)
|
||||
{
|
||||
std::wstring cont(load_file(file, NULL)), line(L""), tag(L"#define VERSION_MAIN");
|
||||
int end = -1, bgn = -1;
|
||||
oem o = OEM_NONE;
|
||||
// oem o = OEM_NONE;
|
||||
|
||||
if (v1)
|
||||
{
|
||||
|
@ -489,22 +489,22 @@ namespace rc
|
|||
*v4 = _wtoi(cont.c_str() + bgn);
|
||||
}
|
||||
|
||||
tag = L"#define OEM_";
|
||||
{
|
||||
bgn = find_line(cont, tag.c_str(), &end);
|
||||
if (bgn < 0)
|
||||
return false;
|
||||
|
||||
line = cont.substr(bgn, end - bgn);
|
||||
if (line.find(oem_str(OEM_HANWANG)) != std::wstring::npos)
|
||||
o = OEM_HANWANG;
|
||||
else if (line.find(oem_str(OEM_LISICHENG)) != std::wstring::npos)
|
||||
o = OEM_LISICHENG;
|
||||
else if (line.find(oem_str(OEM_CANGTIAN)) != std::wstring::npos)
|
||||
o = OEM_CANGTIAN;
|
||||
else if (line.find(oem_str(OEM_ZHONGJING)) != std::wstring::npos)
|
||||
o = OEM_ZHONGJING;
|
||||
}
|
||||
//tag = L"#define OEM_";
|
||||
//{
|
||||
// bgn = find_line(cont, tag.c_str(), &end);
|
||||
// if (bgn < 0)
|
||||
// return false;
|
||||
//
|
||||
// line = cont.substr(bgn, end - bgn);
|
||||
// if (line.find(oem_str(OEM_HANWANG)) != std::wstring::npos)
|
||||
// o = OEM_HANWANG;
|
||||
// else if (line.find(oem_str(OEM_LISICHENG)) != std::wstring::npos)
|
||||
// o = OEM_LISICHENG;
|
||||
// else if (line.find(oem_str(OEM_CANGTIAN)) != std::wstring::npos)
|
||||
// o = OEM_CANGTIAN;
|
||||
// else if (line.find(oem_str(OEM_ZHONGJING)) != std::wstring::npos)
|
||||
// o = OEM_ZHONGJING;
|
||||
//}
|
||||
|
||||
bool found = false, is_oem = false;
|
||||
std::vector<bool> embed;
|
||||
|
@ -1022,9 +1022,13 @@ namespace rc
|
|||
if (cont.find(prev) == std::wstring::npos)
|
||||
{
|
||||
prev = L"_ctssane_";
|
||||
if (cont.find(prev) == std::wstring::npos)
|
||||
{
|
||||
prev = L"_zjsane_";
|
||||
if (cont.find(prev) == std::wstring::npos)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1218,7 +1222,8 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
|
|||
patch *= 1000;
|
||||
patch += cur->tm_yday + 1;
|
||||
|
||||
while (change_oem(unic, vendor))
|
||||
//while (change_oem(unic, vendor))
|
||||
do
|
||||
{
|
||||
if (!nov)
|
||||
{
|
||||
|
@ -1235,8 +1240,8 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
|
|||
break;
|
||||
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
// break;
|
||||
} while (0);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
@ -1262,14 +1267,14 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
|
|||
base += L"\\..\\..\\..\\code_twain\\twain";
|
||||
STR_TO_ABSOLUTE_PATH(base);
|
||||
wprintf_s(L"aaaa=%s\r\n", file);
|
||||
if (rc::get_version_from_file(file, &main, &sub, &build, &patch, &cn, &scn, &vs))
|
||||
if (rc::get_version_from_file(file, vendor, &main, &sub, &build, &patch, &cn, &scn, &vs))
|
||||
{
|
||||
if (!twain_only)
|
||||
{
|
||||
rcf = base + L"\\..\\sane\\sane.vcxproj";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
if (!rc::change_vcxproj_predefine(rcf.c_str(), vendor))
|
||||
std::wcout << "change predefines failed: " << rcf.c_str() << std::endl;
|
||||
//rcf = base + L"\\..\\sane\\sane.vcxproj";
|
||||
//STR_SIMPLIFY_PATH(rcf);
|
||||
//if (!rc::change_vcxproj_predefine(rcf.c_str(), vendor))
|
||||
// std::wcout << "change predefines failed: " << rcf.c_str() << std::endl;
|
||||
|
||||
rcf = base + L"\\..\\sane\\sane.rc";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
|
@ -1281,10 +1286,10 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
|
|||
if (!rc::change_file(rcf.c_str(), ¶m, rc::change_sane_def))
|
||||
std::wcout << "change exporting-definition failed: " << rcf.c_str() << std::endl;
|
||||
|
||||
rcf = base + L"\\..\\device\\scanner.vcxproj";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
if (!rc::change_vcxproj_predefine(rcf.c_str(), vendor))
|
||||
std::wcout << "change predefines failed: " << rcf.c_str() << std::endl;
|
||||
//rcf = base + L"\\..\\device\\scanner.vcxproj";
|
||||
//STR_SIMPLIFY_PATH(rcf);
|
||||
//if (!rc::change_vcxproj_predefine(rcf.c_str(), vendor))
|
||||
// std::wcout << "change predefines failed: " << rcf.c_str() << std::endl;
|
||||
|
||||
rcf = base + L"\\..\\device\\scanner.rc";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
|
@ -1297,14 +1302,14 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
|
|||
std::wcout << "change exporting-definition failed: " << rcf.c_str() << std::endl;*/
|
||||
}
|
||||
|
||||
rcf = base + L"\\..\\twain\\twain.vcxproj";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
param.change_out_dir = !twain_only;
|
||||
if (!rc::change_file(rcf.c_str(), ¶m, rc::change_output))
|
||||
{
|
||||
std::wcout << "change exporting-definition failed: " << rcf.c_str() << std::endl;
|
||||
ret = false;
|
||||
}
|
||||
//rcf = base + L"\\..\\twain\\twain.vcxproj";
|
||||
//STR_SIMPLIFY_PATH(rcf);
|
||||
//param.change_out_dir = !twain_only;
|
||||
//if (!rc::change_file(rcf.c_str(), ¶m, rc::change_output))
|
||||
//{
|
||||
// std::wcout << "change exporting-definition failed: " << rcf.c_str() << std::endl;
|
||||
// ret = false;
|
||||
//}
|
||||
|
||||
rcf = base + L"\\..\\..\\code_device\\build.sh";
|
||||
STR_SIMPLIFY_PATH(rcf);
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include\;$(IncludePath)</IncludePath>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<TargetName>huagaotwain400.ds</TargetName>
|
||||
</PropertyGroup>
|
||||
|
@ -86,13 +86,13 @@
|
|||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include\;$(IncludePath)</IncludePath>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include\;$(IncludePath)</IncludePath>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<TargetName>huagaotwain400.ds</TargetName>
|
||||
</PropertyGroup>
|
||||
|
@ -102,7 +102,7 @@
|
|||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)..\..\sdk\include\;$(IncludePath)</IncludePath>
|
||||
<OutDir>$(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
<IntDir>$(SolutionDir)..\..\tmp\$(PlatformTarget)\huagao\$(Configuration)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -123,13 +123,8 @@
|
|||
</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).pdb" "%FINAL_DIR%"
|
||||
move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"
|
||||
copy "$(OutDirFullPath)$(TargetName)" "$(WinDir)\twain_32\HuaGoTwain\x86" /y</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
|
@ -152,13 +147,8 @@ copy "$(OutDirFullPath)$(TargetName)" "$(WinDir)\twain_32\HuaGoTwain\x86" /y</Co
|
|||
</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).pdb" "%FINAL_DIR%"
|
||||
move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"
|
||||
copy "$(OutDirFullPath)$(TargetName)" "$(WinDir)\twain_32\HuaGoScan" /y</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -183,12 +173,8 @@ copy "$(OutDirFullPath)$(TargetName)" "$(WinDir)\twain_32\HuaGoScan" /y</Command
|
|||
</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).pdb" "%FINAL_DIR%"
|
||||
move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -214,12 +200,8 @@ move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"</Command>
|
|||
</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
|
||||
mkdir "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).exp" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).lib" "%FINAL_DIR%"
|
||||
move /Y "$(OutDirFullPath)$(TargetName).pdb" "%FINAL_DIR%"
|
||||
move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"</Command>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue