调整脚本,回退编译插件

This commit is contained in:
13038267101 2023-01-30 16:36:07 +08:00
parent ae18d9d81f
commit e358f73af8
3 changed files with 112 additions and 153 deletions

183
build.bat
View File

@ -1,138 +1,91 @@
echo off @echo off
echo "build.bat [hw | lsc] [ cts ] [x86 | x64] [0x100 | 0x...] [onlytwain] [nov]" echo "Parameter 1:hg | lsc| hw | zj | cts"
echo "Parameter 2:x86 | x64 "
set OEM=hg echo "Parameter 3:0x100 | 0x... "
set CPU=x86 echo "Parameter 4:0 | 1 , is 1 var++ ,is 0 var unchanged "
set PID=0x100 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 COMPILE_RANGE="none"
set NOT_INCREASE_VER="" set NOT_INCREASE_VER=""
set VAL=%1 rem -----------------------------------------------------------------------------------------------------------------------------------
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"
)
)
set VAL=%2 if "%OEM%" equ "hg" goto oem
if "%VAL%"=="onlytwain" ( if "%OEM%" equ "hw" goto oem
set COMPILE_RANGE="-only-twain" if "%OEM%" equ "lsc" goto oem
) else if "%VAL%"=="hw" ( if "%OEM%" equ "zj" goto oem
set OEM=%VAL% if "%OEM%" equ "cts" goto oem
)else if "%VAL%"=="lsc" ( echo "Parameter 1:oem is fail"
set OEM=%VAL% exit 1
) else if "%VAL%"=="cts" ( :oem
set OEM=%VAL% echo %OEM%
)else ( rem -----------------------------------------------------------------------------------------------------------------------------------
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"
)
)
set VAL=%3 if "%CPU%" equ "x64" goto sys
if "%VAL%"=="onlytwain" ( if "%CPU%" equ "x86" goto sys
set COMPILE_RANGE="-only-twain" echo "Parameter 2:sys is fail"
) else if "%VAL%"=="hw" ( exit 1
set OEM=%VAL% :sys
)else if "%VAL%"=="lsc" ( echo %CPU%
set OEM=%VAL% rem -----------------------------------------------------------------------------------------------------------------------------------
) 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"
)
)
set VAL=%4 if "%PID:~0,2%" equ "0x" goto pid
if "%VAL%"=="onlytwain" ( echo "Parameter 3:pid is fail"
set COMPILE_RANGE="-only-twain" exit 1
) else if "%VAL%"=="hw" ( :pid
set OEM=%VAL% echo %PID%
)else if "%VAL%"=="lsc" ( rem -----------------------------------------------------------------------------------------------------------------------------------
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"
)
)
set VAL=%5 if "%NOV%" equ "0" (
if "%VAL%"=="onlytwain" ( set NOT_INCREASE_VER="-nov"
set COMPILE_RANGE="-only-twain" goto nov
) 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 "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 oem=%OEM%
echo cpu=%CPU% echo cpu=%CPU%
echo pid=%PID% echo pid=%PID%
if "%COMPILE_RANGE%"=="none" ( if "%COMPILE_RANGE%"=="none" (
set 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 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% echo dev=%dev%
if "%dev%"=="" ( if "%dev%"=="" (
echo "Can not find Visual-Studio installing path" echo "Can not find Visual-Studio installing path"
goto end goto end
) )
call %dev%\..\..\..\vc\auxiliary\build\vcvars32.bat 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% "%~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" ( if %COMPILE_RANGE%=="none" (
MSBuild.exe "%~dp0\device\scanner.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\sane\sane.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
) )
MSBuild.exe "%~dp0\twain\twain.vcxproj" /p:Configuration=Release /p:Platform=%CPU% MSBuild.exe "%~dp0\twain\twain.vcxproj" /p:Configuration=Release /p:Platform=%CPU%

View File

@ -1,47 +1,53 @@
@echo off @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 hg x86 0x100 0 all
call build.bat x64 onlytwain 0x200 nov call build.bat hg x86 0x200 0 onlytwain
call build.bat x64 onlytwain 0x300 nov call build.bat hg x86 0x300 0 onlytwain
call build.bat x64 onlytwain 0x400 nov call build.bat hg x86 0x400 0 onlytwain
call build.bat hw x86 0x1000 nov call build.bat hg x64 0x100 0 all
call build.bat hw x86 onlytwain 0x1002 nov call build.bat hg x64 0x200 0 onlytwain
call build.bat hw x86 onlytwain 0x7000 nov call build.bat hg x64 0x300 0 onlytwain
call build.bat hw x86 onlytwain 0x7002 nov call build.bat hg x64 0x400 0 onlytwain
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 hw x64 0x1000 nov call build.bat hw x86 0x1000 0 all
call build.bat hw x64 onlytwain 0x1002 nov call build.bat hw x86 0x1002 0 onlytwain
call build.bat hw x64 onlytwain 0x7000 nov call build.bat hw x86 0x7000 0 onlytwain
call build.bat hw x64 onlytwain 0x7002 nov call build.bat hw x86 0x7002 0 onlytwain
call build.bat hw x64 onlytwain 0x7039 nov call build.bat hw x86 0x7039 0 onlytwain
call build.bat hw x64 onlytwain 0x8000 nov call build.bat hw x86 0x8000 0 onlytwain
call build.bat hw x64 onlytwain 0x9000 nov call build.bat hw x86 0x9000 0 onlytwain
call build.bat lsc x86 0x8420 nov call build.bat hw x64 0x1000 0 all
call build.bat lsc x86 onlytwain 0x8520 nov call build.bat hw x64 0x1002 0 onlytwain
call build.bat lsc x86 onlytwain 0x8620 nov call build.bat hw x64 0x7000 0 onlytwain
call build.bat lsc x86 onlytwain 0x8730 nov 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 x86 0x8420 0 all
call build.bat lsc x64 onlytwain 0x8520 nov call build.bat lsc x86 0x8520 0 onlytwain
call build.bat lsc x64 onlytwain 0x8620 nov call build.bat lsc x86 0x8620 0 onlytwain
call build.bat lsc x64 onlytwain 0x8730 nov call build.bat lsc x86 0x8730 0 onlytwain
call build.bat cts x86 0x6006 nov call build.bat lsc x64 0x8420 0 all
call build.bat cts x86 onlytwain 0x6005 nov call build.bat lsc x64 0x8520 0 onlytwain
call build.bat cts x86 onlytwain 0x0238 nov call build.bat lsc x64 0x8620 0 onlytwain
call build.bat cts x86 onlytwain 0x0138 nov call build.bat lsc x64 0x8730 0 onlytwain
call build.bat cts x64 0x6006 nov call build.bat cts x86 0x6006 0 all
call build.bat cts x64 onlytwain 0x6005 nov call build.bat cts x86 0x6005 0 onlytwain
call build.bat cts x64 onlytwain 0x0238 nov call build.bat cts x86 0x0238 0 onlytwain
call build.bat cts x64 onlytwain 0x0138 nov 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.