您的位置:首页 > 产品设计 > UI/UE

How to build a product with InstallShield

2014-05-26 09:57 337 查看
How to build a product with InstallShield:

put all build script in same folder. Example: "buildscript".

1 use a script runmeToBuild.bat as top script:


@echo off

REM set RUNDIR=D:\AutoBuild\buildscript
set RUNDIR=%cd%

call %RUNDIR%\compile_product.bat
call %RUNDIR%\copyfiles.bat
call %RUNDIR%\callbuild.bat

pause 


2 other scripts:

compile_product.bat

@echo off
echo "***  date 2012-7-19     ***"
echo "***  author Zhen Zhang  ***"
echo "***  version 2012.1.0   ***"
REM make sure cmake.exe is available. By default you can find it under "C:\Program Files\CMake 2.8\bin\cmake.exe"
REM make sure msbuild.exe is available. By default you can find it under "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" 

REM get current director path
set CUR_DIR=%cd%
del %CUR_DIR%\build_install.log /Q

echo "   ***  compile for product   ***  " 
echo "   ***  build for product   ***  "                                                                   >> %CUR_DIR%\build_install.log
    echo "run CMake for product"
    echo "run CMake for product"                                                                           >> %CUR_DIR%\build_install.log
        pushd %CUR_DIR%\build\product                                                                      >> %CUR_DIR%\build_install.log
        svn update                                                                                        >> %CUR_DIR%\build_install.log
        rd  %CUR_DIR%\binaries\product    /S /Q
        mkdir %CUR_DIR%\binaries\product
        pushd %CUR_DIR%\binaries\product
       
        cmake.exe   -G    "Visual Studio 10"   %CUR_DIR%\build\product                                     >> %CUR_DIR%\build_install.log
        
        echo "run msbuild for product"
        echo "run msbuild for product"                                                                      >> %CUR_DIR%\build_install.log
        msbuild.exe  %CUR_DIR%\binaries\product\INSTALL.vcxproj /p:configuration=release /p:Platform=Win32  >> %CUR_DIR%\build_install.log
echo "   ***  finish compile for product   ***  "
echo "   ***  finish compile for product   ***  "                                                             >> %CUR_DIR%\build_install.log

REM if you have many products, compile them one by one

pushd %CUR_DIR%  


copyfiles.bat

@echo off

set CURRENTDIR=%cd%
set DES_PATH=D:\AutoBuild\Source

del %CURRENTDIR%\copyfiles.log /Q
echo "   ***  start copy PRODUCT files   ***  " 
echo "   ***  start copy PRODUCT files   ***  "                                                                   >> %CUR_DIR%\copyfiles.log
    
rd %DES_PATH%\PRO_NAME_V2012    /S /Q
md %DES_PATH%\PRO_NAME_V2012
xcopy  %CURRENTDIR%\binaries\product   %DES_PATH%\PRO_NAME_V2012\      /E                   <span style="white-space:pre">						</span>>> %CUR_DIR%\copyfiles.log
echo "   ***  finish copy PRODUCT files   ***  "
echo "   ***  finish copy PRODUCT files   ***  "                                                                 >> %CUR_DIR%\copyfiles.log

REM if you have many products, copy source files/folders one by one 


callbuild.bat

@echo off

set BUILD_PATH=D:\AutoBuild
set AutoBuildPath=%BUILD_PATH%
del  %BUILD_PATH%\build.log
         
call %RUNDIR%\callInstallShield.bat                     
call %RUNDIR%\copyProductToShare.bat     


callInstallShield.bat

@echo on

echo begin to build Product...  >> %AutoBuildPath%\build.log
ISCmdBld.exe -p %AutoBuildPath%\projectForIS\Prod\Prod.ism -r "PRODNAME" -c COMP  -e Y  >>%AutoBuildPath%\build.log
echo finish build Product.         >> %AutoBuildPath%\build.log


copyProductToShare.bat

@echo on 
echo begin to copy PROD.exe to \\share_machine\share_path\ ...        >> %AutoBuildPath%\build.log
copy %AutoBuildPath%\releaseVersion\PROD.exe "\\share_machine\share_path\PROD.exe" /Y     >> %AutoBuildPath%\build.log
echo finish copy PROD.exe to \\share_machine\share_path\.      >> %AutoBuildPath%\build.log
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: