调整脚本,回退编译插件
This commit is contained in:
parent
ae18d9d81f
commit
e358f73af8
183
build.bat
183
build.bat
|
@ -1,138 +1,91 @@
|
|||
echo off
|
||||
echo "build.bat [hw | lsc] [ cts ] [x86 | x64] [0x100 | 0x...] [onlytwain] [nov]"
|
||||
|
||||
set OEM=hg
|
||||
set CPU=x86
|
||||
set PID=0x100
|
||||
@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=""
|
||||
|
||||
set VAL=%1
|
||||
if "%VAL%"=="onlytwain" (
|
||||
set COMPILE_RANGE="-only-twain"
|
||||
) else if "%VAL%"=="hw" (
|
||||
set OEM=%VAL%
|
||||
)else if "%VAL%"=="lsc" (
|
||||
set OEM=%VAL%
|
||||
)else if "%VAL%"=="cts" (
|
||||
set OEM=%VAL%
|
||||
)
|
||||
else (
|
||||
if "%VAL%"=="x64" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL%"=="x86" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL:~0,2%"=="0x" (
|
||||
set PID=%VAL%
|
||||
) else if "%VAL%"=="nov" (
|
||||
set NOT_INCREASE_VER="-nov"
|
||||
)
|
||||
)
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
set VAL=%2
|
||||
if "%VAL%"=="onlytwain" (
|
||||
set COMPILE_RANGE="-only-twain"
|
||||
) else if "%VAL%"=="hw" (
|
||||
set OEM=%VAL%
|
||||
)else if "%VAL%"=="lsc" (
|
||||
set OEM=%VAL%
|
||||
) else if "%VAL%"=="cts" (
|
||||
set OEM=%VAL%
|
||||
)else (
|
||||
if "%VAL%"=="x64" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL%"=="x86" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL:~0,2%"=="0x" (
|
||||
set PID=%VAL%
|
||||
) else if "%VAL%"=="nov" (
|
||||
set NOT_INCREASE_VER="-nov"
|
||||
)
|
||||
)
|
||||
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 -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
set VAL=%3
|
||||
if "%VAL%"=="onlytwain" (
|
||||
set COMPILE_RANGE="-only-twain"
|
||||
) else if "%VAL%"=="hw" (
|
||||
set OEM=%VAL%
|
||||
)else if "%VAL%"=="lsc" (
|
||||
set OEM=%VAL%
|
||||
) else if "%VAL%"=="cts" (
|
||||
set OEM=%VAL%
|
||||
)else (
|
||||
if "%VAL%"=="x64" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL%"=="x86" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL:~0,2%"=="0x" (
|
||||
set PID=%VAL%
|
||||
) else if "%VAL%"=="nov" (
|
||||
set NOT_INCREASE_VER="-nov"
|
||||
)
|
||||
)
|
||||
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 VAL=%4
|
||||
if "%VAL%"=="onlytwain" (
|
||||
set COMPILE_RANGE="-only-twain"
|
||||
) else if "%VAL%"=="hw" (
|
||||
set OEM=%VAL%
|
||||
)else if "%VAL%"=="lsc" (
|
||||
set OEM=%VAL%
|
||||
) else if "%VAL%"=="cts" (
|
||||
set OEM=%VAL%
|
||||
)else (
|
||||
if "%VAL%"=="x64" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL%"=="x86" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL:~0,2%"=="0x" (
|
||||
set PID=%VAL%
|
||||
) else if "%VAL%"=="nov" (
|
||||
set NOT_INCREASE_VER="-nov"
|
||||
)
|
||||
)
|
||||
if "%PID:~0,2%" equ "0x" goto pid
|
||||
echo "Parameter 3:pid is fail"
|
||||
exit 1
|
||||
:pid
|
||||
echo %PID%
|
||||
rem -----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
set VAL=%5
|
||||
if "%VAL%"=="onlytwain" (
|
||||
set COMPILE_RANGE="-only-twain"
|
||||
) else if "%VAL%"=="hw" (
|
||||
set OEM=%VAL%
|
||||
)else if "%VAL%"=="lsc" (
|
||||
set OEM=%VAL%
|
||||
) else if "%VAL%"=="cts" (
|
||||
set OEM=%VAL%
|
||||
)else (
|
||||
if "%VAL%"=="x64" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL%"=="x86" (
|
||||
set CPU=%VAL%
|
||||
) else if "%VAL:~0,2%"=="0x" (
|
||||
set PID=%VAL%
|
||||
) else if "%VAL%"=="nov" (
|
||||
set NOT_INCREASE_VER="-nov"
|
||||
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%
|
||||
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
|
||||
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\device\scanner.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
|
||||
MSBuild.exe "%~dp0\sane\sane.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%
|
||||
|
||||
|
|
|
@ -1,47 +1,53 @@
|
|||
@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 x86 0x100 nov
|
||||
call build.bat x86 onlytwain 0x200 nov
|
||||
call build.bat x86 onlytwain 0x300 nov
|
||||
call build.bat x86 onlytwain 0x400 nov
|
||||
|
||||
call build.bat x64 0x100 nov
|
||||
call build.bat x64 onlytwain 0x200 nov
|
||||
call build.bat x64 onlytwain 0x300 nov
|
||||
call build.bat x64 onlytwain 0x400 nov
|
||||
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 hw x86 0x1000 nov
|
||||
call build.bat hw x86 onlytwain 0x1002 nov
|
||||
call build.bat hw x86 onlytwain 0x7000 nov
|
||||
call build.bat hw x86 onlytwain 0x7002 nov
|
||||
call build.bat hw x86 onlytwain 0x7039 nov
|
||||
call build.bat hw x86 onlytwain 0x8000 nov
|
||||
call build.bat hw x86 onlytwain 0x9000 nov
|
||||
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 x64 0x1000 nov
|
||||
call build.bat hw x64 onlytwain 0x1002 nov
|
||||
call build.bat hw x64 onlytwain 0x7000 nov
|
||||
call build.bat hw x64 onlytwain 0x7002 nov
|
||||
call build.bat hw x64 onlytwain 0x7039 nov
|
||||
call build.bat hw x64 onlytwain 0x8000 nov
|
||||
call build.bat hw x64 onlytwain 0x9000 nov
|
||||
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 lsc x86 0x8420 nov
|
||||
call build.bat lsc x86 onlytwain 0x8520 nov
|
||||
call build.bat lsc x86 onlytwain 0x8620 nov
|
||||
call build.bat lsc x86 onlytwain 0x8730 nov
|
||||
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 x64 0x8420 nov
|
||||
call build.bat lsc x64 onlytwain 0x8520 nov
|
||||
call build.bat lsc x64 onlytwain 0x8620 nov
|
||||
call build.bat lsc x64 onlytwain 0x8730 nov
|
||||
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 cts x86 0x6006 nov
|
||||
call build.bat cts x86 onlytwain 0x6005 nov
|
||||
call build.bat cts x86 onlytwain 0x0238 nov
|
||||
call build.bat cts x86 onlytwain 0x0138 nov
|
||||
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 x64 0x6006 nov
|
||||
call build.bat cts x64 onlytwain 0x6005 nov
|
||||
call build.bat cts x64 onlytwain 0x0238 nov
|
||||
call build.bat cts x64 onlytwain 0x0138 nov
|
||||
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
|
Binary file not shown.
Loading…
Reference in New Issue