Customizing CCS Installation

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search


  • Image:Google-16x16.png Search for an article here:


Contents

Overview

This topic will show how you can add your own supplemental installers to the CCS installation and have them be automatically installed.  This capability is most commonly used by people creating development bundles that include CCS.  By using this feature you can have CCS automatically install additional examples, documentation, drivers... that are needed for the development kit.

Customizing CCS Installation supports both Windows and Linux platforms. It provides two ways to launch supplemental installers.

CCSv4 Compatible Installer

If you have InstallJemmer installer that compatible with TI Code Composer Studio version 4 component installers with .exe or .bin extension, CCS will pass /y and /prefix options and install destinations base directory to supplemental installers. User will get prompt to choose detailed install destination for each of CCSv4 Compatible Installers. This is something that is really only used by a few closely integrated TI 3rd party partners.

Any executable Installer

All you need is write good batch file with .bat or .sh extension. CCS will pass all possible install parameters to batch files. The batch file should only pass required parameters to supplemental installers.

The possible install parameters include

@EXTRASDIR@ is <InstallSource>/extras/ batch file location.

@INSTALLDIR@ is install base location. e.g. C:\Program Files\Texas Instruments\ccsv4.  This parameter is mandatory

@UPDATENAME@ is designed for update. It is the value passed to /updatename This parameter is for updates only

@ISACMDOPTIONS@ is some of ISA command options in /nodoc /noc2400 /noc2800 /noc5400 /noc5500 /noc6000 /noarm /npomap /nousb /nopp /npomap /nodavinci for components support these options.  This parameter is optional

Install Source Requirement

Customizing CCS Installation requires storing all supplemental installers in extras folder or its subfolders. The extras folder should be created in the same level of CCS installer and install_images folder.

For CCSv4 Compatible Installers please store them just in top level of extras folder. For example, IJcompatible-installer1.exe andIJcompatible-installer2.bin

For Any executable Installers please store them in subfolder of extras, and store batch files in top level of extras folder. For example, sub1/installer1.exe, sub2/installer2.bin, run1.bat and run2.sh

Note: if a supplemental installer requires batch file to launch installation, please DO NOT store this supplemental installer in top level of extras folder. If you have a non-executable supplemental installer such as zip file, you can store it in any level of extras folder.

Structure of extras folder

| setup_CCS_4.n.n.nnnnn.exe
|
+---extras
|     |     run1.bat
|     |     run2.sh
|     |     IJcompatible-installer1.exe
|     |     IJcompatible-installer2.bin
|     |     run1.bat.bak1
|     |     run2.sh.bak1
|     |     template.bat_
|     |
|     +---sub1
|     |     installer1.exe
|     \---sub2
|           installer2.bin

|
\---install_images
|     package.properties
|     README_FIRST.txt
+---bios
+---ccscore
+---cgt
+---emulation
+---jre
+---msp430
+---msvc
+---simulation
+---xdais
\---xdctools

Write Batch Files

CCS Installer will generate batch file template with name template. {bat_sh_if} extras folder being detected.

If the extras folder is writable, the original batch file will be backed up with extension .bakn before CCS installer replaces parameters in batch file. For example, backup run{12}.{bat|sh} to run{12}.{bat|sh}.bak1

CCS Installer will copy extras folder to local %TEMP% folder if read-only attribute of extras folder being detected.

Note: please do not set extras folder and files read-only except you use read-only media, CD, DVD, storing CCS installer and supplemental installers.

If the extras copy is created at local %TEMP%, it will be removed after customizing installation completed.

The %TEMP% location

For Windows, it should be C:\Documents and Settings\{userid}\Local Settings\Temp\ijtmp_{run time registry}

For Linux, it should be /usr/tmp/ijtmp_{run time registry}

Sample Customizing CCS Installation Commands

When CCS installer detects extras folder, it will generate a batch template in extras original folder or local temp copy extras folder. For Windows it would be template.bat_. For Linux it would be template.sh_.

Windows batch template template.bat_

REM main installer will pass the following arguments to component installer
REM EXTRASDIR is {InstallSource}/extras/ batch file location. It would be copied to {Temp}/extras/ for modification purpose during run time. The temp folder will be removed in the end of install.  mandatory
REM INSTDIR is install base location. e.g. C:\Program Files\Texas Instruments\ccsv4. mandatory
REM ISACMD is some of ISA command options in /nodoc /noc2400 /noc2800 /noc5400 /noc5500 /noc6000 /noarm /npomap /nousb /nopp /npomap /nodavinci for components support these options. optional
REM UpdateName is designed for update. It is the value passed to /updatename option.  for update only

REM set EXTRASDIR="@EXTRASDIR@"
REM set INSTDIR="@INSTALLDIR@"
REM set UPDATENAME="@UPDATENAME@"

REM Please put your batch file(s), *.bat/*.sh, under {your unzipped CCS folder}\extras\, and put your installer(s), *.exe/*.bin in its subfolder. e.g. extras\sub1
REM Please specify the subfolder under %INSTDIR% if needed

REM if installer supports ISA, please use the following block. Main installer will pass ISACMD to batch file.
REM set ISACMD="@ISACMDOPTIONS@"

set d=%9

SHIFT /8
set a=%9

SHIFT /8
set b=%9

SHIFT /8
set c=%9

set ISALOG="%EXTRASDIR%\ISA.log"
TIME /T  >> %ISALOG%
@echo ISACMD=%ISACMD%  >> %ISALOG%
@echo ISA=%1  %2 %3 %4 %5 %6 %7 %8 %d% %a% %b% %c%  >> %ISALOG%

%EXTRASDIR%\sub1\installer1.exe /y /prefix "%INSTDIR%/{some where}" %1  %2 %3 %4 %5 %6 %7 %8 %d% %a% %b% %c%

REM if installer does not support ISA use one of commands below.
REM standard mode install
%EXTRASDIR%\sub1\installer1.exe /y /prefix "%INSTDIR%/{some where}"

REM debug mode install
%EXTRASDIR%\sub1\installer1.exe /debugconsole /prefix "%INSTDIR%/{some where}"

REM update install
%EXTRASDIR%\sub1\installer1.exe /mode default /updatename "%UPDATENAME%" /prefix "%INSTDIR%/{some where}"

Linux batch template template.sh_

#!/bin/sh
# set -x
# main installer will pass the following arguments to component installer
# EXTRASDIR is {InstallSource}/extras/ batch file location. It would be copied to {Temp}/extras/ for modification purpose during run time. The temp folder will be removed in the end of install mandatory
# INSTDIR is install base location. e.g. C:\Program Files\Texas Instruments\ccsv4 mandatory
# ISACMD is some of ISA command options in /nodoc /noc2400 /noc2800 /noc5400 /noc5500 /noc6000 /noarm /npomap /nousb /nopp /npomap /nodavinci for components support these options optional
# UpdateName is designed for update. It is the value passed to /updatename option. for update only

#EXTRASDIR="@EXTRASDIR@"
#INSTDIR="@INSTALLDIR@"
#ISACMD="@ISACMDOPTIONS@"
#UPDATENAME="@UPDATENAME@"

# Please put your batch file(s), *.bat/*.sh, under {your unzipped CCS folder}\extras\, and put your installer(s), *.exe/*.bin in its subfolder. e.g. extras\sub1
# Please specify the subfolder under %INSTDIR% if needed

# if installer does not support ISA use one of commands below.
# standard mode install
${EXTRASDIR}/sub2/installer2.bin /y /prefix "${INSTDIR}/{some where}"

# console mode install
${EXTRASDIR}/sub2/installer2.bin /mode console /prefix "${INSTDIR}/{some where}"

# debug mode install
${EXTRASDIR}/sub2/installer2.bin /debugconsole /prefix "${INSTDIR}/{some where}"/inst-extra/

# update install. (NOT SUPPORT YET)
## ${EXTRASDIR}/sub2/installer2.bin /mode default /updatename "${UPDATENAME}" /prefix "${INSTDIR}/{some where}"

# if installer supports ISA, please pass ISACMD to batch file. Both commands below work!
${EXTRASDIR}/sub2/installer2.bin /y /prefix "${INSTDIR}/{some where}" $@

${EXTRASDIR}/sub2/installer2.bin /y /prefix "${INSTDIR}/{some where}" $ISACMD

Note: User must specify installation location "${INSTDIR}/{some where}". If a supplement installer does not need to install to CCS base location, then ${INSTDIR} will not be needed.

The batch file template is just a reference. Users have full flexibility to write their own batches and run the customizing installations more than the reference provided.

For example, the following command can install a tar file to specified location on Linux.

tar -xvzf "$EXTRASDIR"/installer.tar.gz -C "${INSTDIR}/{some where}"

Trying Customizing CCS Installation

Customizing CCS installation will automatically start after all CCS install actions complete and before you see Finish pane.

CCSv4 Compatible Installer

For InstallJemmer installer that compatible with TI Code Composer Studio version 4 component installers with .exe or .bin extension, CCS will pass /y and /prefix options and install destinations base directory to supplemental installers. User will get prompt to choose detailed install destination for each of CCSv4 Compatible Installers.

After choosing installation location, user will see an information message box.

Note: It has no installation location prompt and the message box if user runs CCS installation in non-standard mode.

Any executable Installer

For Any executable Installers user will see an information message box for each batch file under extras folder.

If extras folder is writable

If extras folder is copied to local %Temp% due to read-only attribute

At this point you can take a look extras\ copy under %Temp% folder. After customizing installation completed, the extras under %Temp% will be removed. You have no chance to see template or revised batch file.

After customizing installation completed, user will see CCS Finish pane.

Note: User can run CCS installation in non-standard mode with batch for supplemental installers. But user would not see any message box, or GUI.

Change History

1. Removed "Extras Installation" message box for each batch or executable.

2. CCS main installer has set parameters as environment variables.  Users do not need set @xxx@ tokens in initial batch file.  Users can use parameters directly in batch file.  Since batch files would not need to be update for @xxx@ tokens, CCS main installer will not backup user batch file any more.


For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Customizing CCS Installation here.
Leave a Comment
Personal tools