📄 comp_build_kit.bat
字号:
@REM $Id: COMP_BUILD_KIT.BAT 2937 2004-12-23 17:05:24Z wpc0756\Emmanuel $
@ECHO OFF
CALL COMP_SET_VARIABLES.BAT || GOTO ERROROCCURED
IF NOT EXIST "%WINZIP_CMD%" GOTO WINZIPCMD_NOT_FOUND
IF NOT EXIST "%ZIPCENTRAL%" GOTO ZIPCENTRAL_NOT_FOUND
ECHO.
ECHO ******************************************************************
ECHO.
ECHO Building Self-Installing Kit for %PROJECT%
ECHO.
ECHO $Id: COMP_BUILD_KIT.BAT 2937 2004-12-23 17:05:24Z wpc0756\Emmanuel $
ECHO ******************************************************************
ECHO.
IF EXIST Kit RMDIR /Q /S Kit
MKDIR Kit
MKDIR Kit\Dll
IF EXIST "%ZIP_FILE%" DEL /Q "%ZIP_FILE%"
IF EXIST "%ZIPEXE_FILE%" DEL /Q "%ZIPEXE_FILE%"
DEL /Q Kit\*.*
REM Check that project has been built
@FOR %%F IN (%BUILT_FILES%) DO IF NOT EXIST "Release\%%F" ECHO ERROR: project file "Release\%%F" has not been built! & GOTO ERROROCCURED
REM Files built by this VC++ project
@FOR %%F IN (%BUILT_FILES%) DO ECHO "%%F" & COPY "Release\%%F" Kit\Dll || GOTO ERROROCCURED
REM Files shipped too (part of the project - not built with it)
@FOR %%F IN (%ADD_DLL_FILES%) DO ECHO "%%F" & COPY "%%F" Kit\Dll || GOTO ERROROCCURED
REM VC++ Runtime dlls
@FOR %%F IN (%RUNTIME_DLL_FILES%) DO ECHO "%%F" & COPY "%WINDIR%\System32\%%F" Kit\Dll || GOTO ERROROCCURED
REM Data Files (readme, test, etc...)
@FOR %%F IN (%DATA_FILES%) DO ECHO "%%F" & COPY "%%F" Kit || GOTO ERROROCCURED
REM Batch Files (SETUP, UNINSTALL)
SET BATCH_PATH=%~dp0
@FOR %%F IN (%BATCH_FILES%) DO COPY "%BATCH_PATH%%%F" Kit || GOTO ERROROCCURED
COPY COMP_SET_VARIABLES.BAT Kit || GOTO ERROROCCURED
CD Kit\
IF ERRORLEVEL 1 GOTO ERROROCCURED
REM Rename batch files that will be called by interactive user (easier to read - understand)
IF EXIST COMP_SETUP.BAT RENAME COMP_SETUP.BAT SETUP.BAT
IF ERRORLEVEL 1 GOTO ERROROCCURED
IF EXIST COMP_UNINSTALL.BAT RENAME COMP_UNINSTALL.BAT UNINSTALL.BAT
IF ERRORLEVEL 1 GOTO ERROROCCURED
"%WINZIP_CMD%" -ybc -r -p "..\%ZIP_FILE%" *.*
IF ERRORLEVEL 1 GOTO ERROROCCURED
REM Check if other (standard) files are present in current directory (and not in list)
FOR %%F IN (%PROJECT%.htm %PROJECT%.html %PROJECT%.asp %PROJECT%.jpg %PROJECT%1.jpg %PROJECT%2.jpg %PROJECT%3.jpg %PROJECT%.gif Readme.txt Readme.htm Readme.html Test.htm Test.html Test.bat) DO IF EXIST ..\%%F IF NOT EXIST %%F ECHO COMP_SET_VARIABLES(8) : warning SPECIAL: file %%F is not shipped!
@ECHO.
@ECHO ***********************************************************************************
@ECHO *** Please drag and drop file %ZIP_FILE% into ZipCentral,
@ECHO ***
@ECHO *** Then convert it to a self-extracting archive (.exe) with the following options:
@ECHO ***
@ECHO *** Default extraction folder:
@ECHO *** C:\Program Files\%COMPANY_NAME%\Components\%PROJECT%
@ECHO ***
@ECHO *** Execute following command after extraction:
@ECHO *** SETUP.BAT
@ECHO ***
@ECHO ***********************************************************************************
@ECHO.
EXPLORER "..\.."
"C:\Program Files\ZipCentral\ZCENTRAL.EXE"
@REM
IF ERRORLEVEL 1 GOTO ERROROCCURED
CD ..
REM Cleanup the kit directory
DEL /Q Kit\*.*
:END
EXIT 0
:ERROROCCURED
PAUSE
EXIT 1
:WINZIPCMD_NOT_FOUND
ECHO **************************************************************************
ECHO *** ERROR: cannot find Winzip command-line add-on:
ECHO *** "%WINZIP_CMD%"
ECHO **************************************************************************
ECHO.
ECHO Please install this add-on and start again.
PAUSE
EXIT 2
:ZIPCENTRAL_NOT_FOUND
ECHO **************************************************************************
ECHO *** ERROR: cannot find ZipCentral:
ECHO *** "%ZIPCENTRAL%"
ECHO **************************************************************************
ECHO.
ECHO Please install this program and start again.
PAUSE
EXIT 3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -