diff --git a/bin/opsi-builder.sh b/bin/aio-builder.sh similarity index 100% rename from bin/opsi-builder.sh rename to bin/aio-builder.sh diff --git a/conf/opsi-builder.cfg b/conf/aio-builder.cfg similarity index 58% rename from conf/opsi-builder.cfg rename to conf/aio-builder.cfg index 8633aed..fe5a111 100644 --- a/conf/opsi-builder.cfg +++ b/conf/aio-builder.cfg @@ -1,17 +1,17 @@ ################################################### -# opsi-builder.cfg -# Default values for opsi-builder system +# aio-builder.cfg +# Default values for aio-builder system #################################################### # # Define your local, private, individual, not-project dependent build setup -# in the file ~/.opsi-builder.cfg OR by using the environment variable OPSI_BUILDER +# in the file ~/.aio-builder.cfg OR by using the environment variable AIO_BUILDER # pointing the the configuration. -# export OPSI_BUILDER=/home/dschwager/work/opsi-builder.cfg +# export AIO_BUILDER=/home/dschwager/work/aio-builder.cfg # If no files are availble, the default values will be use -# from /conf/opsi-builder.cfg +# from /conf/aio-builder.cfg # -# cp /conf/opsi-builder.cfg $HOME/.opsi-builder.cfg -# vi $HOME/.opsi-builder.cfg +# cp /conf/aio-builder.cfg $HOME/.aio-builder.cfg +# vi $HOME/.aio-builder.cfg # may you will change some locations ################################################### @@ -38,7 +38,7 @@ STATUS="integration" # STATUS_INTEGRATION_RELEASE - automatically created release number, # if STATUS is set to "integration". Valid values: anything, default value: "`date +%Y%m%d%H%M`" # Samples: -# "func:inc1" - build-in function "inc1": search the opsi-repository for the latested release and increment 1 +# "func:inc1" - build-in function "inc1": search the aio-repository for the latested release and increment 1 # "`date +%Y%m%d%H%M`" - command output, e.g. the date format YYMMDD-HHMM # "$BUILD_NUMBER" - Environment variables, jenkins https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables STATUS_INTEGRATION_RELEASE="func:inc1" @@ -53,8 +53,8 @@ CHECKSUM_AUTOCREATE=false ############################### # CREATOR ############################### -# Part of the published OPSI-package name -# Limitation: max 3 chars (beause OPSI limites REVISION to 16 chars) +# Part of the published AIO-package name +# Limitation: max 3 chars (beause AIO limites REVISION to 16 chars) CREATOR_TAG=xx # Additonal information from the person creating the packages @@ -63,57 +63,52 @@ CREATOR_EMAIL="your-email@domain.de" ################################## -# OPSI repository settings +# AIO repository settings ################################# -# Basedirectory storing OPSI-packages after building -OPSI_REPOS_BASE_DIR=$HOME/opsi-repository +# Basedirectory storing AIO-packages after building +AIO_REPOS_BASE_DIR=$HOME/aio-repository # Directory- and filename pattern -OPSI_REPOS_PRODUCT_DIR=${OPSI_REPOS_BASE_DIR}/${STATUS}/${VENDOR}/${PN}/${VERSION}-${CREATOR_TAG}${RELEASE} +AIO_REPOS_PRODUCT_DIR=${AIO_REPOS_BASE_DIR}/${STATUS}/${VENDOR}/${PN}/${VERSION}-${CREATOR_TAG}${RELEASE} -# OPSI-package filepattern -OPSI_REPOS_FILE_PATTERN=${PN}_${VERSION}-${CREATOR_TAG}${RELEASE} +# AIO-package filepattern +AIO_REPOS_FILE_PATTERN=${PN}_${VERSION}-${CREATOR_TAG}${RELEASE} -# Force alway upload to opsi repos +# Force alway upload to aio repos # Target: publish, Valid values: true|false, Default: false -# OPSI_REPOS_FORCE_UPLOAD=true +# AIO_REPOS_FORCE_UPLOAD=true -# define the artifacts uploading to the repository (OPSI_REPOS_FORCE_UPLOAD must be "true") -# OPSI_REPOS_UPLOAD_SOURCE product directory -# OPSI_REPOS_UPLOAD_OPSI : opsi package -# OPSI_REPOS_UPLOAD_BIN : File used by opsi package creation -# OPSI_REPOS_UPLOAD_OPSI_ZSYNC : Additional files (*.md5, *.zsync) to sync opsi package using opsi-product-updater -# OPSI_REPOS_OPSIMANAGER_INSTALL : Install the created opsi packet automatically after building -# It equal to the command "opsi-package-manager -i" -# Note: the OPSI_REPOS_BASE_DIR must be RW for the user pcpatch. -# You must be member of the unix group pcpatch&opsiadmin -OPSI_REPOS_UPLOAD_OPSI=true -OPSI_REPOS_UPLOAD_OPSI_ZSYNC=false -OPSI_REPOS_UPLOAD_SOURCE=false -OPSI_REPOS_UPLOAD_BIN=false -OPSI_REPOS_OPSIMANAGER_INSTALL=false +# define the artifacts uploading to the repository (AIO_REPOS_FORCE_UPLOAD must be "true") +# AIO_REPOS_UPLOAD_SOURCE product directory +# AIO_REPOS_UPLOAD_AIO : aio package +# AIO_REPOS_UPLOAD_BIN : File used by aio package creation +# AIO_REPOS_UPLOAD_AIO : Additional files (*.md5) +AIO_REPOS_UPLOAD_AIO=true +AIO_REPOS_UPLOAD_AIO=false +AIO_REPOS_UPLOAD_SOURCE=false +AIO_REPOS_UPLOAD_BIN=false ## # Limiting instances of published version # Valid values: true|false -OPSI_REPOS_PURGE=false +AIO_REPOS_PURGE=false # Only purge projects using the defined STATUS # ValidValues: integration|testing|release # Defaut: integration -OPSI_REPOS_PURGE_STATUS=integration +AIO_REPOS_PURGE_STATUS=integration # defines the max. instances of published versions per product # Valid values: 0...n, 0: disable autocleanup -OPSI_REPOS_PURGE_LIMIT=3 +AIO_REPOS_PURGE_LIMIT=3 # defines limits for special products # Valid values: 0...n, 0: disable autocleanup -OPSI_REPOS_PURGE_LIMIT_productname1=2 -OPSI_REPOS_PURGE_LIMIT_productname2=6 +AIO_REPOS_PURGE_LIMIT_productname1=2 +AIO_REPOS_PURGE_LIMIT_productname2=6 # create an gpg signfile -OPSI_REPOS_UPLOAD_OPSI_GPG=false +AIO_REPOS_UPLOAD_AIO_GPG=false GPG_PASSPHRASE="" ############################### @@ -121,12 +116,12 @@ GPG_PASSPHRASE="" ############################### # Directory downloading/cacheing the artifacts like MSI package or icons from the vendor webside -DIST_CACHE_DIR=$HOME/.opsi-dist-cache/${PN}-${VERSION} +DIST_CACHE_DIR=$HOME/.aio-dist-cache/${PN}-${VERSION} # private dist repository. You can use all variables from release.cfg insde the URL # this optinal URL will be the FIRST url to check for downloading vendor stuff. # To copy a local file, the repos should start with file:// -DIST_PRIVATE_REPOS=file://$HOME/opsi-dist.private/$VENDOR/$PN/$VERSION +DIST_PRIVATE_REPOS=file://$HOME/aio-dist.private/$VENDOR/$PN/$VERSION # Force always downloading dist files # DIST_FORCE_DOWNLOAD=1 diff --git a/lib/builder-targets.sh b/lib/builder-targets.sh index 35946de..ab38ac5 100644 --- a/lib/builder-targets.sh +++ b/lib/builder-targets.sh @@ -11,21 +11,18 @@ builder_config() { # Define commands - CMD_7z="`which 7z`" ; builder_check_error "Command '7z' not installed" - CMD_unzip="`which unzip`" ; builder_check_error "Command 'unzip' not installed" - CMD_unrar="`which unrar`" ; builder_check_error "Command 'unrar' not installed" - CMD_zip="`which zip`" ; builder_check_error "Command 'zip' not installed" - CMD_lha="`which lha`" ; builder_check_error "Command 'lha' not installed" - CMD_tar="`which tar`" ; builder_check_error "Command 'tar' not installed" - CMD_cabextract="`which cabextract`" ; builder_check_error "Command 'cabextract' not installed" - CMD_unix2dos="`which unix2dos`" ; builder_check_error "Command 'unix2dos' not installed" - CMD_identify="`which identify`" ; builder_check_error "Command 'identify' (ImageMagick) not installed" - CMD_zsyncmake="`which zsyncmake`" ; builder_check_error "Command 'zsyncmake' not installed" - CMD_comm="`which comm`" ; builder_check_error "Command 'comm' not installed" - CMD_sha1sum="`which sha1sum`" ; builder_check_error "Command 'sha1sum' not installed" - CMD_iniset="`which ini-set`" ; builder_check_error "Command 'ini-set' (martINI a pypi project) not installed" - CMD_ruby="`which ruby`" ; builder_check_error "Command 'ruby' not installed" - CMD_gpg="`which gpg`" ; builder_check_error "Command 'gpg' not installed" + CMD_7z="`which 7z.exe`" ; builder_check_error "Command '7z' not installed" + CMD_unzip="`which unzip.exe`" ; builder_check_error "Command 'unzip' not installed" + CMD_unrar="`which UnRAR.exe`" ; builder_check_error "Command 'UnRAR' not installed" + CMD_zip="`which zip.exe`" ; builder_check_error "Command 'zip' not installed" + CMD_lha="`which lha.exe`" ; builder_check_error "Command 'lha' not installed" + CMD_tar="`which tar.exe`" ; builder_check_error "Command 'tar' not installed" + CMD_cabextract="`which cabextract.exe`" ; builder_check_error "Command 'cabextract' not installed" + CMD_unix2dos="`which unix2dos.exe`" ; builder_check_error "Command 'unix2dos' not installed" + CMD_sha1sum="`which sha1sum.exe`" ; builder_check_error "Command 'sha1sum' not installed" + CMD_inifile="`which inifile.exe`" ; builder_check_error "Command 'inifile' not installed (http://www.horstmuc.de/wbat32d.htm#inifile)" + CMD_showver="`which ShowVer.exe`" ; builder_check_error "Command 'ShowVer' not installed (http://www.codeproject.com/Articles/2457/ShowVer-exe-command-line-VERSIONINFO-display-progr)" + CMD_tidy="`which tidy.exe`" ; builder_check_error "Command 'tidy' not installed" # Check temp dir test -d ${TMP_DIR} @@ -37,14 +34,14 @@ builder_config() { . ${config} # set default build configuration and source the user dependent file - local config=$BASEDIR/conf/opsi-builder.cfg + local config=$BASEDIR/conf/aio-builder.cfg . ${config} # Source local build configuration (must be done AFTER sourcing the builder-product.cfg.cfg) - if [ -f "$OPSI_BUILDER" ] ; then - config=$OPSI_BUILDER + if [ -f "$AIO_BUILDER" ] ; then + config=$AIO_BUILDER else - test -f $HOME/.opsi-builder.cfg && config=$HOME/.opsi-builder.cfg + test -f $HOME/.aio-builder.cfg && config=$HOME/.aio-builder.cfg fi # Read ONLY the STATUS variable from the build configuration file @@ -57,7 +54,7 @@ builder_config() { . ${config} calc_release else - # OPSI/control:RELEASE is limited to max 16 chars - take care in regards to the CREATOR_TAG + # AIO/control:RELEASE is limited to max 16 chars - take care in regards to the CREATOR_TAG RELEASE="${STATUS_INTEGRATION_RELEASE}" fi fi @@ -67,8 +64,8 @@ builder_config() { echo "Loaded builder configuration: $config" # Check variables - if [ -z ${OPSI_REPOS_BASE_DIR} ] || [ ! -d ${OPSI_REPOS_BASE_DIR} ] ; then - echo "configuration error: OPSI_REPOS_BASE_DIR directory does not exist: $OPSI_REPOS_BASE_DIR" + if [ -z ${AIO_REPOS_BASE_DIR} ] || [ ! -d ${AIO_REPOS_BASE_DIR} ] ; then + echo "configuration error: AIO_REPOS_BASE_DIR directory does not exist: $AIO_REPOS_BASE_DIR" exit 2 fi @@ -77,8 +74,8 @@ builder_config() { fi # Check, if variable is numeric - if [ ! `expr ${OPSI_REPOS_PURGE_LIMIT} + 1 2> /dev/null` ] ; then - fatal_error "OPSI_REPOS_PURGE_LIMIT must be numeric" + if [ ! `expr ${AIO_REPOS_PURGE_LIMIT} + 1 2> /dev/null` ] ; then + fatal_error "AIO_REPOS_PURGE_LIMIT must be numeric" fi } @@ -89,8 +86,8 @@ builder_config() { builder_prepare() { echo "builder_prepare: " # Check if the package is still build - if [ "$OPSI_REPOS_FORCE_UPLOAD" != "true" ] && [ -f "${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN}.opsi" ] ; then - echo "File ${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN}.opsi already exists." + if [ "$AIO_REPOS_FORCE_UPLOAD" != "true" ] && [ -f "${AIO_REPOS_PRODUCT_DIR}/${AIO_REPOS_FILE_PATTERN}.7z" ] ; then + echo "File ${AIO_REPOS_PRODUCT_DIR}/${AIO_REPOS_FILE_PATTERN}.7z already exists." exit 1 fi @@ -98,7 +95,7 @@ builder_prepare() { log_debug "Distribution directory: $DIST_CACHE_DIR" # setup work directory - OUTPUT_DIR="$TMP_DIR/opsi-builder.`date +%Y%m%d-%H%M%S`.$$" + OUTPUT_DIR="$TMP_DIR/aio-builder.`date +%Y%m%d-%H%M%S`.$$" mkdir -p ${OUTPUT_DIR} builder_check_error "Cannot create temp directory ${OUTPUT_DIR}" @@ -190,17 +187,11 @@ builder_retrieve() { builder_create() { # Copy files and convert text files to dos format - cp -Rv ${PRODUCT_DIR}/OPSI $INST_DIR - cp -Rv ${PRODUCT_DIR}/CLIENT_DATA $INST_DIR - if [ -d "${PRODUCT_DIR}/SERVER_DATA" ] ; then - cp -Rv ${PRODUCT_DIR}/SERVER_DATA $INST_DIR - fi - - # converting icon file - local iconfile_src=${DL_DIST_FILE[$ICON_DL_INDEX]} - ICONFILE=$OUTPUT_DIR/$PN.png - convert_image $iconfile_src $ICONFILE - cp -a $ICONFILE $INST_DIR/CLIENT_DATA +# cp -Rv ${PRODUCT_DIR}/AIO $INST_DIR + # cp -Rv ${PRODUCT_DIR}/CLIENT_DATA $INST_DIR + # if [ -d "${PRODUCT_DIR}/SERVER_DATA" ] ; then +# cp -Rv ${PRODUCT_DIR}/SERVER_DATA $INST_DIR + # fi # copy binaries for (( i = 0 ; i < ${#DL_SOURCE[@]} ; i++ )) ; do @@ -214,58 +205,26 @@ builder_create() { process_file $format ${DL_DIST_FILE[$i]} ${DL_EXTRACT_PATH[$i]} $option done - # create winst variables - local var_file=${OUTPUT_DIR}/variable.ins - create_winst_varfile $var_file - # write ini file - local ini_file=${INST_DIR}/CLIENT_DATA/opsi-$PN.ini - write_ini_file $ini_file $var_file - - echo ";Hardcoded opsi vars" >>$var_file - echo "Set \$ProductId\$ = \"$PN\"" >>$var_file - - # add the new vaiables to all *.ins winst files - for inst_file in `find ${INST_DIR}/CLIENT_DATA -type f -name "*.ins"` ; do - sed -i -e "/@@BUILDER_VARIABLES@@/ { - r "$var_file" - d - }" $inst_file + local ini_file=${INST_DIR}/aio-$PN.ini + + for var in VENDOR PN VERSION RELEASE TYPE CREATOR_TAG CREATOR_NAME CREATOR_EMAIL ; do + write_ini_file $ini_file "COMMON" ${var}="${!var}" done # convert to dos file linefeed - find $INST_DIR/CLIENT_DATA -type f | xargs -n1 -iREP sh -c 'file -i $0 | grep -v "utf-16" | grep "text/plain" && '$CMD_unix2dos' $0 ' REP >/dev/null + find $INST_DIR -type f | xargs -n1 -iREP sh -c 'file -i $0 | grep -v "utf-16" | grep "text/plain" && '$CMD_unix2dos' $0 ' REP >/dev/null # set exec bit on executeables - find $INST_DIR/CLIENT_DATA -type f -iname "*.exe" -o -iname "*.bat" -o -iname "*.cmd" -o -iname "*.msi" -o -iname "*.msp" | xargs chmod +x -v + find $INST_DIR -type f -iname "*.exe" -o -iname "*.bat" -o -iname "*.cmd" -o -iname "*.msi" -o -iname "*.msp" | xargs chmod +x -v - # replace variables from file OPSI/control - local release_new=${CREATOR_TAG}${RELEASE} - # sed -e "s!VERSION!$VERSION!g" -e "s!RELEASE!${release_new}!g" -e "s!PRIORITY!$PRIORITY!g" -e "s!ADVICE!$ADVICE!g" ${PRODUCT_DIR}/OPSI/control >$INST_DIR/OPSI/control - write_control_file $INST_DIR/OPSI/control "Package" "version" "${release_new}" - write_control_file $INST_DIR/OPSI/control "Product" "id" "$PN" - write_control_file $INST_DIR/OPSI/control "Product" "name" "$NAME" - write_control_file $INST_DIR/OPSI/control "Product" "description" "$DESCRIPTION" - write_control_file $INST_DIR/OPSI/control "Product" "advice" "$ADVICE" - write_control_file $INST_DIR/OPSI/control "Product" "version" "$VERSION" - write_control_file $INST_DIR/OPSI/control "Product" "priority" "$PRIORITY" - # Create changelog based on git - if available if [ -d "${PRODUCT_DIR}/.git" ] ; then # new changelog format - echo "" >> $INST_DIR/OPSI/control - echo "[Changelog]" >> $INST_DIR/OPSI/control - $CMD_ruby $BASEDIR/libexec/gitlog-to-deblog.rb >> $INST_DIR/OPSI/control - echo "" >> $INST_DIR/OPSI/control - rm -f $INST_DIR/OPSI/changelog.txt - - #old changelog format - #git log --date-order --date=short | \ - #sed -e '/^commit.*$/d' | \ - #awk '/^Author/ {sub(/\\$/,""); getline t; print $0 t; next}; 1' | \ - #sed -e 's/^Author: //g' | \ - #sed -e 's/>Date: \([0-9]*-[0-9]*-[0-9]*\)/>\t\1/g' | \ - #sed -e 's/^\(.*\) \(\)\t\(.*\)/\3 \1 \2/g' > $INST_DIR/OPSI/changelog.txt + echo "" >> $INST_DIR/changelog.txt + echo "[Changelog]" >> $INST_DIR/changelog.txt + #$CMD_ruby $BASEDIR/libexec/gitlog-to-deblog.rb >> $INST_DIR/AIO/changelog.txt + echo "" >> $INST_DIR/changelog.txt else echo "No git repository present." fi @@ -273,30 +232,30 @@ builder_create() { } ##################### -# build opsi package +# build aio package ##################### builder_package() { # creating package local release_new=${CREATOR_TAG}${RELEASE} - local opsi_file=${PN}_${VERSION}-${release_new}.opsi + local aio_file=${PN}_${VERSION}-${release_new}.7z pushd ${OUTPUT_DIR} - rm -f ${opsi_file} ${OPSI_REPOS_FILE_PATTERN}.opsi - LANG="C" opsi-makeproductfile -v $INST_DIR - builder_check_error "Building OPSI-package" + rm -f ${aio_file} ${AIO_REPOS_FILE_PATTERN}.7z + 7z a ${AIO_REPOS_FILE_PATTERN}.7z -v $INST_DIR/* + builder_check_error "Building AIO-package" popd - # rename opsi package file - if [ "${opsi_file}" != "${OPSI_REPOS_FILE_PATTERN}.opsi" ]; then - mv ${OUTPUT_DIR}/${opsi_file} ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}.opsi - builder_check_error "can't move file ${OUTPUT_DIR}/${opsi_file} ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}.opsi" + # rename aio package file + if [ "${aio_file}" != "${AIO_REPOS_FILE_PATTERN}.7z" ]; then + mv ${OUTPUT_DIR}/${aio_file} ${OUTPUT_DIR}/${AIO_REPOS_FILE_PATTERN}.7z + builder_check_error "can't move file ${OUTPUT_DIR}/${aio_file} ${OUTPUT_DIR}/${AIO_REPOS_FILE_PATTERN}.7z" fi # --exclude \*/.git\* # create source- and binary package package - test "${OPSI_REPOS_UPLOAD_BIN}" = "true" && $CMD_zip --exclude \*/.git\* @ -r ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}.zip $INST_DIR - test "${OPSI_REPOS_UPLOAD_SOURCE}" = "true" && $CMD_zip --exclude \*/.git\* @ -r ${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN}-src.zip ${PRODUCT_DIR} + test "${AIO_REPOS_UPLOAD_BIN}" = "true" && $CMD_zip --exclude \*/.git\* @ -r ${OUTPUT_DIR}/${AIO_REPOS_FILE_PATTERN}.zip $INST_DIR + test "${AIO_REPOS_UPLOAD_SOURCE}" = "true" && $CMD_zip --exclude \*/.git\* @ -r ${OUTPUT_DIR}/${AIO_REPOS_FILE_PATTERN}-src.zip ${PRODUCT_DIR} } @@ -306,55 +265,52 @@ builder_package() { builder_publish() { # Upload file to repository - mkdir -p ${OPSI_REPOS_PRODUCT_DIR} + mkdir -p ${AIO_REPOS_PRODUCT_DIR} - echo "Publishing opsi-package to ${OPSI_REPOS_PRODUCT_DIR}" - local src=${OUTPUT_DIR}/${OPSI_REPOS_FILE_PATTERN} - local dst=${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN} + echo "Publishing aio-package to ${AIO_REPOS_PRODUCT_DIR}" + local src=${OUTPUT_DIR}/${AIO_REPOS_FILE_PATTERN} + local dst=${AIO_REPOS_PRODUCT_DIR}/${AIO_REPOS_FILE_PATTERN} # Link dir - if [ "${OPSI_REPOS_LINK_NEWBUILDS}" = "true" ] ; then - mkdir -p ${OPSI_REPOS_BASE_DIR}/.new_builds - ln -sf ${OPSI_REPOS_PRODUCT_DIR} ${OPSI_REPOS_BASE_DIR}/.new_builds/${OPSI_REPOS_FILE_PATTERN} - builder_check_error "Can't Link file $dst.opsi --> $dst.opsi" + if [ "${AIO_REPOS_LINK_NEWBUILDS}" = "true" ] ; then + mkdir -p ${AIO_REPOS_BASE_DIR}/.new_builds + ln -sf ${AIO_REPOS_PRODUCT_DIR} ${AIO_REPOS_BASE_DIR}/.new_builds/${AIO_REPOS_FILE_PATTERN} + builder_check_error "Can't Link file $dst.7z --> $dst.7z" fi # copy files - if [ "${OPSI_REPOS_UPLOAD_OPSI}" = "true" ] ; then - cp ${src}.opsi ${dst}.opsi - builder_check_error "Can't upload file $dst.opsi --> $dst.opsi" + if [ "${AIO_REPOS_UPLOAD_AIO}" = "true" ] ; then + cp ${src}.7z ${dst}.7z + builder_check_error "Can't upload file $dst.7z --> $dst.7z" fi - if [ "${OPSI_REPOS_UPLOAD_BIN}" = "true" ] ; then + if [ "${AIO_REPOS_UPLOAD_BIN}" = "true" ] ; then cp ${src}.zip ${dst}.zip builder_check_error "Can't upload file $dst.zip --> $dst.zip" fi - if [ "${OPSI_REPOS_UPLOAD_SOURCE}" = "true" ] ; then + if [ "${AIO_REPOS_UPLOAD_SOURCE}" = "true" ] ; then cp ${src}-src.zip ${dst}-src.zip builder_check_error "Can't upload file ${dst}-src.zip --> ${dst}-src.zip" fi - if [ "${OPSI_REPOS_OPSIMANAGER_INSTALL}" = "true" ] ; then - opsi-package-manager -i -v ${src}.opsi - builder_check_error "Can't install ${src}.opsi" + if [ "${AIO_REPOS_AIOMANAGER_INSTALL}" = "true" ] ; then + aio-package-manager -i -v ${src}.7z + builder_check_error "Can't install ${src}.7z" fi - if [ "${OPSI_REPOS_UPLOAD_OPSI_ZSYNC}" = "true" ] ; then - md5sum "${src}.opsi" | sed 's/ .*//' > ${dst}.opsi.md5 + if [ "${AIO_REPOS_UPLOAD_AIO}" = "true" ] ; then + md5sum "${src}.7z" | sed 's/ .*//' > ${dst}.7z.md5 builder_check_error "Can't create md5 file" - - ${CMD_zsyncmake} -u ${OPSI_REPOS_FILE_PATTERN}.opsi -o "${dst}.opsi.zsync" "${src}.opsi" - builder_check_error "Can't create zsync file" fi - if [ "${OPSI_REPOS_UPLOAD_OPSI_GPG}" = "true" ] ; then - ${CMD_gpg} --batch --passphrase ${GPG_PASSPHRASE} --output "${dst}.opsi.gpg" --detach-sig "${src}.opsi" + if [ "${AIO_REPOS_UPLOAD_AIO_GPG}" = "true" ] ; then + ${CMD_gpg} --batch --passphrase ${GPG_PASSPHRASE} --output "${dst}.7z.gpg" --detach-sig "${src}.7z" builder_check_error "Can't create gpg file" fi # Create revision file for this - local rev_file=${OPSI_REPOS_PRODUCT_DIR}/${PN}-${VERSION}-${CREATOR_TAG}${RELEASE}.cfg + local rev_file=${AIO_REPOS_PRODUCT_DIR}/${PN}-${VERSION}-${CREATOR_TAG}${RELEASE}.cfg cat > $rev_file < 0 ] && [ "${STATUS}" = "${OPSI_REPOS_PURGE_STATUS}" ] ; then + # Purge old product versions - defined by limit AIO_REPOS_PURGE_LIMIT + if [ "${AIO_REPOS_PURGE}" = "true" ] && [ ! -z "${AIO_REPOS_PURGE_LIMIT}" ] && [ "${AIO_REPOS_PURGE_LIMIT}" > 0 ] && [ "${STATUS}" = "${AIO_REPOS_PURGE_STATUS}" ] ; then echo "Autopurging enabled" # determinte max version to delete local limit local pn_limit=`echo ${PN} | sed "s/[\.\-]/_/g"` - eval "`echo limit=\\$\\{OPSI_REPOS_PURGE_LIMIT_${pn_limit}\\}`" + eval "`echo limit=\\$\\{AIO_REPOS_PURGE_LIMIT_${pn_limit}\\}`" if [ -z "$limit" ] || [ ! `expr $limit + 1 2>/dev/null` ] ; then - limit=${OPSI_REPOS_PURGE_LIMIT} + limit=${AIO_REPOS_PURGE_LIMIT} fi echo " Purging, max. number of versions: $limit" @@ -391,7 +347,7 @@ EOF rm -f ${file_list} # first uniq sort all cfg based on version - for cfg_file in `find ${OPSI_REPOS_PRODUCT_DIR} -name "${PN}-*.cfg" -print ` ; do + for cfg_file in `find ${AIO_REPOS_PRODUCT_DIR} -name "${PN}-*.cfg" -print ` ; do . ${cfg_file} echo $REV_VERSION >> ${file_list} done @@ -399,7 +355,7 @@ EOF # second uniq sort all versions based in release for pkg_version in `cat ${file_sort_list_version}` ; do - for cfg_file_ver in ${OPSI_REPOS_PRODUCT_DIR}/${PN}-${pkg_version}-*.cfg ; do + for cfg_file_ver in ${AIO_REPOS_PRODUCT_DIR}/${PN}-${pkg_version}-*.cfg ; do . ${cfg_file_ver} echo ${pkg_version}-$REV_CREATOR_TAG$REV_RELEASE >> ${file_sort_list_release} done @@ -408,8 +364,8 @@ EOF # third create versionrelease for release_file_list in `cat ${file_sort_list_final}` ; do - . ${OPSI_REPOS_PRODUCT_DIR}/${PN}-${release_file_list}.cfg - echo "${OPSI_REPOS_PRODUCT_DIR}/${PN}-${release_file_list}.cfg" >> ${file_sort_list} + . ${AIO_REPOS_PRODUCT_DIR}/${PN}-${release_file_list}.cfg + echo "${AIO_REPOS_PRODUCT_DIR}/${PN}-${release_file_list}.cfg" >> ${file_sort_list} done # Delete the oldest files @@ -417,14 +373,14 @@ EOF for cfg_sort_file in `head -n-${limit} ${file_sort_list}` ; do . ${cfg_sort_file} - if [ "${REV_STATUS}" != "${OPSI_REPOS_PURGE_STATUS}" ] ; then continue; fi + if [ "${REV_STATUS}" != "${AIO_REPOS_PURGE_STATUS}" ] ; then continue; fi dir_base=`dirname ${cfg_file}` - product_file="${dir_base}/${REV_OPSI_REPOS_FILE_PATTERN}" + product_file="${dir_base}/${REV_AIO_REPOS_FILE_PATTERN}" echo " Purging product version: $product_file*" # Paranoid ... check the files to delete first - if [ ! -z "${dir_base}" ] && [ -d "${OPSI_REPOS_BASE_DIR}" ] && [ ! -z "$product_file" ] ; then + if [ ! -z "${dir_base}" ] && [ -d "${AIO_REPOS_BASE_DIR}" ] && [ ! -z "$product_file" ] ; then rm -f ${product_file}* ${cfg_sort_file} # remove directory - if it's empty @@ -448,11 +404,11 @@ builder_commit() { ##################### -# build opsi package +# build aio package ##################### builder_cleanup() { # Paranoia - if [ -d "$OUTPUT_DIR" ] && [[ $OUTPUT_DIR == $TMP_DIR/opsi-builder.* ]] ; then + if [ -d "$OUTPUT_DIR" ] && [[ $OUTPUT_DIR == $TMP_DIR/aio-builder.* ]] ; then rm -rf $OUTPUT_DIR fi } diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh index cb87ef8..88b5e77 100644 --- a/lib/builder-utils.sh +++ b/lib/builder-utils.sh @@ -138,159 +138,6 @@ log_info() { fi } -################### -# Convert image -################### -convert_image() { - local src=$1 - local dst=$2 - - local hight=`${CMD_identify} -format "%h" $src` - local wight=`${CMD_identify} -format "%w" $src` - ${CMD_identify} -format "%wx%h" $src - - # Add a white border to the image so that the convert to transparent can go around an image - convert -bordercolor White -border 3x3 $src $OUTPUT_DIR/bigger.png - - # first resize the image to the new aspect ratio and add white borders - if [ $wight -lt $hight ] ; then - # Its higher so force x166 and let imagemagic decide the right wight - # then add white to the rest of the image to fit 166x166 - log_debug "Icon Wight: $wight < Hight: $hight" - convert $OUTPUT_DIR/bigger.png -colorspace RGB -resize x166 \ - -size 166x166 xc:white +swap -gravity center -composite \ - -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png - builder_check_error "converting image" - elif [ $wight -gt $hight ] ; then - # Its wider so force 166x and let imagemagic decide the right hight - # then add white to the rest of the image to fit 166x166 - log_debug "Icon Wight: $wight > Hight: $hight" - convert $OUTPUT_DIR/bigger.png -colorspace RGB -resize 166x \ - -size 166x166 xc:white +swap -gravity center -composite \ - -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png - builder_check_error "converting image" - elif [ $wight -eq $hight ] ; then - # Its scare so force 166x166 - log_debug "Icon Wight: $wight = Hight: $hight" - convert $OUTPUT_DIR/bigger.png -colorspace RGB -resize 166x166 \ - -size 166x166 xc:white +swap -gravity center -composite \ - -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png - builder_check_error "converting image" - else - # Imagemagic is unable to detect the aspect ratio so just force 166x166 - # this could result in streched images - log_debug "Icon Wight: $wight unknown Hight: $hight" - convert $OUTPUT_DIR/bigger.png -colorspace RGB -resize 166x166 \ - -size 166x166 xc:white +swap -gravity center -composite \ - -modulate 110 -colors 256 png8:$OUTPUT_DIR/resize.png - builder_check_error "converting image" - fi - - # create a diffence image from the source - convert $OUTPUT_DIR/resize.png \( +clone -fx 'p{0,0}' \) -compose Difference -composite \ - -modulate 100,0 +matte $OUTPUT_DIR/difference.png - - # remove the black, replace with transparency - convert $OUTPUT_DIR/difference.png -bordercolor white -border 1x1 -matte \ - -fill none -fuzz 7% -draw 'matte 1,1 floodfill' -shave 1x1 \ - $OUTPUT_DIR/removed_black.png - - # create the matte - if [ `convert | grep Version | awk '{print $3}' | sed "s/-.*//" | sed "s/\.//g"` -le 670 ] ; then - convert $OUTPUT_DIR/removed_black.png -channel matte -separate +matte \ - $OUTPUT_DIR/matte.png - else - convert $OUTPUT_DIR/removed_black.png -channel matte -negate -separate +matte \ - $OUTPUT_DIR/matte.png - fi - - # negate the colors - convert $OUTPUT_DIR/matte.png -negate -blur 0x1 \ - $OUTPUT_DIR/matte-negated.png - - # you are going for: white interior, black exterior - composite -compose CopyOpacity $OUTPUT_DIR/matte-negated.png $OUTPUT_DIR/resize.png \ - $OUTPUT_DIR/smaller.png - - # now remove the added border that was added eaerlier - # Chop 3 pixels from the top and left side of - convert -chop 3x3 -rotate 180 $OUTPUT_DIR/smaller.png $OUTPUT_DIR/rotate.png - - # Chop 3 pixels from the bottom and right side - convert -chop 3x3 -rotate 180 $OUTPUT_DIR/rotate.png $dst - - # New size - # identify -format "%wx%h" $dst - hight=`${CMD_identify} -format "%h" $dst` - wight=`${CMD_identify} -format "%w" $dst` - log_debug "Opsi Icon Wight: $wight Hight: $hight" - -} - - -################### -# Create variable file -# -# Create a file containing all important winst variables -# (declaration and setings) -# -# Parameter -# file: file to create -# -################### -create_winst_varfile() { - local var_file=$1 - - echo -n >$var_file - echo "; Opsi Builder Variables" >>$var_file - - # make the scriptpath for the binarys configurable - echo "DefVar \$PackagePath\$" >>$var_file - echo "Set \$PackagePath\$ = \"%ScriptPath%\"" >>$var_file - - echo >>$var_file - for (( i = 0 ; i < ${#DL_SOURCE[@]} ; i++ )) ; do - if [ -z ${DL_WINST_NAME[$i]} ] ; then continue ; fi - - if [ ! -z "${DL_ARCH[$i]}" ] ; then arch_str="${DL_ARCH[$i]}\\" ; fi - echo "DefVar \$${DL_WINST_NAME[$i]}\$" >>$var_file - echo "Set \$${DL_WINST_NAME[$i]}\$ = \$PackagePath\$ + \"\\${arch_str}${DL_FILE[$i]}\"" >>$var_file - done - - # publish some other variables - for var in VENDOR PN VERSION RELEASE PRIORITY NAME ADVICE TYPE CREATOR_TAG CREATOR_NAME CREATOR_EMAIL ; do - echo "DefVar \$${var}\$" >>$var_file - echo "Set \$${var}\$ = \"${!var}\"" >>$var_file - done - - # copy image and create variable - echo "DefVar \$IconFile\$" >>$var_file - echo "Set \$IconFile\$ = \"%ScriptPath%\\`basename $ICONFILE`\"" >>$var_file - - # publish custom variables - for (( i = 0 ; i < ${#WINST_NAME[@]} ; i++ )) ; do - - # replace DL_EXTRACT_WINST_PATH - local index=`echo ${WINST_VALUE[$i]} | sed -e "s#.*@DL_EXTRACT_WINST_PATH\[\([0-9]\)\]@.*#\1#"` - log_debug "calculated (DL_EXTRACT_WINST_PATH), Index: $index" - if [ "$index" != "${WINST_VALUE[$i]}" ] ; then - if [ ! -z "${DL_ARCH[$index]}" ] ; then arch_part="\\\\${DL_ARCH[$index]}" ; fi - if [ ! -z "${DL_EXTRACT_WINST_PATH[$index]}" ] ; then extr_part="\\\\${DL_EXTRACT_WINST_PATH[$index]}" ; fi - local new_val="\$PackagePath\$ + $arch_part$extr_part" - WINST_VALUE[$i]=`echo ${WINST_VALUE[$i]} | sed -e "s#@DL_EXTRACT_WINST_PATH\[[0-9]\]@#$new_val#"` - log_debug "calculated (DL_EXTRACT_WINST_PATH) WINST_VALUE: ${WINST_VALUE[$i]}" - fi - - echo "DefVar \$${WINST_NAME[$i]}\$" >>$var_file - echo "Set \$${WINST_NAME[$i]}\$ = \"${WINST_VALUE[$i]}\"" >>$var_file - done - - # correct me im a hack - sed -e 's#"\$PackagePath\$ +#\$PackagePath\$ + "#' -i $var_file - sed -e 's#\$PackagePath\$ + " #\$PackagePath\$ + "#' -i $var_file - echo >>$var_file -} - ##################### # void calc_release() # @@ -304,8 +151,8 @@ create_winst_varfile() { function calc_release() { # Find all revision files and sort them - local file_list=`mktemp /tmp/opsi-builder.calc_release.XXXXXXXXXXX` - for cfg_file in `find ${OPSI_REPOS_BASE_DIR} -name "${PN}-${VERSION}-${CREATOR_TAG}*.cfg" -print ` ; do + local file_list=`mktemp /tmp/aio-builder.calc_release.XXXXXXXXXXX` + for cfg_file in `find ${AIO_REPOS_BASE_DIR} -name "${PN}-${VERSION}-${CREATOR_TAG}*.cfg" -print ` ; do . ${cfg_file} printf "%08d;$cfg_file\n" $REV_RELEASE >> ${file_list} done @@ -335,43 +182,70 @@ function calc_release() { ################### write_ini_file() { local ini_file=$1 - local var_file=$2 - - # create file if not exist + local ini_section=$2 + local ini_option=$3 + local ini_value=$4 + touch $ini_file - - # publish some other variables - for var in VENDOR PN VERSION RELEASE TYPE CREATOR_TAG CREATOR_NAME CREATOR_EMAIL ; do - $CMD_iniset $ini_file --COMMON ${var}="${!var}" - done - - echo "; Opsi INI File Variables" >>$var_file - echo >>$var_file - # publish custom variables - for (( i = 0 ; i < ${#OPSI_INI_OPTION[@]} ; i++ )) ; do - $CMD_iniset $ini_file --${OPSI_INI_SECTION[$i]} ${OPSI_INI_OPTION[$i]}="${OPSI_INI_VALUE[$i]}" - echo "DefVar \$${OPSI_INI_OPTION[$i]}\$" >>$var_file - echo "Set \$${OPSI_INI_OPTION[$i]}\$ = \"${OPSI_INI_VALUE[$i]}\"" >>$var_file - done - - echo >>$var_file + $CMD_inifile $(cygpath -pw "$ini_file") [$ini_section] $ini_option=$ini_value } + ################### -# Write control file +# Get Verison of File # -# Create a ini file containing needed information for package uninstall +# Copy file only if it is newer # # Parameter -# file: file to create / modify +# File: to process +# Var: # ################### -write_control_file() { - local control_file=$1 - local control_section=$2 - local control_option=$3 - local control_value=$4 +get_file_version() { + local getver_file=$1 + local getver_var=$2 - sed -i -e "/^\[$control_section\]/,/^\[.*\]/ s|^\($control_option[ \t]*:[ \t]*\).*$|\1$control_value|" "$control_file" + if [ -f "$getver_file" ] ; then + $CMD_showver $getver_file | grep FileVersion: | rev | cut -d: -f1 | rev | tr -d ' ' > $getver_ver + echo "file $getver_file has version $getver_ver" + else + echo "$getver_file not found" + fi +} + +################### +# Copy Verison +# +# Copy file only if it is newer +# +# Parameter +# source: sourcefiel +# target: Targetfile +# +################### +copyver() { + local source_file=$1 + local target_file=$2 + local source_ver + local target_ver + + get_file_version $source_file $source_ver +} + +################### +# Tidy xml +# +# Tidy XML files (mainly Sereby package.xml) +# +# Parameter +# source: sourcefiel +# target: Targetfile +# +################### +tidy_xml() { + local source_file=$1 + local target_file=$2 + + cat $source_file | $CMD_tidy -utf8 -xml -w 255 -i -c -q -asxml | sed -e 's!>!>!g' -e 's!<! $target_file } diff --git a/libexec/ShowVer.exe b/libexec/ShowVer.exe new file mode 100644 index 0000000..6984bd3 Binary files /dev/null and b/libexec/ShowVer.exe differ diff --git a/libexec/ShowVer/ShowVer.cpp b/libexec/ShowVer/ShowVer.cpp new file mode 100644 index 0000000..36306a0 --- /dev/null +++ b/libexec/ShowVer/ShowVer.cpp @@ -0,0 +1,531 @@ +/* + * File: ShowVer.cpp + * Version: 1.0, 2002-6-4 + * Purpose: console program to display file VERSIONINFO text + + * Copyright (c) 2002 by Ted Peck + * Permission is given by the author to freely redistribute and include + * this code in any program as long as this credit is given where due. + * + * THIS CODE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY + * OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN PARTICULAR, NO WARRANTY IS MADE + * THAT THE CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE + * OR NON-INFRINGING. IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY COSTS OR DAMAGES + * ARISING FROM ANY USE OF THIS CODE. NO USE OF THIS CODE IS AUTHORIZED EXCEPT UNDER + * THIS DISCLAIMER. + * + * Use at your own risk! + */ +// ---------------------------------------------------------------------------- + +#include +#include + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#include + +typedef unsigned char byte; + +#ifndef _DEBUG +# define ASSERT(s) +#else +# include // for _ASSERTE() +# define ASSERT _ASSERTE +#endif + +#define HDUMP 0 +// ---------------------------------------------------------------------------- +#if HDUMP + +#define CHARPRINT(a) \ + { unsigned char tchar; \ + switch (a) { \ + case 0x0D: /* CR */ \ + tchar = 0x11; \ + break; \ + case 0x0A: /* LF */ \ + tchar = 0x19; \ + break; \ + case 0x07: /* BEL */ \ + tchar = 0x0F; \ + break; \ + case '\t': /* TAB */ \ + tchar = 0x1D; \ + break; \ + case '\0': /* NUL */ \ + tchar = 0xF8; \ + break; \ + case 0x08: /* BACKTAB? */ \ + tchar = 0xAE; \ + break; \ + case 0x1A: /* BACKTAB? */ \ + tchar = 0xAE; \ + break; \ + case 0x1B: /* BACKSPACE */ \ + tchar = 0xAE; \ + break; \ + case ' ': /* SPACE */ \ + tchar = 0xC4; \ + break; \ + default: \ + tchar = buf[i]; \ + break; \ + } \ + printf ("%c", tchar); \ + } +// ---------------------------------------------------------------------------- + +int hdump(byte* pBuf, size_t size, size_t start, size_t len) +{ + int ch; + int i, firsti, lasti, tlasti; + unsigned char buf[16]; + unsigned long offs, end; + firsti = (int)(start & 0xFL); + offs = start & ~0xFL; + + byte* pEnd = pBuf+size; + + if (pBuf == NULL) { + return 0; + } + + end = (len!=0) ? start+len : ~len; + lasti = 16; + tlasti = 8; + + for ( ; offs < end; offs += 16) { + unsigned long rmdr = end - offs; + if (rmdr < 16) { + lasti = rmdr; + if (rmdr < 8) { + tlasti = rmdr; + } + } + for (i = firsti; i < lasti; i++) { + ch = (pBuf < pEnd) ? *(pBuf++) : EOF; + buf[i] = (unsigned char) ch; + if (ch == EOF) { + lasti = i; + if (i < 8) tlasti = i; + break; + } + } + /* Print address */ + printf("% 8lx: ", offs); + + /* Print 2 groups of 8 chars in hex format */ + for (i = 0; i < firsti && i < 8; i++) { + printf(" "); // only could happen first time around + } + for ( ; i < tlasti; i++) { + printf("%2.2x ", buf[i]); + } + for ( ; i < 8; i++) { + printf(" "); + } + printf(" "); + for ( ; i < firsti; i++) { + printf(" "); // only could happen first time around + } + for ( ; i < lasti; i++) { + printf("%2.2x ", (unsigned) buf[i]); + } + for ( ; i < 16; i++) { + printf(" "); + } + printf("| "); + + /* Print 2 groups of 8 chars in char format */ + for (i = 0; i < firsti && i < 8; i++) { + printf(" "); + } + for ( ; i < tlasti; i++) { + CHARPRINT(buf[i]) + } + for ( ; i < 8; i++) { + printf(" "); + } + printf(" "); + + for ( ; i < firsti; i++) { + printf(" "); + } + for ( ; i < lasti; i++) { + CHARPRINT(buf[i]) + } + for ( ; i < 16; i++) { + printf(" "); + } + + printf("\n"); + + if (ch == EOF) break; + + firsti = 0; + } + return 1; +} +#endif // HDUMP +// ---------------------------------------------------------------------------- +int usage() +{ + printf("ShowVer \n"); + return 0; +} +// ---------------------------------------------------------------------------- + +int error(wchar_t* sfnName) +{ + DWORD dwErrCode = GetLastError(); + wchar_t* sMsg; + FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + dwErrCode, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (wchar_t*) &sMsg, + 0, + NULL); + // Process any inserts in sMsg. + // ... + printf("Unable to access file \"%S\" : %S", sfnName, sMsg); + LocalFree(sMsg); + return 0; +} +// ---------------------------------------------------------------------------- + +/* ----- VS_VERSION.dwFileFlags ----- */ +#define S_VS_FFI_SIGNATURE "VS_FFI_SIGNATURE" +#define S_VS_FFI_STRUCVERSION "VS_FFI_STRUCVERSION" +#define S_VS_FFI_FILEFLAGSMASK "VS_FFI_FILEFLAGSMASK" + +/* ----- VS_VERSION.dwFileFlags ----- */ +#define S_VS_FF_DEBUG "VS_FF_DEBUG" +#define S_VS_FF_PRERELEASE "VS_FF_PRERELEASE" +#define S_VS_FF_PATCHED "VS_FF_PATCHED" +#define S_VS_FF_PRIVATEBUILD "VS_FF_PRIVATEBUILD" +#define S_VS_FF_INFOINFERRED "VS_FF_INFOINFERRED" +#define S_VS_FF_SPECIALBUILD "VS_FF_SPECIALBUILD" + +// ---------------------------------------------------------------------------- +char* showFileFlags(DWORD dwFileFlags) +{ +#define MAXFLAGSSTR 200 + static char s[MAXFLAGSSTR]; + int pos = 0; + s[pos] = '\0'; +#define VS_FF_KNOWNFLAGS (VS_FF_DEBUG \ + | VS_FF_PRERELEASE \ + | VS_FF_PATCHED \ + | VS_FF_PRIVATEBUILD \ + | VS_FF_INFOINFERRED \ + | VS_FF_SPECIALBUILD \ + ) + if (dwFileFlags & ~VS_FF_KNOWNFLAGS) pos += sprintf(&s[pos], "0x%x", dwFileFlags & ~VS_FF_KNOWNFLAGS); + + if (dwFileFlags & VS_FF_DEBUG) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_DEBUG, sizeof(S_VS_FF_DEBUG)); pos += sizeof(S_VS_FF_DEBUG) - 1; } + if (dwFileFlags & VS_FF_PRERELEASE) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_PRERELEASE, sizeof(S_VS_FF_PRERELEASE)); pos += sizeof(S_VS_FF_PRERELEASE) - 1; } + if (dwFileFlags & VS_FF_PATCHED) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_PATCHED, sizeof(S_VS_FF_PATCHED)); pos += sizeof(S_VS_FF_PATCHED) - 1; } + if (dwFileFlags & VS_FF_PRIVATEBUILD) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_PRIVATEBUILD, sizeof(S_VS_FF_PRIVATEBUILD)); pos += sizeof(S_VS_FF_PRIVATEBUILD) - 1; } + if (dwFileFlags & VS_FF_INFOINFERRED) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_INFOINFERRED, sizeof(S_VS_FF_INFOINFERRED)); pos += sizeof(S_VS_FF_INFOINFERRED) - 1; } + if (dwFileFlags & VS_FF_SPECIALBUILD) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_SPECIALBUILD, sizeof(S_VS_FF_SPECIALBUILD)); pos += sizeof(S_VS_FF_SPECIALBUILD) - 1; } + + if (!pos) memcpy(s, "0", 2); + return s; +} +/* ----- VS_VERSION.dwFileOS ----- */ +#define S_VOS_UNKNOWN "VOS_UNKNOWN" +#define S_VOS_DOS "VOS_DOS" +#define S_VOS_OS216 "VOS_OS216" +#define S_VOS_OS232 "VOS_OS232" +#define S_VOS_NT "VOS_NT" + +#define S_VOS__BASE "VOS__BASE" +#define S_VOS__WINDOWS16 "VOS__WINDOWS16" +#define S_VOS__PM16 "VOS__PM16" +#define S_VOS__PM32 "VOS__PM32" +#define S_VOS__WINDOWS32 "VOS__WINDOWS32" + +#define S_VOS_DOS_WINDOWS16 "VOS_DOS_WINDOWS16" +#define S_VOS_DOS_WINDOWS32 "VOS_DOS_WINDOWS32" +#define S_VOS_OS216_PM16 "VOS_OS216_PM16" +#define S_VOS_OS232_PM32 "VOS_OS232_PM32" +#define S_VOS_NT_WINDOWS32 "VOS_NT_WINDOWS32" + +char* showFileOS(DWORD dwFileOS) +{ + switch(dwFileOS) { + case VOS_UNKNOWN: return S_VOS_UNKNOWN; + case VOS_DOS: return S_VOS_DOS; + case VOS_OS216: return S_VOS_OS216; + case VOS_OS232: return S_VOS_OS232; + case VOS_NT: return S_VOS_NT; + +// case VOS__BASE: return S_VOS__BASE; + case VOS__WINDOWS16:return S_VOS__WINDOWS16; + case VOS__PM16: return S_VOS__PM16; + case VOS__PM32: return S_VOS__PM32; + case VOS__WINDOWS32:return S_VOS__WINDOWS32; + + case VOS_DOS_WINDOWS16: return S_VOS_DOS_WINDOWS16; + case VOS_DOS_WINDOWS32: return S_VOS_DOS_WINDOWS32; + case VOS_OS216_PM16: return S_VOS_OS216_PM16; + case VOS_OS232_PM32: return S_VOS_OS232_PM32; + case VOS_NT_WINDOWS32: return S_VOS_NT_WINDOWS32; + + default: return "Unknown FileOS"; + } +} +/* ----- VS_VERSION.dwFileType ----- */ +#define S_VFT_UNKNOWN "VFT_UNKNOWN" +#define S_VFT_APP "VFT_APP" +#define S_VFT_DLL "VFT_DLL" +#define S_VFT_DRV "VFT_DRV" +#define S_VFT_FONT "VFT_FONT" +#define S_VFT_VXD "VFT_VXD" +#define S_VFT_STATIC_LIB "VFT_STATIC_LIB" + +char* showFileType(DWORD dwFileType) +{ + switch(dwFileType) { + case VFT_UNKNOWN: return S_VFT_UNKNOWN; + case VFT_APP: return S_VFT_APP; + case VFT_DLL: return S_VFT_DLL; + case VFT_DRV: return S_VFT_DRV; + case VFT_FONT: return S_VFT_FONT; + case VFT_VXD: return S_VFT_VXD; + case VFT_STATIC_LIB:return S_VFT_STATIC_LIB; + default: return "Unknown FileType"; + } +} +/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */ +#define S_VFT2_UNKNOWN "VFT2_UNKNOWN" +#define S_VFT2_DRV_PRINTER "VFT2_DRV_PRINTER" +#define S_VFT2_DRV_KEYBOARD "VFT2_DRV_KEYBOARD" +#define S_VFT2_DRV_LANGUAGE "VFT2_DRV_LANGUAGE" +#define S_VFT2_DRV_DISPLAY "VFT2_DRV_DISPLAY" +#define S_VFT2_DRV_MOUSE "VFT2_DRV_MOUSE" +#define S_VFT2_DRV_NETWORK "VFT2_DRV_NETWORK" +#define S_VFT2_DRV_SYSTEM "VFT2_DRV_SYSTEM" +#define S_VFT2_DRV_INSTALLABLE "VFT2_DRV_INSTALLABLE" +#define S_VFT2_DRV_SOUND "VFT2_DRV_SOUND" +#define S_VFT2_DRV_COMM "VFT2_DRV_COMM" +#define S_VFT2_DRV_INPUTMETHOD "VFT2_DRV_INPUTMETHOD" + +/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */ +#define S_VFT2_FONT_RASTER "VFT2_FONT_RASTER" +#define S_VFT2_FONT_VECTOR "VFT2_FONT_VECTOR" +#define S_VFT2_FONT_TRUETYPE "VFT2_FONT_TRUETYPE" + +char* showFileSubtype(DWORD dwFileType, DWORD dwFileSubtype) +{ + static char s[50]; + switch(dwFileType) { + case VFT_DRV: + switch(dwFileSubtype) { + case VFT2_UNKNOWN: return "FileSubtype: " S_VFT2_UNKNOWN; + case VFT2_DRV_PRINTER: return "FileSubtype: " S_VFT2_DRV_PRINTER; + case VFT2_DRV_KEYBOARD: return "FileSubtype: " S_VFT2_DRV_KEYBOARD; + case VFT2_DRV_LANGUAGE: return "FileSubtype: " S_VFT2_DRV_LANGUAGE; + case VFT2_DRV_DISPLAY: return "FileSubtype: " S_VFT2_DRV_DISPLAY; + case VFT2_DRV_MOUSE: return "FileSubtype: " S_VFT2_DRV_MOUSE; + case VFT2_DRV_NETWORK: return "FileSubtype: " S_VFT2_DRV_NETWORK; + case VFT2_DRV_SYSTEM: return "FileSubtype: " S_VFT2_DRV_SYSTEM; + case VFT2_DRV_INSTALLABLE:return "FileSubtype: " S_VFT2_DRV_INSTALLABLE; + case VFT2_DRV_SOUND: return "FileSubtype: " S_VFT2_DRV_SOUND; + case VFT2_DRV_COMM: return "FileSubtype: " S_VFT2_DRV_COMM; + case VFT2_DRV_INPUTMETHOD:return "FileSubtype: " S_VFT2_DRV_INPUTMETHOD; + default: s[0] = '\0'; sprintf(s, "Unknown FileSubtype: %x", dwFileSubtype); return s; + } + break; + + case VFT_FONT: + switch(dwFileSubtype) { + case VFT2_FONT_RASTER: return "FileSubtype: " S_VFT2_FONT_RASTER; + case VFT2_FONT_VECTOR: return "FileSubtype: " S_VFT2_FONT_VECTOR; + case VFT2_FONT_TRUETYPE:return "FileSubtype: " S_VFT2_FONT_TRUETYPE; + default: s[0] = '\0'; sprintf(s, "Unknown FileSubtype: %x", dwFileSubtype); return s; + } + break; + + default: s[0] = '\0'; if (dwFileSubtype) sprintf(s, ", FileSubtype: %x", dwFileSubtype); return s; + } +} +// ---------------------------------------------------------------------------- + +void showFIXEDFILEINFO(VS_FIXEDFILEINFO* pValue) +{ + ASSERT(VS_FFI_SIGNATURE == pValue->dwSignature); + ASSERT(VS_FFI_STRUCVERSION == pValue->dwStrucVersion); + + // dump the VS_FIXEDFILEINFO numbers + printf(" Signature: %08x\n" + , pValue->dwSignature +// , (VS_FFI_SIGNATURE == pValue->dwSignature) ? "" : " (expected " S_VS_FFI_SIGNATURE + ); + printf(" StrucVersion: %d.%d\n" + , pValue->dwStrucVersion >> 16, pValue->dwStrucVersion & 0xFFFF); + printf(" FileVersion: %d.%d.%d.%d\n" + , pValue->dwFileVersionMS >> 16, pValue->dwFileVersionMS & 0xFFFF + , pValue->dwFileVersionLS >> 16, pValue->dwFileVersionLS & 0xFFFF); + printf(" ProductVersion: %d.%d.%d.%d\n" + , pValue->dwProductVersionMS >> 16, pValue->dwProductVersionMS & 0xFFFF + , pValue->dwProductVersionLS >> 16, pValue->dwProductVersionLS & 0xFFFF); + printf(" FileFlagsMask: %s%x\n" + , pValue->dwFileFlagsMask ? "0x" : "" + , pValue->dwFileFlagsMask); + if (pValue->dwFileFlags) + printf(" FileFlags: 0x%x (%s)\n" + , pValue->dwFileFlags + , showFileFlags(pValue->dwFileFlags)); + else + printf(" FileFlags: 0\n"); + printf(" FileOS: %s\n" + , showFileOS(pValue->dwFileOS)); + printf(" FileType: %s%s\n" //FileSubtype + , showFileType(pValue->dwFileType) + , showFileSubtype(pValue->dwFileType, pValue->dwFileSubtype)); + printf(" FileDate: %x.%x\n" + , pValue->dwFileDateMS, pValue->dwFileDateLS); +} +// ---------------------------------------------------------------------------- + +struct VS_VERSIONINFO { + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[1]; + WORD Padding1[1]; + VS_FIXEDFILEINFO Value; + WORD Padding2[1]; + WORD Children[1]; +}; + +struct String { + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[1]; + WORD Padding[1]; + WORD Value[1]; +}; + +struct StringTable { + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[1]; + WORD Padding[1]; + String Children[1]; +}; + +struct StringFileInfo { + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[1]; + WORD Padding[1]; + StringTable Children[1]; +}; + +struct Var { + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[1]; + WORD Padding[1]; + DWORD Value[1]; +}; + +struct VarFileInfo { + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[1]; + WORD Padding[1]; + Var Children[1]; +}; + +// ---------------------------------------------------------------------------- + +int showVer(void* pVer, DWORD size) +{ + // Interpret the VS_VERSIONINFO header pseudo-struct + VS_VERSIONINFO* pVS = (VS_VERSIONINFO*)pVer; +#define roundoffs(a,b,r) (((byte*)(b) - (byte*)(a) + ((r)-1)) & ~((r)-1)) +#define roundpos(b, a, r) (((byte*)(a))+roundoffs(a,b,r)) +// byte* nEndRaw = roundpos((((byte*)pVer) + size), pVer, 4); +// byte* nEndNamed = roundpos((((byte*) pVS) + pVS->wLength), pVS, 4); +// ASSERT(nEndRaw == nEndNamed); // size reported from GetFileVersionInfoSize is much padded for some reason... + + ASSERT(!wcscmp(pVS->szKey, L"VS_VERSION_INFO")); + printf(" (type:%d)\n", pVS->wType); + byte* pVt = (byte*) &pVS->szKey[wcslen(pVS->szKey)+1]; + VS_FIXEDFILEINFO* pValue = (VS_FIXEDFILEINFO*) roundpos(pVt, pVS, 4); + if (pVS->wValueLength) { + showFIXEDFILEINFO(pValue); // Show the 'Value' element + } + // Iterate over the 'Children' elements of VS_VERSIONINFO (either StringFileInfo or VarFileInfo) + StringFileInfo* pSFI = (StringFileInfo*) roundpos(((byte*)pValue) + pVS->wValueLength, pValue, 4); + for ( ; ((byte*) pSFI) < (((byte*) pVS) + pVS->wLength); pSFI = (StringFileInfo*)roundpos((((byte*) pSFI) + pSFI->wLength), pSFI, 4)) { // StringFileInfo / VarFileInfo + if (!wcscmp(pSFI->szKey, L"StringFileInfo")) { + // The current child is a StringFileInfo element + ASSERT(1 == pSFI->wType); + ASSERT(!pSFI->wValueLength); + // Iterate through the StringTable elements of StringFileInfo + StringTable* pST = (StringTable*) roundpos(&pSFI->szKey[wcslen(pSFI->szKey)+1], pSFI, 4); + for ( ; ((byte*) pST) < (((byte*) pSFI) + pSFI->wLength); pST = (StringTable*)roundpos((((byte*) pST) + pST->wLength), pST, 4)) { + printf(" LangID: %S\n", pST->szKey); + ASSERT(!pST->wValueLength); + // Iterate through the String elements of StringTable + String* pS = (String*) roundpos(&pST->szKey[wcslen(pST->szKey)+1], pST, 4); + for ( ; ((byte*) pS) < (((byte*) pST) + pST->wLength); pS = (String*) roundpos((((byte*) pS) + pS->wLength), pS, 4)) { + wchar_t* psVal = (wchar_t*) roundpos(&pS->szKey[wcslen(pS->szKey)+1], pS, 4); + printf(" %-18S: %.*S\n", pS->szKey, pS->wValueLength, psVal); // print : + } + } + } + else { + // The current child is a VarFileInfo element + ASSERT(1 == pSFI->wType); // ?? it just seems to be this way... + VarFileInfo* pVFI = (VarFileInfo*) pSFI; + ASSERT(!wcscmp(pVFI->szKey, L"VarFileInfo")); + ASSERT(!pVFI->wValueLength); + // Iterate through the Var elements of VarFileInfo (there should be only one, but just in case...) + Var* pV = (Var*) roundpos(&pVFI->szKey[wcslen(pVFI->szKey)+1], pVFI, 4); + for ( ; ((byte*) pV) < (((byte*) pVFI) + pVFI->wLength); pV = (Var*)roundpos((((byte*) pV) + pV->wLength), pV, 4)) { + printf(" %S: ", pV->szKey); + // Iterate through the array of pairs of 16-bit language ID values that make up the standard 'Translation' VarFileInfo element. + WORD* pwV = (WORD*) roundpos(&pV->szKey[wcslen(pV->szKey)+1], pV, 4); + for (WORD* wpos = pwV ; ((byte*) wpos) < (((byte*) pwV) + pV->wValueLength); wpos+=2) { + printf("%04x%04x ", (int)*wpos++, (int)(*(wpos+1))); + } + printf("\n"); + } + } + } + ASSERT((byte*) pSFI == roundpos((((byte*) pVS) + pVS->wLength), pVS, 4)); + return pValue->dwFileVersionMS; // !!! return major version number +} +// ---------------------------------------------------------------------------- + +int wmain(int argc, wchar_t *argv[], wchar_t *envp[]) +// Prints out the version info of the file named in argv[1], and returns the major version number as the exit code +{ + if (argc <= 1) return usage(); + + wchar_t* sfnFile = argv[1]; + DWORD dummy; + DWORD size = GetFileVersionInfoSizeW(sfnFile, &dummy); + if (!size) return error(sfnFile); + void* pVer = _alloca(size); memset(pVer, 0, size); + if (0 == GetFileVersionInfoW(sfnFile, 0, size, pVer)) return error(sfnFile); +#if HDUMP + printf("VERSIONINFO dump for file \"%S\":\n", sfnFile); + hdump((byte*) pVer, size, 0, 0); +#endif // HDUMP + printf("VERSIONINFO for file \"%S\": ", sfnFile); + return showVer(pVer, size); +} +// ---------------------------------------------------------------------------- + diff --git a/libexec/ShowVer/ShowVer.dsp b/libexec/ShowVer/ShowVer.dsp new file mode 100644 index 0000000..444a0f9 --- /dev/null +++ b/libexec/ShowVer/ShowVer.dsp @@ -0,0 +1,112 @@ +# Microsoft Developer Studio Project File - Name="ShowVer" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ShowVer - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ShowVer.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ShowVer.mak" CFG="ShowVer - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ShowVer - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ShowVer - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ShowVer - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 Version.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "ShowVer - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 Version.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "ShowVer - Win32 Release" +# Name "ShowVer - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ShowVer.cpp +# End Source File +# Begin Source File + +SOURCE=.\ShowVer.rc +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/libexec/ShowVer/ShowVer.rc b/libexec/ShowVer/ShowVer.rc new file mode 100644 index 0000000..1d68c8b --- /dev/null +++ b/libexec/ShowVer/ShowVer.rc @@ -0,0 +1,110 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "AuthorName", "Ted Peck\0" + VALUE "Comments", "\0" + VALUE "CompanyName", "\0" + VALUE "FileDescription", "ShowVer console app for VersionInfo display\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "ShowVer\0" + VALUE "LegalCopyright", "Copyright © 2002\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "ShowVer.exe\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "ShowVer\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libexec/UnRAR.exe b/libexec/UnRAR.exe new file mode 100644 index 0000000..46c0fdf Binary files /dev/null and b/libexec/UnRAR.exe differ diff --git a/libexec/UnRAR/license.txt b/libexec/UnRAR/license.txt new file mode 100644 index 0000000..afbdc87 --- /dev/null +++ b/libexec/UnRAR/license.txt @@ -0,0 +1,34 @@ + ****** ***** ****** UnRAR - free utility for RAR archives + ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ****** ******* ****** License for use and distribution of + ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ** ** ** ** ** ** FREEWARE version + ~~~~~~~~~~~~~~~~ + + The UnRAR utility is freeware. This means: + + 1. All copyrights to RAR and the utility UnRAR are exclusively + owned by the author - Alexander Roshal. + + 2. The UnRAR utility may be freely distributed. It is allowed + to distribute UnRAR inside of other software packages. + + 3. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED "AS IS". + NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT + YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, + DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING + OR MISUSING THIS SOFTWARE. + + 4. Neither RAR binary code, WinRAR binary code, UnRAR source or UnRAR + binary code may be used or reverse engineered to re-create the RAR + compression algorithm, which is proprietary, without written + permission of the author. + + 5. If you don't agree with terms of the license you must remove + UnRAR files from your storage devices and cease to use the + utility. + + Thank you for your interest in RAR and UnRAR. + + + Alexander L. Roshal \ No newline at end of file diff --git a/libexec/gitlog-to-deblog.rb b/libexec/gitlog-to-deblog.rb deleted file mode 100755 index c404462..0000000 --- a/libexec/gitlog-to-deblog.rb +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/ruby -require 'erb' - -# Determines package name from the origin url on github. It's hackish, but it -# works (mostly). -def pkgname - # originurl = `basename $(git config --get remote.origin.url)`.strip - pkgname = `basename $(git config --get remote.origin.url) .git | tr '\n' ' '` - # _, pkgname = originurl.match(/\/([a-z0-9\-_]+).git/i).to_a - pkgname -end - -# Accepts a hash of git log data and returns a properly formatted debian -# changelog entry. -def debchangelog(logdata) - template = <<-EOF -<%=PKGNAME%> (<%=logdata[:tag]%>) unstable; urgency=low - - * <%=logdata[:subj]%> - - -- <%=logdata[:name]%> <%=logdata[:date]%> - -EOF - ERB.new(template).result(binding) -end - -# Checks to see if the repository has any tags already. -def repo_has_tag? - `git describe --tags 2>&1` - return ($? == 0)? true : false -end - -# If the repository has no tags, we need to make one so we can get some kind -# of versioning number for the changelog. -def make_temporary_tag - firstcommit = `git log --format=%H | tail -1`.strip - `git tag #{TEMPTAG} #{firstcommit}` -end - -# Removes the tag we added if the repo had no tags. -def cleanup_temporary_tag - `git tag -d #{TEMPTAG}` -end - -# Removes jenkins build tags (if they exist) -def remove_jenkins_tags - IO.popen("git tag -l 'jenkins-*'").readlines.each do |tag| - `git tag -d #{tag}` - end -end - -# Get the name of this repository -PKGNAME = pkgname - -# Name for the temporary tag (only used if the repository has no tags) -TEMPTAG = 'GOPSI' -#TEMPTAG = pkgname - -remove_jenkins_tags - -if repo_has_tag? - dotagcleanup = false -else - dotagcleanup = true - make_temporary_tag -end - -# Loop through the git log output and grab four lines at a time to parse. -gitlogcmd = %{git log --pretty=format:'hash: %H%nname: %aN <%aE>%ndate: %cD%nsubj: %s'} -IO.popen(gitlogcmd).readlines.each_slice(4) do |chunk| - - temphash = {} - - # split each line on the first colon and use what's on the left as the - # symbols within the hash - chunk.map { |line| line.split(/: /,2) }.each do |type, data| - temphash[type.to_sym] = data.strip - end - - # dig up the most recent tag which contains the commit - temphash[:tag] = `git describe --tags #{temphash[:hash]} 2>/dev/null`.strip - if $? != 0 - dotagcleanup = true - make_temporary_tag - temphash[:tag] = `git describe --tags #{temphash[:hash]}`.strip - end - - puts debchangelog(temphash) -end - -# If we added a temporary tag, let's remove it -cleanup_temporary_tag \ No newline at end of file diff --git a/libexec/inifile.exe b/libexec/inifile.exe new file mode 100644 index 0000000..d9cb911 Binary files /dev/null and b/libexec/inifile.exe differ diff --git a/libexec/inifile/GetOutput.txt b/libexec/inifile/GetOutput.txt new file mode 100644 index 0000000..ca71c6a --- /dev/null +++ b/libexec/inifile/GetOutput.txt @@ -0,0 +1,42 @@ +To read statements from an INI file you have to capture the output +of INIfile.exe, which can be done either by ... + ++ redirecting the output into a temporary file (all Windows versions), ++ using a FOR /F construct (requires Win2000, XP ++) + +Assuming you have the INI file "My.ini" in the current directory, +with a section [Profile], and the item "Name": + + [Profile] + Name=John Doe + ++++ Example with output redirection: + + INIfile.exe My.ini [Profile] Name > temp.bat + call temp.bat + + INIfile.exe outputs the statement: SET Name=John Doe + which is redirected and written into "temp.bat", + which is CALLed to run the SET statement. + + Note that this method produces a temporary file that you have + to delete later. + + ++++ Example with FOR construct (asssuming in a batch file): + + for /f "delims=" %%a in ('INIfile.exe My.ini [Profile] Name') do %%a + + This will capture and run the output line(s) from the command + which is enclosed in single(!) quote marks. + Double quote marks may be used within the command, if necessary. + For details see FOR /? at the command prompt. + + +In any case the variable %Name% will hold the string that was assigend +in the INI file. Note that the variable may be empty. + +*** + + + diff --git a/libexec/inifile/inifile.txt b/libexec/inifile/inifile.txt new file mode 100644 index 0000000..7fde9b5 --- /dev/null +++ b/libexec/inifile/inifile.txt @@ -0,0 +1,121 @@ +INIFILE - 32 bit tool, Ver 1.6 (c) 2006-2009, Horst Schaeffer +------------------------------------------------------------- + +This tool handles Windows type INI files with section names in square brackets, +and assignments of the form: item=string (case ignored for section and item names). +The INI file must exist! +This program uses the functions supplied by the Microsoft Windows API. + +++++ Change or add an assignment + +Syntax: INIFILE inifileName [section] item=string + +Example: INIFILE c:\some\where\program.ini [Profile] Name=John + + The string is taken up to the end of the line. + Optionally, the (entire!) assignment may be enclosed in (double) quote marks + (in case there are redirection symbols in it). + In any case the item name as well as the string will be taken without leading + and trailing spaces. + + Example: INIFILE c:\some\where\program.ini [Profile] "Name = John" + + If the item is not found, a new line will be added. + If the section is not found it will be generated. + + +++++ Remove assignment + +To remove an item: omit the string (the equal sign is mandatory) + +Syntax: INIFILE inifileName [section] item= + +Example: INIFILE c:\some\where\program.ini [Profile] Name= + + The complete item (not just the assigned string) is removed. + If there are no items left, the section will NOT be removed. + No error will be reported (Errorlevel), if the item does not exist. + +++++ Clear assignment + +If you want to produce an empty assignment without removing it, +use two equal signs. + +Syntax: INIFILE inifileName [section] item== + + +++++ Remove entire section + +To remove a section the security option /REMOVE (case ignored) +is required. No error reported, if the section does not exist. + +Syntax: INIFILE inifileName [section] /remove + + +++++ Get an assignment + +Syntax: INIFILE inifileName [section] item + + (Note that an additional equal sign would remove the item!!!) + + The program will generate a SET statement, and send it to STDOUT. + If you want to produce an environmental variable, redirect the output + to a temporary batch file, and execute it (see also: GetOutput.txt) + Note: Character set is ANSI (Windows), not OEM (DOS). + + Example: + INIfile c:\some\where\program.ini [Profile] Name > temp.bat + call temp.bat + + If the assignment could not be found for any reason, + the SET statement will be empty (set var=), which clears the variable. + + Note: This method cannot be used when equal signs or redirection + symbols are expected in the assigned string. + +++++ Get all assignments of a section + +Syntax: INIFILE inifileName [section] + + SET statements will be generated for all items in the section. + + +++++ Errorlevels + + Errorlevel > 0 indicates an error (message to STDERR) + 0 done + 1 INI file does not exist + 2 Section name in square brackets was not given + 255 No INI file specified or help requested (/?) + +The INI file operations are done through the Windows API which handles spaces, +upper/lower case etc.. There may be a size limit or a problem with long file +names in older Windows versions. Please test. + +Note: In case you have used my old DOS program "INIFILE.COM" make sure that this new +version is found through your PATH assignment (or use the command "inifile.exe"). + +++++ History + +version 1.6, 27 May 2009: Compiled with PB 4.30 +version 1.5, 29 Sep 2006: Equal signs allowed in assigned string (though not recommended) +version 1.4, 02 Aug 2006: Added function: clear assignment without removing +version 1.1, 12 Feb 2006: Added: read all items of section +version 1.0, 05 Feb 2006 + +++++ Disclaimer, Copyright + + This program is distributed as "freeware", copyright reserved by the + author. There are no warranties of any kind, nor any liability by + the author. Users accept full responsibility for the use they make + of the software and for any damage caused thereby. + + Source available: http://www.horstmuc.de/source/inifile16.zip + + Contact the author: + + mailto:horst.schaeffer@gmx.net + http://www.horstmuc.de/ + + +*** 27 May 2009 \ No newline at end of file diff --git a/libexec/innounp.exe b/libexec/innounp.exe new file mode 100644 index 0000000..1a21fbe Binary files /dev/null and b/libexec/innounp.exe differ diff --git a/libexec/innounp/innounp.htm b/libexec/innounp/innounp.htm new file mode 100644 index 0000000..9039460 --- /dev/null +++ b/libexec/innounp/innounp.htm @@ -0,0 +1,626 @@ + + +innounp, the Inno Setup Unpacker + + + + + +

innounp, the Inno Setup Unpacker
+Version 0.39
+Supports Inno Setup versions 2.0.8 through 5.5.3

+

Inno Setup is a popular program +for making software installations. Unfortunately, there is no official unpacker - the +only method of getting the files out of the self-extracting executable +is to run it. One piece of software that addresses this issue is Sergei +Wanin's InstallExplorer, +a plug-in for the FAR Manager that unpacks +several types of installations, including Inno Setup (IS). But since it is not updated in a +timely fashion, and so does not support the latest IS most of the time, this program was born. +The advantages over InstallExplorer are:

+
    +
  • Innounp is open source and based on IS source. Therefore, it is more likely +to support future IS versions.
  • +
  • It recovers portions of the installation script (.iss file), including the registry +changes and the compiled Innerfuse/RemObjects Pascal Script, if available.
  • +
+

If you want to report a bug, request a feature, or discuss anything else related +to the program, please write to the forum.

+ +

Both the source and the executable packages are compressed with +WinRar. While the full-featured packer is shareware, +the UnRar utility that can only extract files is free. And there are lots of free +third-party programs that unpack rar just fine, e.g. 7-Zip.

+

As a bonus, a simple unpacker for Setup +Factory installations is available on the download page. It is ripped from +the SynCE project.

+

Usage

+

Innounp is a console application, and it uses command-line options to find out +what to do. For a more human-friendly interface utilizing FAR or Total Commander as +a front-end see the MultiArc section below. Windows Explorer fans: +nullz has made +some .reg scripts to add innounp into the right-click menu and Richard Santaella crafted a +graphical wrapper for innounp (get it on the download page).

+
innounp [command] [options] <setup.exe or setup.0> [@filelist] [filemask ...]
+Commands:
+  (no)   display general installation info
+  -v     verbosely list the files (with sizes and timestamps)
+  -x     extract the files from the installation (to the current directory, also see -d)
+  -e     extract files without paths
+  -t     test files for integrity
+Options:
+  -b     batch (non-interactive) mode - will not prompt for password or disk changes
+  -q     do not indicate progress while extracting
+  -m     process internal embedded files (such as license and uninstall.exe)
+  -pPASS decrypt the installation with a password
+  -dDIR  extract the files into DIR (can be absolute or relative path)
+  -cDIR  specifies that DIR is the current directory in the installation
+  -n     don't attempt to unpack new versions
+  -fFILE same as -p but reads the password from FILE
+  -a     process all copies of duplicate files
+  -y     assume Yes on all queries (e.g. overwrite files)  
+
+

If an installation has setup.0 (it is made without using SetupLdr), run +innounp on setup.0 instead of setup.exe.

+

To extract all files from a specific directory, use dirname\*.*, not +just dirname.

+

By default all files are extracted to the current directory. Use -d to +override this behaviour. For example, -dUnpacked will create a directory named +Unpacked inside the current directory and put the extracted files there.

+

The -c option is a little more tricky to explain. Suppose you opened an installation +in a file manager and browsed to {app}\subdir\program.exe. Now if you copied +program.exe to another location, the entire directory tree ({app}\subdir\) +would be created and program.exe would be extracted there. -c notifies innounp +that you are only interested in paths from the current directory and below, so that your +file, program.exe, is extracted right where you intended to copy it, not several +directory levels deeper. Note that in order to avoid confusion, files must still be +specified by their full path names inside the installation.

+

Note that an installation can contain several identical files (possibly under different names). Inno Setup +stores only one copy of such files, and by default innounp will also unpack one file. If you want to have +all files that could ever be installed anywhere, regardless of how many identical files this may get you, +-a option will do it.

+

If -m is specified, the file listing includes embedded\CompiledCode.bin +which is the code made by the RemObjects Pascal Script compiler. It is possible to disassemble +it using the ifps3_disasm.rar package on the download page. The result is not very +readable though since it uses the basic 'disassembler' from IFPS3. Anyone wants to write a +decompiler?

+ +

How to report bugs

+

OK, I know innounp is far from being perfect, but it is my intention to make +the program usable. User feedback is a great way to achieve this. Here's what you should +do if you find a bug and want it fixed.

+

Tell me what's wrong with innounp. If you encountered incorrect behaviour, +say what you think it should do and what it actually does. If it crashed or gave +an error message, say what did that - innounp, Windows, FAR, etc, and include +the details.

+

Describe the exact steps necessary to reproduce the bug. Say what are the +preconditions. Is the bug specific to some system settings? To a setup file you +have? (include the problem part of the installation script or a link to the compiled +setup, if it is small enough) To an IS version? To something else? Or does the +bug occur regardless of these things?

+

Once you have the bug report ready, post it to the forum. Remember, if I can't +reproduce the bug using the description you gave, the chances that it will be +fixed fall dramatically.

+

If the above guidelines were not obvious for you, I suggest that you read the +following articles.

+

How to Ask +Questions the Smart Way by Eric Raymond
+How to Report +Bugs Effectively by Simon Tatham

+ +

What's new / History

+

0.39 (2013.07.12)

+
    +
  • Fixed CRC32 calculation during unpacking (regression bug).
  • +
+

0.38 (2013.02.01)

+
    +
  • Added InstallDelete and UninstallDelete sections to reconstructed script.
  • +
  • Added some more values to Setup section of reconstructed script.
  • +
  • Several minor reconstructed script improvements.
  • +
+

0.37 (2012.06.02)

+
    +
  • Added support for IS 5.5.0.
  • +
  • Fixed problem with reading of large files.
  • +
  • Added some more values to reconstructed script.
  • +
  • Improved FAR MultiArc settings.
  • +
+

0.36 (2011.06.01)

+
    +
  • Fixed support for IS 5.4.2.
  • +
  • Fixed issue with '{' symbol in file names.
  • +
+

0.35 (2010.10.01)

+
    +
  • Added support for IS 5.2.5 (wasn't released, but such installers can be found).
  • +
  • Added command to test files for integrity.
  • +
+

0.34 (2010.09.16)

+
    +
  • Less technical text in some error messages.
  • +
  • Added dump of password hash to reconstructed script.
  • +
  • Added some more values to reconstructed script.
  • +
+

0.33 (2010.07.05)

+
    +
  • Fixed encoding for custom messages in reconstructed script.
  • +
  • Fixed several parameters in [LangOptions] section.
  • +
  • Fixed language names in *.isl files for Unicode-based installers.
  • +
  • Added support for legacy IS versions 2.0.8 - 2.0.10.
  • +
+

0.32 (2010.06.14)

+
    +
  • Added support for IS versions 5.3.10 (both ANSI and Unicode).
  • +
  • Added support for INI section in reconstructed script.
  • +
+

0.31 (2010.04.19)

+
    +
  • Fixed issue with endless decompression loop on incompatible files.
  • +
+

0.30 (2010.04.12)

+
    +
  • Fixed issue with password processing for Unicode versions.
  • +
  • Added support for IS versions 5.3.9 (both ANSI and Unicode).
  • +
  • Added support for LZMA2 compression, introduced in 5.3.9.
  • +
+

0.29 (2010.02.19)

+
    +
  • Added support for IS versions 5.3.8 (both ANSI and Unicode).
  • +
+

0.28 (2010.01.14)

+
    +
  • Added support for IS versions 5.3.7 (both ANSI and Unicode).
  • +
  • Added support for legacy IS versions 2.0.11 - 2.0.17.
  • +
  • Fixed renaming of duplicate files. If we do not use -a then don't append numbers to names
    +(this switch does not affect different files with same name, only duplicates with same content).
  • +
+

0.27 (2009.12.04)

+
    +
  • Yet another tuning for file mask processing.
  • +
  • Added overwrite prompt for files extraction (and option for auto-overwrite).
  • +
  • Several tweaks to reconstructed script.
  • +
+

0.26 (2009.11.30)

+
    +
  • Added manifest resource to resolve Vista/Win7 UAC issue.
  • +
  • Added restored %n formatter to custom messages.
  • +
  • Added default OutputBaseFilename value if one from header is empty.
  • +
+

0.25 (2009.11.26)

+
    +
  • Added support fro [Dirs] section in reconstructed script.
  • +
  • Moved version parameter in script to comment (since it is not original IS parameter).
  • +
  • Fixed ArchitecturesInstallIn64BitMode and ArchitecturesAllowed flags in script.
  • +
  • Fixed file mask processing in some cases.
  • +
+

0.24 (2009.11.20)

+
    +
  • Added support for IS versions 5.3.6 (both ANSI and Unicode).
  • +
  • Added version information resource.
  • +
  • Fixed extraction of multiple files with same name.
  • +
+

0.23 (2009.09.25)

+
    +
  • Added support for IS versions 5.3.5 (both ANSI and Unicode).
  • +
  • Added Inno Setup version info to reconstructed install script.
  • +
+

0.22 (2009.08.24)

+
    +
  • Added support for Unicode versions.
  • +
  • Added support for IS versions 5.3.0 - 5.3.4 (both ANSI and Unicode).
  • +
  • Fixed rare issue with double backslashes in file path.
  • +
+

0.21 (2009.04.24)

+
    +
  • Supports legacy IS versions 2.0.18 - 2.0.19
  • +
+

0.20 (2008.05.23)

+
    +
  • Supports IS up to version 5.2.3
  • +
  • Several bugs fixed.
  • +
+

0.19 (2007.02.23)

+
    +
  • Supports IS up to version 5.1.10
  • +
  • Fixed wrong representation of Unicode characters in LanguageName.
  • +
  • Another fix to the handling of duplicate file names.
  • +
  • New option -a to extract all copies of duplicate files.
  • +
+

0.18 (2006.11.23)

+
    +
  • The reconstructed script now includes the [Types], [CustomMessages], and [Languages] sections.
  • +
  • ROPS disassembler updated to support the latest build of ROPS.
  • +
  • New option -f to read the password from file. This way it can include any special characters.
    +Be sure to save the file in the correct character encoding as no translations are applied.
  • +
  • Fixed the bug that caused the file timestamps to be inconsistently reported and applied (UTC vs. local).
  • +
  • Updated the decompression libraries: zlib to version 1.2.3, bzip2 to version 1.03, and LZMA to version 4.43 +(optimized for speed).
  • +
+

0.17 (2005.08.31)

+
    +
  • Supports IS up to version 5.1.5.
  • +
  • Supports Martijn Laan's My Inno Setup Extensions 3.0.6.1 (by request).
  • +
  • The Types parameter is now space-separated, as required by the IS script specification.
  • +
+

0.16 (2005.04.30)

+
    +
  • Supports IS up to 5.1.2-beta.
  • +
  • Innounp will try to unpack new versions of IS to handle the cases when the +binary format is compatible with one of the previous versions. Use -n +to disable this attempt.
  • +
+

0.15 (2005.03.08)

+
    +
  • Supports IS up to 5.1.0-beta.
  • +
  • The old bug that prevented innounp from working properly with {reg:...} constants and +the like has got another fix.
  • +
  • Preliminary support for the 64-bit extensions that appeared in IS 5.1.0.
  • +
+

0.14 (2004.10.14)

+
    +
  • Supports IS up to 5.0.4-beta.
  • +
  • It is now possible to specify the destination directory to extract files into using +the -d option. This directory will be created if necessary.
  • +
  • New option -c specifies the current directory inside an installation and +prevents the creation of the upper-level directories. MultiArc settings are updated +accordingly.
  • +
  • The old -c command is removed. To get the compiled Pascal script, use +-m and extract it like a normal file.
  • +
+

0.13 (2004.08.26)

+
    +
  • Supports IS up to 5.0.3-beta.
  • +
  • Supports the Components and Tasks sections.
  • +
+

0.12 (2004.07.28)

+
    +
  • Supports IS up to 5.0.0-beta.
  • +
  • Improved processing of big installations with many files.
  • +
  • Innounp now supports a certain level of user interaction - it prompts the user +for password and disk changes as necessary. To switch this functionality off (e.g. in +batch mode), use the -b option.
  • +
  • If no command is specified, innounp displays a brief summary of the specified +installation. The old -i command is removed. To get the setup script, extract it +like a normal file.
  • +
+

0.11 (2004.05.04)

+
    +
  • Supports IS 4.2.2.
  • +
  • Supports ArcFour encryption. Use the -p switch to specify a password +if files are encrypted
  • +
+

0.10 (2004.04.26)

+
    +
  • Fixed (again): filenames containing invalid characters could not be specified +on the command line or in a list file.
  • +
+

0.09 (2004.04.22)

+
    +
  • Fixed (again): invalid characters in filenames (such as ':' and '|') made innounp crash.
  • +
  • Updated TC MultiArc settings.
  • +
+

0.08 (2004.04.14)

+
    +
  • Added support for IS versions up to 4.2.1.
  • +
  • Added MultiArc settings for Total Commander (thanks to Gnozal).
  • +
  • Fixed a bug in MultiArc settings that prevented shells from displaying file +dates and times (thanks to Maxim Ryazanov).
  • +
  • The reconstructed setup script (.iss) is now included together with the 'normal' files. +Using -m option it's possible to view/extract other internal files in the same way.
  • +
+

0.07 (2004.03.16)

+
    +
  • Multiple files with the same name are not overwritten now, instead they are appended +with numbers.
  • +
  • -c command extracts the compiled Innerfuse Pascal Script code to a file. +It can then be 'disassembled' with a separate tool. Get one on the download page.
  • +
  • The output of -i command now looks more like .iss script. +More data is included.
  • +
+

0.06 (2004.03.11)

+
    +
  • Added support for IS versions 3.0.0 - 4.0.0.
  • +
  • Supports installations that were not packaged into a single exe using SetupLdr (these +can be identified by the presence of setup.0 which is appended to +setup.exe in packaged installations).
  • +
  • -i command displays registry changes made by an installation.
  • +
  • Supports (displays and reads from filelists) filenames with national +characters (single-byte character encodings only, Unicode/MBCS was not tested). The correct +code page must be set in Windows for this function to work properly.
  • +
  • [fix] File dates and times were not set during extraction.
  • +
+

0.05 (2004.03.09)

+
    +
  • Improved batch processing. Now it's possible to browse and extract IS installations +in FAR using the supplied settings for the standard MultiArc plug-in.
  • +
  • Removed isbunzip.dll. Bzip2 library is linked statically.
  • +
+

0.04 (2004.02.27)

+
    +
  • Initial release. Supports IS versions 4.0.1 - 4.1.8.
  • +
+ +

MultiArc settings

+

Unless you are a die-hard fan of command line, you may like the idea of working +with IS installations like with conventional archives in a file manager. Right now +two programs support this: FAR and Total Commander. Below are the instructions +how to integrate innounp into each.

+

FAR

+

Copy innounp.exe to a directory in your PATH and edit your +FAR\Plugins\MultiArc\Formats\Custom.ini file. There are two alternate +settings differing in several aspects and each having its own pros and cons. Try +the recommended setting first, if it does not work well for you, try the other +setting or even combine them.

+

Co-operation with InstallExplorer

+

If you have InstallExplorer installed (or another plug-in that handles IS, +but you will need to adjust the settings accordingly), you might want to let it +process all the other types of installations but keep IS installations for innounp. +FAR does not provide a means of customizing the plug-in call order; however, an +empirical study has shown that it loads plug-ins and applies them to files in +lexical order. So the solution is to rename InstallExplorer's dll file from 6InstExpl.dll +to e.g. zInstExpl.dll (and restart FAR).

+

FAR: recommended setting

+
[InnoSetup5]
+TypeName=InnoSetup5
+ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 35 2E
+IDOnly=1
+List=innounp -v -m
+Errorlevel=1
+Start="^---------"
+End="^---------"
+Format0="/^\s+(?P<size>\d+)\s+(?P<mYear>\d+)\.(?P<mMonth>\d+)\.(?P<mDay>\d+)\s+(?P<mHour>\d+):(?P<mMin>\d+)\s+(?P<name>.*)$/i"
+Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
+ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
+Test=innounp -t -m %%A
+AllFilesMask="*.*"
+
+[InnoSetup4]
+TypeName=InnoSetup4
+ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 34 2E
+IDOnly=1
+List="innounp -v -m"
+Errorlevel=1
+Start="^---------"
+End="^---------"
+Format0="/^\s+(?P<size>\d+)\s+(?P<mYear>\d+)\.(?P<mMonth>\d+)\.(?P<mDay>\d+)\s+(?P<mHour>\d+):(?P<mMin>\d+)\s+(?P<name>.*)$/i"
+Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
+ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
+Test=innounp -t -m %%A
+AllFilesMask="*.*"
+
+[InnoSetup3]
+TypeName=InnoSetup3
+ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 33 2E
+IDOnly=1
+List="innounp -v -m"
+Errorlevel=1
+Start="^---------"
+End="^---------"
+Format0="/^\s+(?P<size>\d+)\s+(?P<mYear>\d+)\.(?P<mMonth>\d+)\.(?P<mDay>\d+)\s+(?P<mHour>\d+):(?P<mMin>\d+)\s+(?P<name>.*)$/i"
+Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
+ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
+Test=innounp -t -m %%A
+AllFilesMask="*.*"
+
+[InnoSetup2]
+TypeName=InnoSetup2
+ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 32 2E
+IDOnly=1
+List="innounp -v -m"
+Errorlevel=1
+Start="^---------"
+End="^---------"
+Format0="/^\s+(?P<size>\d+)\s+(?P<mYear>\d+)\.(?P<mMonth>\d+)\.(?P<mDay>\d+)\s+(?P<mHour>\d+):(?P<mMin>\d+)\s+(?P<name>.*)$/i"
+Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
+ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
+Test=innounp -t -m %%A
+AllFilesMask="*.*"
+
+

FAR: alternate setting

+Will not work for IS 5.1.5 and up because new versions no longer have this signature. +
+[InnoSetup]
+TypeName=InnoSetup
+ID=49 6E 6E 6F
+IDPos=48
+Extension=exe
+List="innounp -v -m"
+Errorlevel=1
+Start="^---------"
+End="^---------"
+Format0="zzzzzzzzzz  yyyy tt dd hh:mm  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
+Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
+ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
+AllFilesMask="*.*"
+

Total Commander

+

Will not work for IS 5.1.5 and up because new versions no longer have this signature. I guess the +version-specific settings from above have to be cloned.

+

Configuration made up by Gnozal and Maxwish and posted on +TC forum. Change the path below +to where you have innounp installed and add this to your MultiArc.ini. Note that +MultiArc is not included in the default TC installation, instead it is available as a +separate download from Siarzhuk Zharski's web site. +Refer to the help file for information on any additional configuration necessary.

+
[InnoSetup]
+Description="InnoSetup"
+Archiver=C:\PROGRAM FILES\WINCMD\WCXPlugin\MultiArc\innounp.exe
+Extension=exe
+ID=49 6E 6E 6F
+IDPos=48
+Start="^--------------------------------------"
+End="^--------------------------------------"
+Format0="zzzzzzzzzz  yyyy.tt.dd hh:mm  nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
+List=%P -v -m %AQ
+Extract=%P -e -m -c%R %AQ @%LQ
+ExtractWithPath=%P -x -m -c%R %AQ @%LQ
+IgnoreErrors=0
+SkipEmpty=0
+SkipDirsInFileList=0
+SearchForUglyDirs=0
+BatchUnpack=1
+UnixPath=0
+AskMode=0
+SkipLIST=1
+Debug=0
+ +

Copyrights and licensing

+

Copyright © 2004-2013 QuickeneR, 2009-2013 Ariman
+This program is licensed under the terms of the +GNU General Public License (GPL). A copy of the license is included with the source files.
+If you distribute innounp on the WWW, please put a link to its home page, +http://innounp.sourceforge.net

+

Over 90% of code is ripped from Inno Setup which is Copyright © 1997-2010 Jordan +Russell. All rights reserved.
+Portions Copyright © 2000-2006 Martijn Laan. All rights reserved.
+See http://www.jrsoftware.org for details.

+

Contains zlib code, Copyright © 1995-2005 Jean-loup Gailly and Mark Adler.

+

Contains bzip2 code, Copyright © 1996-2009 Julian R Seward. All rights reserved.

+

Contains LZMA code, Copyright © 1999-2009 Igor Pavlov.

+
+

Innerfuse Pascal Script is Copyright © 2000-2004 by Carlo Kok, Innerfuse.

+

StripReloc is Copyright © 1999-2005 Jordan Russell, www.jrsoftware.org

+
+SourceForge.net + + \ No newline at end of file diff --git a/sample/32bit/installer/license/CLIENT_DATA/delsub32.ins b/sample/32bit/installer/license/CLIENT_DATA/delsub32.ins deleted file mode 100644 index b83987c..0000000 --- a/sample/32bit/installer/license/CLIENT_DATA/delsub32.ins +++ /dev/null @@ -1,115 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram$ = $InstallDir$ + "\" + $UninstallProg$ -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") - Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ - if FileExists($UninstallProgramOld$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old - sub_check_exitcode - endif -endif -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit/installer/license/CLIENT_DATA/login.ins b/sample/32bit/installer/license/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/32bit/installer/license/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/32bit/installer/license/CLIENT_DATA/opsi-PN.ini b/sample/32bit/installer/license/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 41585d5..0000000 --- a/sample/32bit/installer/license/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,5 +0,0 @@ -[X86] - -[COMMON] -PN=name -VERSION=version diff --git a/sample/32bit/installer/license/CLIENT_DATA/setup32.ins b/sample/32bit/installer/license/CLIENT_DATA/setup32.ins deleted file mode 100644 index dc4f738..0000000 --- a/sample/32bit/installer/license/CLIENT_DATA/setup32.ins +++ /dev/null @@ -1,231 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError "No Space" - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" - endif - - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit/installer/license/CLIENT_DATA/uninstall32.ins b/sample/32bit/installer/license/CLIENT_DATA/uninstall32.ins deleted file mode 100644 index b012f35..0000000 --- a/sample/32bit/installer/license/CLIENT_DATA/uninstall32.ins +++ /dev/null @@ -1,73 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - diff --git a/sample/32bit/installer/license/OPSI/changelog.txt b/sample/32bit/installer/license/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/32bit/installer/license/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/32bit/installer/license/OPSI/control b/sample/32bit/installer/license/OPSI/control deleted file mode 100644 index 12ec9ba..0000000 --- a/sample/32bit/installer/license/OPSI/control +++ /dev/null @@ -1,30 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: true -productClasses: -setupScript: setup32.ins -uninstallScript: uninstall32.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/32bit/installer/license/OPSI/postinst b/sample/32bit/installer/license/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/32bit/installer/license/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/32bit/installer/license/OPSI/preinst b/sample/32bit/installer/license/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/32bit/installer/license/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/32bit/installer/license/builder-product.cfg b/sample/32bit/installer/license/builder-product.cfg deleted file mode 100644 index f10115d..0000000 --- a/sample/32bit/installer/license/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one UninstallProg - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 UninstallProg's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="UninstallProg64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/32bit/installer/nolicense/CLIENT_DATA/delsub32.ins b/sample/32bit/installer/nolicense/CLIENT_DATA/delsub32.ins deleted file mode 100644 index b83987c..0000000 --- a/sample/32bit/installer/nolicense/CLIENT_DATA/delsub32.ins +++ /dev/null @@ -1,115 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram$ = $InstallDir$ + "\" + $UninstallProg$ -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") - Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ - if FileExists($UninstallProgramOld$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old - sub_check_exitcode - endif -endif -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit/installer/nolicense/CLIENT_DATA/login.ins b/sample/32bit/installer/nolicense/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/32bit/installer/nolicense/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/32bit/installer/nolicense/CLIENT_DATA/opsi-PN.ini b/sample/32bit/installer/nolicense/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 41585d5..0000000 --- a/sample/32bit/installer/nolicense/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,5 +0,0 @@ -[X86] - -[COMMON] -PN=name -VERSION=version diff --git a/sample/32bit/installer/nolicense/CLIENT_DATA/setup32.ins b/sample/32bit/installer/nolicense/CLIENT_DATA/setup32.ins deleted file mode 100644 index df49a0b..0000000 --- a/sample/32bit/installer/nolicense/CLIENT_DATA/setup32.ins +++ /dev/null @@ -1,183 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError "No Space" - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" - endif - - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit/installer/nolicense/CLIENT_DATA/uninstall32.ins b/sample/32bit/installer/nolicense/CLIENT_DATA/uninstall32.ins deleted file mode 100644 index c66d114..0000000 --- a/sample/32bit/installer/nolicense/CLIENT_DATA/uninstall32.ins +++ /dev/null @@ -1,50 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles32Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" -endif - diff --git a/sample/32bit/installer/nolicense/OPSI/changelog.txt b/sample/32bit/installer/nolicense/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/32bit/installer/nolicense/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/32bit/installer/nolicense/OPSI/control b/sample/32bit/installer/nolicense/OPSI/control deleted file mode 100644 index 48b5f43..0000000 --- a/sample/32bit/installer/nolicense/OPSI/control +++ /dev/null @@ -1,30 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: False -productClasses: -setupScript: setup32.ins -uninstallScript: uninstall32.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/32bit/installer/nolicense/OPSI/postinst b/sample/32bit/installer/nolicense/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/32bit/installer/nolicense/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/32bit/installer/nolicense/OPSI/preinst b/sample/32bit/installer/nolicense/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/32bit/installer/nolicense/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/32bit/installer/nolicense/Testing.txt b/sample/32bit/installer/nolicense/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/32bit/installer/nolicense/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/32bit/installer/nolicense/builder-product.cfg b/sample/32bit/installer/nolicense/builder-product.cfg deleted file mode 100644 index f10115d..0000000 --- a/sample/32bit/installer/nolicense/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one UninstallProg - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 UninstallProg's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="UninstallProg64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/32bit/installer/nolicense/builder-targets-cb.sh b/sample/32bit/installer/nolicense/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/32bit/installer/nolicense/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/32bit/msi/license/CLIENT_DATA/delsub32.ins b/sample/32bit/msi/license/CLIENT_DATA/delsub32.ins deleted file mode 100644 index 6f1e92a..0000000 --- a/sample/32bit/msi/license/CLIENT_DATA/delsub32.ins +++ /dev/null @@ -1,95 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif -endif -if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit/msi/license/CLIENT_DATA/login.ins b/sample/32bit/msi/license/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/32bit/msi/license/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/32bit/msi/license/CLIENT_DATA/opsi-PN.ini b/sample/32bit/msi/license/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/32bit/msi/license/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/32bit/msi/license/CLIENT_DATA/setup32.ins b/sample/32bit/msi/license/CLIENT_DATA/setup32.ins deleted file mode 100644 index 7bc742e..0000000 --- a/sample/32bit/msi/license/CLIENT_DATA/setup32.ins +++ /dev/null @@ -1,230 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError "No Space" - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" - endif - - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit/msi/license/CLIENT_DATA/uninstall32.ins b/sample/32bit/msi/license/CLIENT_DATA/uninstall32.ins deleted file mode 100644 index 9ed754e..0000000 --- a/sample/32bit/msi/license/CLIENT_DATA/uninstall32.ins +++ /dev/null @@ -1,72 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - diff --git a/sample/32bit/msi/license/OPSI/changelog.txt b/sample/32bit/msi/license/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/32bit/msi/license/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/32bit/msi/license/OPSI/control b/sample/32bit/msi/license/OPSI/control deleted file mode 100644 index 09da3a0..0000000 --- a/sample/32bit/msi/license/OPSI/control +++ /dev/null @@ -1,30 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: True -productClasses: -setupScript: setup32.ins -uninstallScript: uninstall32.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/32bit/msi/license/OPSI/postinst b/sample/32bit/msi/license/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/32bit/msi/license/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/32bit/msi/license/OPSI/preinst b/sample/32bit/msi/license/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/32bit/msi/license/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/32bit/msi/license/Testing.txt b/sample/32bit/msi/license/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/32bit/msi/license/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/32bit/msi/license/builder-product.cfg b/sample/32bit/msi/license/builder-product.cfg deleted file mode 100644 index c8f35f6..0000000 --- a/sample/32bit/msi/license/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="MsiId64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/32bit/msi/license/builder-targets-cb.sh b/sample/32bit/msi/license/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/32bit/msi/license/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/32bit/msi/nolicense/CLIENT_DATA/delsub32.ins b/sample/32bit/msi/nolicense/CLIENT_DATA/delsub32.ins deleted file mode 100644 index 6f1e92a..0000000 --- a/sample/32bit/msi/nolicense/CLIENT_DATA/delsub32.ins +++ /dev/null @@ -1,95 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif -endif -if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit/msi/nolicense/CLIENT_DATA/login.ins b/sample/32bit/msi/nolicense/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/32bit/msi/nolicense/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/32bit/msi/nolicense/CLIENT_DATA/opsi-PN.ini b/sample/32bit/msi/nolicense/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/32bit/msi/nolicense/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/32bit/msi/nolicense/CLIENT_DATA/setup32.ins b/sample/32bit/msi/nolicense/CLIENT_DATA/setup32.ins deleted file mode 100644 index 7f7d6e3..0000000 --- a/sample/32bit/msi/nolicense/CLIENT_DATA/setup32.ins +++ /dev/null @@ -1,182 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError "No Space" - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" - endif - - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit/msi/nolicense/CLIENT_DATA/uninstall32.ins b/sample/32bit/msi/nolicense/CLIENT_DATA/uninstall32.ins deleted file mode 100644 index 1adeaf6..0000000 --- a/sample/32bit/msi/nolicense/CLIENT_DATA/uninstall32.ins +++ /dev/null @@ -1,49 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles32Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" -endif - diff --git a/sample/32bit/msi/nolicense/OPSI/changelog.txt b/sample/32bit/msi/nolicense/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/32bit/msi/nolicense/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/32bit/msi/nolicense/OPSI/control b/sample/32bit/msi/nolicense/OPSI/control deleted file mode 100644 index 48b5f43..0000000 --- a/sample/32bit/msi/nolicense/OPSI/control +++ /dev/null @@ -1,30 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: False -productClasses: -setupScript: setup32.ins -uninstallScript: uninstall32.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/32bit/msi/nolicense/OPSI/postinst b/sample/32bit/msi/nolicense/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/32bit/msi/nolicense/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/32bit/msi/nolicense/OPSI/preinst b/sample/32bit/msi/nolicense/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/32bit/msi/nolicense/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/32bit/msi/nolicense/Testing.txt b/sample/32bit/msi/nolicense/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/32bit/msi/nolicense/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/32bit/msi/nolicense/builder-product.cfg b/sample/32bit/msi/nolicense/builder-product.cfg deleted file mode 100644 index c8f35f6..0000000 --- a/sample/32bit/msi/nolicense/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="MsiId64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/32bit/msi/nolicense/builder-targets-cb.sh b/sample/32bit/msi/nolicense/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/32bit/msi/nolicense/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/32bit64/installer/license/CLIENT_DATA/delsub3264.ins b/sample/32bit64/installer/license/CLIENT_DATA/delsub3264.ins deleted file mode 100644 index 036ddbf..0000000 --- a/sample/32bit64/installer/license/CLIENT_DATA/delsub3264.ins +++ /dev/null @@ -1,179 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram32$ = $InstallDir32$ + "\" + $UninstallProg32$ -Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" - -Set $UninstallProgram64$ = $InstallDir64$ + "\" + $UninstallProg64$ -Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" - -if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - if FileExists($IniFile32$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." - - if FileExists($IniFile32$) - Set $UninstallProg32$ = GetValueFromInifile($IniFile32$,"X86","UninstallProg32","XXXXXXXX.exe") - Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$ - if FileExists($UninstallProgramOld32$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old_32 - sub_check_exitcode - endif - endif - if FileExists($UninstallProgram32$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_32 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_32 /32Bit - comment "Cleanup registry" - Registry_uninstall /32Bit -endif - -if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - if FileExists($IniFile64$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." - - if FileExists($IniFile64$) - Set $UninstallProgr64$ = GetValueFromInifile($IniFile64$,"X86_64","UninstallProg64","XXXXXXXX.exe") - Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$ - if FileExists($UninstallProgramOld64$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old_64 - sub_check_exitcode - endif - endif - if FileExists($UninstallProgram64$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_64 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_64 /64Bit - comment "Cleanup registry" - Registry_uninstall /64Bit -endif - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old_32] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld32$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall_32] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram32$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Files_uninstall_32] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -delete -sf "$InstallDir32$\" - -[Winbatch_uninstall_old_64] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld64$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall_64] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram64$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall_msi_old_64] -msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_64] -msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_64] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir64$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit64/installer/license/CLIENT_DATA/login.ins b/sample/32bit64/installer/license/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/32bit64/installer/license/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/32bit64/installer/license/CLIENT_DATA/opsi-PN.ini b/sample/32bit64/installer/license/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/32bit64/installer/license/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/32bit64/installer/license/CLIENT_DATA/setup3264.ins b/sample/32bit64/installer/license/CLIENT_DATA/setup3264.ins deleted file mode 100644 index 0c8ce73..0000000 --- a/sample/32bit64/installer/license/CLIENT_DATA/setup3264.ins +++ /dev/null @@ -1,284 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram32$ -DefVar $UninstallProgramOld32$ -DefVar $IniFile32$ -DefVar $UninstallProgram64$ -DefVar $UninstallProgramOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" - endif - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "installing" - - if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_32 - Sub_check_exitcode - comment "Copy files" - Files_install_32 /32Bit - comment "Patch Registry" - Registry_install /32Bit - comment "Create shortcuts" - LinkFolder_install - endif - - if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_64 - Sub_check_exitcode - comment "Copy files" - Files_install_64 /64Bit - comment "Patch Registry" - Registry_install /64Bit - comment "Create shortcuts" - LinkFolder_install - endif - -endif - -[Winbatch_install_32] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_32] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir32$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" - -[Winbatch_install_64] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_64] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir64$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -comment "License management is enabled and will be used" - -comment "Trying to get a license key" -Set $LicenseKey$ = demandLicenseKey ($LicensePool$) -; If there is an assignment of exactly one licensepool to the product the following call is possible: -; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use: -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - -DefVar $ServiceErrorClass$ -set $ServiceErrorClass$ = getLastServiceErrorClass -comment "Error class: " + $ServiceErrorClass$ - -if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" -else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif -endif - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit64/installer/license/CLIENT_DATA/uninstall3264.ins b/sample/32bit64/installer/license/CLIENT_DATA/uninstall3264.ins deleted file mode 100644 index e71f965..0000000 --- a/sample/32bit64/installer/license/CLIENT_DATA/uninstall3264.ins +++ /dev/null @@ -1,84 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram32$ -DefVar $UninstallProgramOld32$ -DefVar $IniFile32$ -DefVar $UninstallProgram64$ -DefVar $UninstallProgramOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/32bit64/installer/license/OPSI/changelog.txt b/sample/32bit64/installer/license/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/32bit64/installer/license/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/32bit64/installer/license/OPSI/control b/sample/32bit64/installer/license/OPSI/control deleted file mode 100644 index 6b0cdfc..0000000 --- a/sample/32bit64/installer/license/OPSI/control +++ /dev/null @@ -1,39 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: True -productClasses: -setupScript: setup3264.ins -uninstallScript: uninstall3264.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductProperty] -type: unicode -name: install_architecture -multivalue: False -editable: False -description: which architecture (32/64 bit) has to be installed -values: ["32 only", "64 only", "both", "system specific"] -default: ["system specific"] - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/32bit64/installer/license/OPSI/postinst b/sample/32bit64/installer/license/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/32bit64/installer/license/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/32bit64/installer/license/OPSI/preinst b/sample/32bit64/installer/license/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/32bit64/installer/license/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/32bit64/installer/license/Testing.txt b/sample/32bit64/installer/license/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/32bit64/installer/license/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/32bit64/installer/license/builder-product.cfg b/sample/32bit64/installer/license/builder-product.cfg deleted file mode 100644 index f10115d..0000000 --- a/sample/32bit64/installer/license/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one UninstallProg - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 UninstallProg's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="UninstallProg64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/32bit64/installer/license/builder-targets-cb.sh b/sample/32bit64/installer/license/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/32bit64/installer/license/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins b/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins deleted file mode 100644 index 6fb74cf..0000000 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/delsub3264.ins +++ /dev/null @@ -1,173 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram32$ = $InstallDir32$ + "\" + $UninstallProg32$ -Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" - -Set $UninstallProgram64$ = $InstallDir64$ + "\" + $UninstallProg64$ -Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" - -if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - if FileExists($IniFile32$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." - - if FileExists($IniFile32$) - Set $UninstallProg32$ = GetValueFromInifile($IniFile32$,"X86","UninstallProg32","XXXXXXXX.exe") - Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$ - if FileExists($UninstallProgramOld32$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old_32 - sub_check_exitcode - endif - endif - if FileExists($UninstallProgram32$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_32 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_32 /32Bit - comment "Cleanup registry" - Registry_uninstall /32Bit -endif - -if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - if FileExists($IniFile64$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." - - if FileExists($IniFile64$) - Set $UninstallProg64$ = GetValueFromInifile($IniFile64$,"X86_64","UninstallProg64","XXXXXXXX.exe") - Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$ - if FileExists($UninstallProgramOld64$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old_64 - sub_check_exitcode - endif - endif - if FileExists($UninstallProgram64$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_64 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_64 /64Bit - comment "Cleanup registry" - Registry_uninstall /64Bit -endif - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old_32] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld32$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall_32] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram32$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Files_uninstall_32] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -delete -sf "$InstallDir32$\" - -[Winbatch_uninstall_old_64] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld64$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall_64] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram64$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Files_uninstall_64] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir64$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/login.ins b/sample/32bit64/installer/nolicense/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/opsi-PN.ini b/sample/32bit64/installer/nolicense/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/setup3264.ins b/sample/32bit64/installer/nolicense/CLIENT_DATA/setup3264.ins deleted file mode 100644 index 766dcad..0000000 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/setup3264.ins +++ /dev/null @@ -1,242 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram32$ -DefVar $UninstallProgramOld32$ -DefVar $IniFile32$ -DefVar $UninstallProgram64$ -DefVar $UninstallProgramOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $ExitCode$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" - endif - - comment "installing" - - if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_32 - Sub_check_exitcode - comment "Copy files" - Files_install_32 /32Bit - comment "Patch Registry" - Registry_install /32Bit - comment "Create shortcuts" - LinkFolder_install - endif - - if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_64 - Sub_check_exitcode - comment "Copy files" - Files_install_64 /64Bit - comment "Patch Registry" - Registry_install /64Bit - comment "Create shortcuts" - LinkFolder_install - endif - -endif - -[Winbatch_install_32] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_32] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir32$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" - -[Winbatch_install_64] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_64] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir64$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit64/installer/nolicense/CLIENT_DATA/uninstall3264.ins b/sample/32bit64/installer/nolicense/CLIENT_DATA/uninstall3264.ins deleted file mode 100644 index b24987d..0000000 --- a/sample/32bit64/installer/nolicense/CLIENT_DATA/uninstall3264.ins +++ /dev/null @@ -1,62 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProg32$ -DefVar $UninstallProgram32$ -DefVar $UninstallProgramOld32$ -DefVar $IniFile32$ -DefVar $UninstallProg64$ -DefVar $UninstallProgram64$ -DefVar $UninstallProgramOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" -endif - diff --git a/sample/32bit64/installer/nolicense/OPSI/changelog.txt b/sample/32bit64/installer/nolicense/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/32bit64/installer/nolicense/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/32bit64/installer/nolicense/OPSI/control b/sample/32bit64/installer/nolicense/OPSI/control deleted file mode 100644 index d3f60e3..0000000 --- a/sample/32bit64/installer/nolicense/OPSI/control +++ /dev/null @@ -1,39 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: False -productClasses: -setupScript: setup3264.ins -uninstallScript: uninstall3264.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductProperty] -type: unicode -name: install_architecture -multivalue: False -editable: False -description: which architecture (32/64 bit) has to be installed -values: ["32 only", "64 only", "both", "system specific"] -default: ["system specific"] - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/32bit64/installer/nolicense/OPSI/postinst b/sample/32bit64/installer/nolicense/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/32bit64/installer/nolicense/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/32bit64/installer/nolicense/OPSI/preinst b/sample/32bit64/installer/nolicense/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/32bit64/installer/nolicense/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/32bit64/installer/nolicense/Testing.txt b/sample/32bit64/installer/nolicense/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/32bit64/installer/nolicense/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/32bit64/installer/nolicense/builder-product.cfg b/sample/32bit64/installer/nolicense/builder-product.cfg deleted file mode 100644 index f10115d..0000000 --- a/sample/32bit64/installer/nolicense/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one UninstallProg - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 UninstallProg's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="UninstallProg64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/32bit64/installer/nolicense/builder-targets-cb.sh b/sample/32bit64/installer/nolicense/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/32bit64/installer/nolicense/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/32bit64/msi/license/CLIENT_DATA/delsub3264.ins b/sample/32bit64/msi/license/CLIENT_DATA/delsub3264.ins deleted file mode 100644 index c0fdcce..0000000 --- a/sample/32bit64/msi/license/CLIENT_DATA/delsub3264.ins +++ /dev/null @@ -1,137 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" - -Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" - -if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - if FileExists($IniFile32$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." - - if FileExists($IniFile32$) - Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_32 - sub_check_exitcode - endif - endif - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") - comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_32 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_32 /32Bit - comment "Cleanup registry" - Registry_uninstall /32Bit -endif - -if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - if FileExists($IniFile64$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." - - if FileExists($IniFile64$) - Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_64 - sub_check_exitcode - endif - endif - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") - comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_64 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_64 /64Bit - comment "Cleanup registry" - Registry_uninstall /64Bit -endif - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_msi_old_32] -msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_32] -msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_32] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -delete -sf "$InstallDir32$\" - -[Winbatch_uninstall_msi_old_64] -msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_64] -msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_64] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir64$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit64/msi/license/CLIENT_DATA/login.ins b/sample/32bit64/msi/license/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/32bit64/msi/license/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/32bit64/msi/license/CLIENT_DATA/opsi-PN.ini b/sample/32bit64/msi/license/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/32bit64/msi/license/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/32bit64/msi/license/CLIENT_DATA/setup3264.ins b/sample/32bit64/msi/license/CLIENT_DATA/setup3264.ins deleted file mode 100644 index 7746cf1..0000000 --- a/sample/32bit64/msi/license/CLIENT_DATA/setup3264.ins +++ /dev/null @@ -1,282 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld32$ -DefVar $IniFile32$ -DefVar $MsiIdOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" - endif - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "installing" - - if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_32 - Sub_check_exitcode - comment "Copy files" - Files_install_32 /32Bit - comment "Patch Registry" - Registry_install /32Bit - comment "Create shortcuts" - LinkFolder_install - endif - - if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_64 - Sub_check_exitcode - comment "Copy files" - Files_install_64 /64Bit - comment "Patch Registry" - Registry_install /64Bit - comment "Create shortcuts" - LinkFolder_install - endif - -endif - -[Winbatch_install_32] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_32] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir32$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" - -[Winbatch_install_64] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_64] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir64$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -comment "License management is enabled and will be used" - -comment "Trying to get a license key" -Set $LicenseKey$ = demandLicenseKey ($LicensePool$) -; If there is an assignment of exactly one licensepool to the product the following call is possible: -; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use: -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - -DefVar $ServiceErrorClass$ -set $ServiceErrorClass$ = getLastServiceErrorClass -comment "Error class: " + $ServiceErrorClass$ - -if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" -else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif -endif - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit64/msi/license/CLIENT_DATA/uninstall3264.ins b/sample/32bit64/msi/license/CLIENT_DATA/uninstall3264.ins deleted file mode 100644 index 30c17d9..0000000 --- a/sample/32bit64/msi/license/CLIENT_DATA/uninstall3264.ins +++ /dev/null @@ -1,82 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld32$ -DefVar $IniFile32$ -DefVar $MsiIdOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/32bit64/msi/license/OPSI/changelog.txt b/sample/32bit64/msi/license/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/32bit64/msi/license/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/32bit64/msi/license/OPSI/control b/sample/32bit64/msi/license/OPSI/control deleted file mode 100644 index 6b0cdfc..0000000 --- a/sample/32bit64/msi/license/OPSI/control +++ /dev/null @@ -1,39 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: True -productClasses: -setupScript: setup3264.ins -uninstallScript: uninstall3264.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductProperty] -type: unicode -name: install_architecture -multivalue: False -editable: False -description: which architecture (32/64 bit) has to be installed -values: ["32 only", "64 only", "both", "system specific"] -default: ["system specific"] - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/32bit64/msi/license/OPSI/postinst b/sample/32bit64/msi/license/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/32bit64/msi/license/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/32bit64/msi/license/OPSI/preinst b/sample/32bit64/msi/license/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/32bit64/msi/license/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/32bit64/msi/license/Testing.txt b/sample/32bit64/msi/license/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/32bit64/msi/license/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/32bit64/msi/license/builder-product.cfg b/sample/32bit64/msi/license/builder-product.cfg deleted file mode 100644 index c8f35f6..0000000 --- a/sample/32bit64/msi/license/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="MsiId64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/32bit64/msi/license/builder-targets-cb.sh b/sample/32bit64/msi/license/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/32bit64/msi/license/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/delsub3264.ins b/sample/32bit64/msi/nolicense/CLIENT_DATA/delsub3264.ins deleted file mode 100644 index c0fdcce..0000000 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/delsub3264.ins +++ /dev/null @@ -1,137 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" - -Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" - -if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - if FileExists($IniFile32$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." - - if FileExists($IniFile32$) - Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_32 - sub_check_exitcode - endif - endif - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") - comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_32 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_32 /32Bit - comment "Cleanup registry" - Registry_uninstall /32Bit -endif - -if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - if FileExists($IniFile64$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." - - if FileExists($IniFile64$) - Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_64 - sub_check_exitcode - endif - endif - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") - comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_64 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_64 /64Bit - comment "Cleanup registry" - Registry_uninstall /64Bit -endif - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_msi_old_32] -msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_32] -msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_32] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -delete -sf "$InstallDir32$\" - -[Winbatch_uninstall_msi_old_64] -msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_64] -msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_64] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir64$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/login.ins b/sample/32bit64/msi/nolicense/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/opsi-PN.ini b/sample/32bit64/msi/nolicense/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/setup3264.ins b/sample/32bit64/msi/nolicense/CLIENT_DATA/setup3264.ins deleted file mode 100644 index 42e565d..0000000 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/setup3264.ins +++ /dev/null @@ -1,240 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld32$ -DefVar $IniFile32$ -DefVar $MsiIdOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $ExitCode$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" - endif - - comment "installing" - - if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_32 - Sub_check_exitcode - comment "Copy files" - Files_install_32 /32Bit - comment "Patch Registry" - Registry_install /32Bit - comment "Create shortcuts" - LinkFolder_install - endif - - if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_64 - Sub_check_exitcode - comment "Copy files" - Files_install_64 /64Bit - comment "Patch Registry" - Registry_install /64Bit - comment "Create shortcuts" - LinkFolder_install - endif - -endif - -[Winbatch_install_32] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_32] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir32$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" - -[Winbatch_install_64] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_64] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir64$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/32bit64/msi/nolicense/CLIENT_DATA/uninstall3264.ins b/sample/32bit64/msi/nolicense/CLIENT_DATA/uninstall3264.ins deleted file mode 100644 index dc7df0b..0000000 --- a/sample/32bit64/msi/nolicense/CLIENT_DATA/uninstall3264.ins +++ /dev/null @@ -1,58 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld32$ -DefVar $IniFile32$ -DefVar $MsiIdOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" -endif - diff --git a/sample/32bit64/msi/nolicense/OPSI/changelog.txt b/sample/32bit64/msi/nolicense/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/32bit64/msi/nolicense/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/32bit64/msi/nolicense/OPSI/control b/sample/32bit64/msi/nolicense/OPSI/control deleted file mode 100644 index d3f60e3..0000000 --- a/sample/32bit64/msi/nolicense/OPSI/control +++ /dev/null @@ -1,39 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: False -productClasses: -setupScript: setup3264.ins -uninstallScript: uninstall3264.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductProperty] -type: unicode -name: install_architecture -multivalue: False -editable: False -description: which architecture (32/64 bit) has to be installed -values: ["32 only", "64 only", "both", "system specific"] -default: ["system specific"] - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/32bit64/msi/nolicense/OPSI/postinst b/sample/32bit64/msi/nolicense/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/32bit64/msi/nolicense/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/32bit64/msi/nolicense/OPSI/preinst b/sample/32bit64/msi/nolicense/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/32bit64/msi/nolicense/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/32bit64/msi/nolicense/Testing.txt b/sample/32bit64/msi/nolicense/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/32bit64/msi/nolicense/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/32bit64/msi/nolicense/builder-product.cfg b/sample/32bit64/msi/nolicense/builder-product.cfg deleted file mode 100644 index c8f35f6..0000000 --- a/sample/32bit64/msi/nolicense/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="MsiId64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/32bit64/msi/nolicense/builder-targets-cb.sh b/sample/32bit64/msi/nolicense/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/32bit64/msi/nolicense/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/64bit/installer/license/CLIENT_DATA/delsub64.ins b/sample/64bit/installer/license/CLIENT_DATA/delsub64.ins deleted file mode 100644 index 8091e14..0000000 --- a/sample/64bit/installer/license/CLIENT_DATA/delsub64.ins +++ /dev/null @@ -1,114 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram$ = $InstallDir$ + "\" + $UninstallProg$ -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") - Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ - if FileExists($UninstallProgramOld$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old - sub_check_exitcode - endif -endif -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /64Bit - -comment "Cleanup registry" -Registry_uninstall /64Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/64bit/installer/license/CLIENT_DATA/login.ins b/sample/64bit/installer/license/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/64bit/installer/license/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/64bit/installer/license/CLIENT_DATA/opsi-PN.ini b/sample/64bit/installer/license/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/64bit/installer/license/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/64bit/installer/license/CLIENT_DATA/setup64.ins b/sample/64bit/installer/license/CLIENT_DATA/setup64.ins deleted file mode 100644 index 8c40345..0000000 --- a/sample/64bit/installer/license/CLIENT_DATA/setup64.ins +++ /dev/null @@ -1,231 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /64Bit - - comment "Patch Registry" - Registry_install /64Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/64bit/installer/license/CLIENT_DATA/uninstall64.ins b/sample/64bit/installer/license/CLIENT_DATA/uninstall64.ins deleted file mode 100644 index e5e5bba..0000000 --- a/sample/64bit/installer/license/CLIENT_DATA/uninstall64.ins +++ /dev/null @@ -1,74 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/64bit/installer/license/OPSI/changelog.txt b/sample/64bit/installer/license/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/64bit/installer/license/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/64bit/installer/license/OPSI/control b/sample/64bit/installer/license/OPSI/control deleted file mode 100644 index f203124..0000000 --- a/sample/64bit/installer/license/OPSI/control +++ /dev/null @@ -1,30 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: True -productClasses: -setupScript: setup64.ins -uninstallScript: uninstall64.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/64bit/installer/license/OPSI/postinst b/sample/64bit/installer/license/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/64bit/installer/license/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/64bit/installer/license/OPSI/preinst b/sample/64bit/installer/license/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/64bit/installer/license/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/64bit/installer/license/Testing.txt b/sample/64bit/installer/license/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/64bit/installer/license/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/64bit/installer/license/builder-product.cfg b/sample/64bit/installer/license/builder-product.cfg deleted file mode 100644 index f10115d..0000000 --- a/sample/64bit/installer/license/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one UninstallProg - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 UninstallProg's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="UninstallProg64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/64bit/installer/license/builder-targets-cb.sh b/sample/64bit/installer/license/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/64bit/installer/license/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/64bit/installer/nolicense/CLIENT_DATA/delsub64.ins b/sample/64bit/installer/nolicense/CLIENT_DATA/delsub64.ins deleted file mode 100644 index 8091e14..0000000 --- a/sample/64bit/installer/nolicense/CLIENT_DATA/delsub64.ins +++ /dev/null @@ -1,114 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram$ = $InstallDir$ + "\" + $UninstallProg$ -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") - Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ - if FileExists($UninstallProgramOld$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old - sub_check_exitcode - endif -endif -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /64Bit - -comment "Cleanup registry" -Registry_uninstall /64Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/64bit/installer/nolicense/CLIENT_DATA/login.ins b/sample/64bit/installer/nolicense/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/64bit/installer/nolicense/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/64bit/installer/nolicense/CLIENT_DATA/opsi-PN.ini b/sample/64bit/installer/nolicense/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/64bit/installer/nolicense/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/64bit/installer/nolicense/CLIENT_DATA/setup64.ins b/sample/64bit/installer/nolicense/CLIENT_DATA/setup64.ins deleted file mode 100644 index 79674d2..0000000 --- a/sample/64bit/installer/nolicense/CLIENT_DATA/setup64.ins +++ /dev/null @@ -1,183 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles64Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /64Bit - - comment "Patch Registry" - Registry_install /64Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/64bit/installer/nolicense/CLIENT_DATA/uninstall64.ins b/sample/64bit/installer/nolicense/CLIENT_DATA/uninstall64.ins deleted file mode 100644 index aa1b813..0000000 --- a/sample/64bit/installer/nolicense/CLIENT_DATA/uninstall64.ins +++ /dev/null @@ -1,50 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles64Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" -endif - diff --git a/sample/64bit/installer/nolicense/OPSI/changelog.txt b/sample/64bit/installer/nolicense/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/64bit/installer/nolicense/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/64bit/installer/nolicense/OPSI/control b/sample/64bit/installer/nolicense/OPSI/control deleted file mode 100644 index 847dbe0..0000000 --- a/sample/64bit/installer/nolicense/OPSI/control +++ /dev/null @@ -1,30 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: False -productClasses: -setupScript: setup64.ins -uninstallScript: uninstall64.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/64bit/installer/nolicense/OPSI/postinst b/sample/64bit/installer/nolicense/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/64bit/installer/nolicense/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/64bit/installer/nolicense/OPSI/preinst b/sample/64bit/installer/nolicense/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/64bit/installer/nolicense/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/64bit/installer/nolicense/Testing.txt b/sample/64bit/installer/nolicense/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/64bit/installer/nolicense/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/64bit/installer/nolicense/builder-product.cfg b/sample/64bit/installer/nolicense/builder-product.cfg deleted file mode 100644 index f10115d..0000000 --- a/sample/64bit/installer/nolicense/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one UninstallProg - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="UninstallProg" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 UninstallProg's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="UninstallProg32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="UninstallProg64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/64bit/installer/nolicense/builder-targets-cb.sh b/sample/64bit/installer/nolicense/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/64bit/installer/nolicense/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/64bit/msi/license/CLIENT_DATA/delsub64.ins b/sample/64bit/msi/license/CLIENT_DATA/delsub64.ins deleted file mode 100644 index c7db77f..0000000 --- a/sample/64bit/msi/license/CLIENT_DATA/delsub64.ins +++ /dev/null @@ -1,95 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif -endif -if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /64Bit - -comment "Cleanup registry" -Registry_uninstall /64Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/64bit/msi/license/CLIENT_DATA/login.ins b/sample/64bit/msi/license/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/64bit/msi/license/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/64bit/msi/license/CLIENT_DATA/opsi-PN.ini b/sample/64bit/msi/license/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/64bit/msi/license/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/64bit/msi/license/CLIENT_DATA/setup64.ins b/sample/64bit/msi/license/CLIENT_DATA/setup64.ins deleted file mode 100644 index e78e1ff..0000000 --- a/sample/64bit/msi/license/CLIENT_DATA/setup64.ins +++ /dev/null @@ -1,230 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /64Bit - - comment "Patch Registry" - Registry_install /64Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/64bit/msi/license/CLIENT_DATA/uninstall64.ins b/sample/64bit/msi/license/CLIENT_DATA/uninstall64.ins deleted file mode 100644 index 62eb53d..0000000 --- a/sample/64bit/msi/license/CLIENT_DATA/uninstall64.ins +++ /dev/null @@ -1,73 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/64bit/msi/license/OPSI/changelog.txt b/sample/64bit/msi/license/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/64bit/msi/license/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/64bit/msi/license/OPSI/control b/sample/64bit/msi/license/OPSI/control deleted file mode 100644 index f203124..0000000 --- a/sample/64bit/msi/license/OPSI/control +++ /dev/null @@ -1,30 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: True -productClasses: -setupScript: setup64.ins -uninstallScript: uninstall64.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/64bit/msi/license/OPSI/postinst b/sample/64bit/msi/license/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/64bit/msi/license/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/64bit/msi/license/OPSI/preinst b/sample/64bit/msi/license/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/64bit/msi/license/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/64bit/msi/license/Testing.txt b/sample/64bit/msi/license/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/64bit/msi/license/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/64bit/msi/license/builder-product.cfg b/sample/64bit/msi/license/builder-product.cfg deleted file mode 100644 index c8f35f6..0000000 --- a/sample/64bit/msi/license/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="MsiId64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/64bit/msi/license/builder-targets-cb.sh b/sample/64bit/msi/license/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/64bit/msi/license/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/64bit/msi/nolicense/CLIENT_DATA/delsub64.ins b/sample/64bit/msi/nolicense/CLIENT_DATA/delsub64.ins deleted file mode 100644 index c7db77f..0000000 --- a/sample/64bit/msi/nolicense/CLIENT_DATA/delsub64.ins +++ /dev/null @@ -1,95 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif -endif -if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /64Bit - -comment "Cleanup registry" -Registry_uninstall /64Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/64bit/msi/nolicense/CLIENT_DATA/login.ins b/sample/64bit/msi/nolicense/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/64bit/msi/nolicense/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/64bit/msi/nolicense/CLIENT_DATA/opsi-PN.ini b/sample/64bit/msi/nolicense/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/64bit/msi/nolicense/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/64bit/msi/nolicense/CLIENT_DATA/setup64.ins b/sample/64bit/msi/nolicense/CLIENT_DATA/setup64.ins deleted file mode 100644 index 14e3591..0000000 --- a/sample/64bit/msi/nolicense/CLIENT_DATA/setup64.ins +++ /dev/null @@ -1,182 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles64Dir%\" -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /64Bit - - comment "Patch Registry" - Registry_install /64Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/64bit/msi/nolicense/CLIENT_DATA/uninstall64.ins b/sample/64bit/msi/nolicense/CLIENT_DATA/uninstall64.ins deleted file mode 100644 index bd43c20..0000000 --- a/sample/64bit/msi/nolicense/CLIENT_DATA/uninstall64.ins +++ /dev/null @@ -1,51 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" -endif - diff --git a/sample/64bit/msi/nolicense/OPSI/changelog.txt b/sample/64bit/msi/nolicense/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/64bit/msi/nolicense/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/64bit/msi/nolicense/OPSI/control b/sample/64bit/msi/nolicense/OPSI/control deleted file mode 100644 index 847dbe0..0000000 --- a/sample/64bit/msi/nolicense/OPSI/control +++ /dev/null @@ -1,30 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: False -productClasses: -setupScript: setup64.ins -uninstallScript: uninstall64.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/64bit/msi/nolicense/OPSI/postinst b/sample/64bit/msi/nolicense/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/64bit/msi/nolicense/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/64bit/msi/nolicense/OPSI/preinst b/sample/64bit/msi/nolicense/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/64bit/msi/nolicense/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/64bit/msi/nolicense/Testing.txt b/sample/64bit/msi/nolicense/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/64bit/msi/nolicense/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/64bit/msi/nolicense/builder-product.cfg b/sample/64bit/msi/nolicense/builder-product.cfg deleted file mode 100644 index c8f35f6..0000000 --- a/sample/64bit/msi/nolicense/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="MsiId64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/64bit/msi/nolicense/builder-targets-cb.sh b/sample/64bit/msi/nolicense/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/64bit/msi/nolicense/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/All/CLIENT_DATA/delsub32.ins b/sample/All/CLIENT_DATA/delsub32.ins deleted file mode 100644 index 4857753..0000000 --- a/sample/All/CLIENT_DATA/delsub32.ins +++ /dev/null @@ -1,135 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") - Set $UninstallProgramOld$ = $InstallDir$ + $UninstallProg$ - if FileExists($UninstallProgramOld$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old - sub_check_exitcode - endif -endif -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif - -if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif -endif -if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -; del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/All/CLIENT_DATA/delsub3264.ins b/sample/All/CLIENT_DATA/delsub3264.ins deleted file mode 100644 index a581c36..0000000 --- a/sample/All/CLIENT_DATA/delsub3264.ins +++ /dev/null @@ -1,216 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe" -Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" - -Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" -Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" - -if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - if FileExists($IniFile32$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..." - - if FileExists($IniFile32$) - Set $UninstallProg32$ = GetValueFromInifile($IniFile$,"X86","UninstallProg32","XXXXXXXX.exe") - Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$ - if FileExists($UninstallProgramOld32$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old_32 - sub_check_exitcode - endif - endif - if FileExists($UninstallProgram32$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_32 - sub_check_exitcode - endif - - if FileExists($IniFile32$) - Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_32 - sub_check_exitcode - endif - endif - - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") - comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_32 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_32 /32Bit - comment "Cleanup registry" - Registry_uninstall /32Bit -endif - -if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - if FileExists($IniFile64$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","") - endif - Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..." - - if FileExists($IniFile64$) - Set $UninstallProg64$ = GetValueFromInifile($IniFile$,"X86_64","UninstallProg64","XXXXXXXX.exe") - Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$ - if FileExists($UninstallProgramOld64$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old_64 - sub_check_exitcode - endif - endif - if FileExists($UninstallProgram64$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_64 - sub_check_exitcode - endif - - if FileExists($IniFile64$) - Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_64 - sub_check_exitcode - endif - endif - - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") - comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_64 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_64 /64Bit - comment "Cleanup registry" - Registry_uninstall /64Bit -endif - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old_32] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld32$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall_32] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram32$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall_msi_old_32] -msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_32] -msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_32] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir32$\" - -[Winbatch_uninstall_old_64] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld64$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall_64] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram64$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall_msi_old_64] -msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_64] -msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_64] -; Example for recursively deleting the installation directory: -; -; del -sf "$InstallDir64$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/All/CLIENT_DATA/delsub64.ins b/sample/All/CLIENT_DATA/delsub64.ins deleted file mode 100644 index 2a521a5..0000000 --- a/sample/All/CLIENT_DATA/delsub64.ins +++ /dev/null @@ -1,134 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -if FileExists($IniFile$) - Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","") - Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","") - Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","") -endif -Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..." - -if FileExists($IniFile$) - Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe") - Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ - if FileExists($UninstallProgramOld$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_old - sub_check_exitcode - endif -endif -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif - -if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif -endif -if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /64Bit - -comment "Cleanup registry" -Registry_uninstall /64Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_old] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgramOld$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -; del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/All/CLIENT_DATA/login.ins b/sample/All/CLIENT_DATA/login.ins deleted file mode 100644 index 7b85744..0000000 --- a/sample/All/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/All/CLIENT_DATA/opsi-PN.ini b/sample/All/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/All/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/All/CLIENT_DATA/setup32.ins b/sample/All/CLIENT_DATA/setup32.ins deleted file mode 100644 index a9afa4c..0000000 --- a/sample/All/CLIENT_DATA/setup32.ins +++ /dev/null @@ -1,232 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError "No Space" - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" - endif - - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/All/CLIENT_DATA/setup3264.ins b/sample/All/CLIENT_DATA/setup3264.ins deleted file mode 100644 index 0b41e43..0000000 --- a/sample/All/CLIENT_DATA/setup3264.ins +++ /dev/null @@ -1,286 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld32$ -DefVar $UninstallProgram32$ -DefVar $UninstallProgramOld32$ -DefVar $IniFile32$ -DefVar $MsiIdOld64$ -DefVar $UninstallProgram64$ -DefVar $UninstallProgramOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" - endif - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "installing" - - if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_32 - Sub_check_exitcode - comment "Copy files" - Files_install_32 /32Bit - comment "Patch Registry" - Registry_install /32Bit - comment "Create shortcuts" - LinkFolder_install - endif - - if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_64 - Sub_check_exitcode - comment "Copy files" - Files_install_64 /64Bit - comment "Patch Registry" - Registry_install /64Bit - comment "Create shortcuts" - LinkFolder_install - endif - -endif - -[Winbatch_install_32] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_32] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir32$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" - -[Winbatch_install_64] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_64] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir64$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -comment "License management is enabled and will be used" - -comment "Trying to get a license key" -Set $LicenseKey$ = demandLicenseKey ($LicensePool$) -; If there is an assignment of exactly one licensepool to the product the following call is possible: -; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use: -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - -DefVar $ServiceErrorClass$ -set $ServiceErrorClass$ = getLastServiceErrorClass -comment "Error class: " + $ServiceErrorClass$ - -if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" -else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif -endif - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/All/CLIENT_DATA/setup64.ins b/sample/All/CLIENT_DATA/setup64.ins deleted file mode 100644 index e3172b4..0000000 --- a/sample/All/CLIENT_DATA/setup64.ins +++ /dev/null @@ -1,232 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - - if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /64Bit - - comment "Patch Registry" - Registry_install /64Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/All/CLIENT_DATA/uninstall32.ins b/sample/All/CLIENT_DATA/uninstall32.ins deleted file mode 100644 index c040138..0000000 --- a/sample/All/CLIENT_DATA/uninstall32.ins +++ /dev/null @@ -1,74 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - diff --git a/sample/All/CLIENT_DATA/uninstall3264.ins b/sample/All/CLIENT_DATA/uninstall3264.ins deleted file mode 100644 index b575698..0000000 --- a/sample/All/CLIENT_DATA/uninstall3264.ins +++ /dev/null @@ -1,86 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld32$ -DefVar $UninstallProgram32$ -DefVar $UninstallProgramOld32$ -DefVar $IniFile32$ -DefVar $MsiIdOld64$ -DefVar $UninstallProgram64$ -DefVar $UninstallProgramOld64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/All/CLIENT_DATA/uninstall64.ins b/sample/All/CLIENT_DATA/uninstall64.ins deleted file mode 100644 index d81dd62..0000000 --- a/sample/All/CLIENT_DATA/uninstall64.ins +++ /dev/null @@ -1,75 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiIdOld$ -DefVar $UninstallProgram$ -DefVar $UninstallProgramOld$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $OLD_VERSION$ -DefVar $OLD_CREATOR_TAG$ -DefVar $OLD_RELEASE$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/All/OPSI/changelog.txt b/sample/All/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/All/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/All/OPSI/control b/sample/All/OPSI/control deleted file mode 100644 index d3f60e3..0000000 --- a/sample/All/OPSI/control +++ /dev/null @@ -1,39 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: False -productClasses: -setupScript: setup3264.ins -uninstallScript: uninstall3264.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductProperty] -type: unicode -name: install_architecture -multivalue: False -editable: False -description: which architecture (32/64 bit) has to be installed -values: ["32 only", "64 only", "both", "system specific"] -default: ["system specific"] - -[ProductDependency] -action: setup -requiredProduct: sereby.aio -requiredStatus: installed -requirementType: before - - diff --git a/sample/All/OPSI/postinst b/sample/All/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/All/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/All/OPSI/preinst b/sample/All/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/All/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/All/Testing.txt b/sample/All/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/All/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/All/builder-product.cfg b/sample/All/builder-product.cfg deleted file mode 100644 index c8f35f6..0000000 --- a/sample/All/builder-product.cfg +++ /dev/null @@ -1,150 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -NAME="7-Zip" -DESCRIPTION="7-Zip is a file archiver with a high compression ratio." -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTRACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - -######################### -# Setup required OPSI_INI variables -# which will be injected to the opsi-PN.ini files -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# OR - -OPSI_INI_SECTION[0]="X86_64" -OPSI_INI_OPTION[0]="MsiId" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's - -OPSI_INI_SECTION[0]="X86" -OPSI_INI_OPTION[0]="MsiId32" -OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# AND - -OPSI_INI_SECTION[1]="X86_64" -OPSI_INI_OPTION[1]="MsiId64" -OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - diff --git a/sample/All/builder-targets-cb.sh b/sample/All/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/All/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/32bit/installer/license/Testing.txt b/sample/Testing.txt similarity index 100% rename from sample/32bit/installer/license/Testing.txt rename to sample/Testing.txt diff --git a/sample/builder-product.cfg b/sample/builder-product.cfg index d816336..c8f35f6 100644 --- a/sample/builder-product.cfg +++ b/sample/builder-product.cfg @@ -1,36 +1,150 @@ ############################ # Setup product information ############################ -VENDOR="softmaker.de" -PN="pmviewer" -NAME="PlanMaker Viewer" -DESCRIPTION="PlanMaker Viewer 2010" -VERSION="2010.rev633" -RELEASE="10" +VENDOR="itwatch.de" +PN="itwatch" +NAME="7-Zip" +DESCRIPTION="7-Zip is a file archiver with a high compression ratio." +VERSION="4.10.19" +RELEASE="3" PRIORITY="0" ADVICE="" -TYPE="restricted" +# TYPE - defines, if the install files are public or restricted. +# Valid value: restricted | public +TYPE="public" -##################### -# File object array -##################### +################# +# Downloader (DL) object array +################ +# +# To build the opsi-packet, some files are needed. The files are defined by a file object. +# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together +# using a file index. +# +# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared +# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] +# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} +# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory +# +# - Filename +# Filename used inside the builder and opsi package +# Mandatory parameter. +# DL_FILE[index]="cool-stuff.exe" +# +# - Source URL +# The source URL to download the file from. Multiple URLs are separted by a ";" or "," +# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically +# Therefore, you download the non-public programs to your local/privagte repository. +# You can use variable like $PN or $Version inside the URLs +# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" +# +# - Architecture +# Definition of the architecture to separate different files. This will be used in +# the file structure inside the opsi-package. Also, you can use it in your repos-URL's +# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. +# If it's a file for all architecture, the variable have not to be set. +# Optional parameter. Default value: +# Valid values: , "X86", "X86_64" +# DL_ARCH[index]="X86" +# +# - WINST variable: +# You can access the file (included in the opsi-package) using WINST script language. +# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" +# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: +# Optional parameter. Default value: , +# DL_WINST_NAME[index]=itWESS +# +# - Compression format +# If the retrieved file is compressed, the compression format is specified to +# extract it. If the parameter is not set, no extraction happens +# Optional parameter. Valid values: unzip, 7zip. Default value: . +# DL_EXTRACT_FORMAT="zip" +# +# - Extraction directory for compressed files +# This Variable only works in combination with INSTALL and forces the extraction +# to be done into the specified directory. +# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. +# This feature is mostly needed if a package includes more setup programms that are nemed the +# same. This way you place the setups into diffent dirs +# Optional parameter. Default value: +# DL_EXTRACT_TO[index]="office" +# +# - Specify Downloader +# Defines the downloader to use to retrieve the SOURCE file +# Optional parameter. Valid values: wget|plowdown. Default value: wget +# + +DL_FILE[0]="itWatchLogo.jpg" +DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" -DL_FILE[0]="SoftMaker-Logo.png" -DL_SOURCE[0]="http://www.android-user.de/var/ezflow_site/storage/images/artikel/exklusiv-vorschau-auf-softmaker-office-fuer-android/softmaker-logo.png/25888-1-ger-DE/SoftMaker-Logo.png.png" - -DL_FILE[1]="PlanMakerViewer2010.msi" -DL_SOURCE[1]="http://internal.graz.disconnected-by-peer.at/Orig/SoftMaker/Viewer/HB/2010/PlanMakerViewer2010.msi" +DL_FILE[1]="itWESS-Client_German.msi" +DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" DL_ARCH[1]="X86" -DL_WINST_NAME[1]="InstallMsi" +DL_WINST_NAME[1]=itWESS + +DL_FILE[2]="itWESS-64bit_German.msi" +DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" +DL_ARCH[2]="X86_64" +DL_WINST_NAME[2]=itWESS64 + +DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" +DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" +DL_ARCH[3]="X86" +DL_DOWNLOADER[3]="wget" +DL_EXTRACT_FORMAT[3]="unzip" +DL_EXTRACT_TO[3]="office" # File array index for the image showing while installing the program ICON_DL_INDEX=0 +######################### +# Setup additional, custom WINST variables +# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) +# +# The following tokens inside the WINST_VALUE will be replaced dynamically +# +# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. +# Sample: +# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" +# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" +# +######################### +WINST_NAME[0]="InstallExe" +WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" + +WINST_NAME[1]="MyVar" +WINST_VALUE[1]="My content" + +######################### +# Setup required OPSI_INI variables +# which will be injected to the opsi-PN.ini files +# +# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly +# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! +# +######################### +# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId + OPSI_INI_SECTION[0]="X86" OPSI_INI_OPTION[0]="MsiId" OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" -OPSI_INI_SECTION[1]="Ignore" -OPSI_INI_OPTION[1]="OEMRegisterSkip" -OPSI_INI_VALUE[1]="-1" +# OR + +OPSI_INI_SECTION[0]="X86_64" +OPSI_INI_OPTION[0]="MsiId" +OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" + +# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's + +OPSI_INI_SECTION[0]="X86" +OPSI_INI_OPTION[0]="MsiId32" +OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" + +# AND + +OPSI_INI_SECTION[1]="X86_64" +OPSI_INI_OPTION[1]="MsiId64" +OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" + diff --git a/sample/32bit/installer/license/builder-targets-cb.sh b/sample/builder-targets-cb.sh similarity index 100% rename from sample/32bit/installer/license/builder-targets-cb.sh rename to sample/builder-targets-cb.sh diff --git a/sample/control b/sample/control deleted file mode 100644 index 2e70418..0000000 --- a/sample/control +++ /dev/null @@ -1,23 +0,0 @@ -[Package] -version: RELEASE -depends: -incremental: False - -[Product] -type: localboot -id: pmviewer -name: PlanMaker Viewer -description: PlanMaker Viewer 2010 -advice: ADVICE -version: VERSION -priority: PRIORITY -licenseRequired: False -productClasses: -setupScript: setup32.ins -uninstallScript: uninstall32.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - diff --git a/sample/old/CLIENT_DATA/delsub32.ins b/sample/old/CLIENT_DATA/delsub32.ins deleted file mode 100644 index 0f955e8..0000000 --- a/sample/old/CLIENT_DATA/delsub32.ins +++ /dev/null @@ -1,106 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - - -Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif -endif -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif -if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES - - -[Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/old/CLIENT_DATA/delsub3264.ins b/sample/old/CLIENT_DATA/delsub3264.ins deleted file mode 100644 index c3f7f1d..0000000 --- a/sample/old/CLIENT_DATA/delsub3264.ins +++ /dev/null @@ -1,163 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - - -Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe" -Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" -Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" -Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" - - - -if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Uninstalling " + $ProductId$ + " 32 Bit..." - - if FileExists($IniFile32$) - Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_32 - sub_check_exitcode - endif - endif - - if FileExists($UninstallProgram32$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_32 - sub_check_exitcode - endif - - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") - comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_32 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_32 /32Bit - comment "Cleanup registry" - Registry_uninstall /32Bit -endif - -if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Uninstalling " + $ProductId$ + " 64 Bit..." - - if FileExists($IniFile64$) - Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old_64 - sub_check_exitcode - endif - endif - if FileExists($UninstallProgram64$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_64 - sub_check_exitcode - endif - - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") - comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_64 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_64 /64Bit - comment "Cleanup registry" - Registry_uninstall /64Bit -endif - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_32] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; "$UninstallProgram32$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES - - -[Winbatch_uninstall_msi_old_32] -msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_32] -msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_32] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir32$\" - -[Winbatch_uninstall_64] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; "$UninstallProgram64$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES - - -[Winbatch_uninstall_msi_old_64] -msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi_64] -msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_64] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir64$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/old/CLIENT_DATA/delsub64.ins b/sample/old/CLIENT_DATA/delsub64.ins deleted file mode 100644 index 894f772..0000000 --- a/sample/old/CLIENT_DATA/delsub64.ins +++ /dev/null @@ -1,106 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - - -Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" -Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists($IniFile$) - Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") - comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" - Winbatch_uninstall_msi_old - sub_check_exitcode - endif -endif -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif -if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /64Bit - -comment "Cleanup registry" -Registry_uninstall /64Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES - - -[Winbatch_uninstall_msi_old] -msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/old/CLIENT_DATA/opsi-PN.ini b/sample/old/CLIENT_DATA/opsi-PN.ini deleted file mode 100644 index 978f02e..0000000 --- a/sample/old/CLIENT_DATA/opsi-PN.ini +++ /dev/null @@ -1,11 +0,0 @@ -[X86] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId32={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[X86_64] -MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -MsiId64={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - -[COMMON] -PN=name -VERSION=version diff --git a/sample/old/CLIENT_DATA/setup32.ins b/sample/old/CLIENT_DATA/setup32.ins deleted file mode 100644 index 43d4214..0000000 --- a/sample/old/CLIENT_DATA/setup32.ins +++ /dev/null @@ -1,236 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - -[Actions] -requiredWinstVersion >= "4.10.8.6" - -; DefVar $MsiId$ -DefVar $MsiIdOld$ -DefVar $UninstallProgram$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $ProductId$ = "opsi-template" -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - - if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - - comment "Test for installation success" - ; Test if software marked as installed in registry - ; if (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] DisplayName") = "") - ; logError "Fatal: After Installation 32 bit [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] not found" - ; isFatalError - ; else - ; comment "Successful Installation" - ; endif - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /SUPPRESSMSGBOXES - -[Files_install] -; copy the ini file to the InstallDir -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/old/CLIENT_DATA/setup3264.ins b/sample/old/CLIENT_DATA/setup3264.ins deleted file mode 100644 index 6c9d30e..0000000 --- a/sample/old/CLIENT_DATA/setup3264.ins +++ /dev/null @@ -1,278 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - -[Actions] -requiredWinstVersion >= "4.10.8.6" - -; DefVar $MsiId32$ -DefVar $MsiIdOld32$ -DefVar $UninstallProgram32$ -DefVar $IniFile32$ -; DefVar $MsiId64$ -DefVar $MsiIdOld64$ -DefVar $UninstallProgram64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $ProductId$ = "opsi-template" -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - - if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" - endif - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "installing" - - if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " 32 Bit..." - comment "Start setup program" - Winbatch_install_32 - Sub_check_exitcode - comment "Copy files" - Files_install_32 /32Bit - comment "Patch Registry" - Registry_install /32Bit - comment "Create shortcuts" - LinkFolder_install - endif - - if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " 64 Bit..." - comment "Start setup program" - Winbatch_install_64 - Sub_check_exitcode - comment "Copy files" - Files_install_64 /64Bit - comment "Patch Registry" - Registry_install /64Bit - comment "Create shortcuts" - LinkFolder_install - endif - -endif - -[Winbatch_install_32] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /SUPPRESSMSGBOXES - -[Files_install_32] -copy "$IniCfgFile$" "$InstallDir32$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" - -[Winbatch_install_64] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /SUPPRESSMSGBOXES - -[Files_install_64] -copy "$IniCfgFile$" "$InstallDir64$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -comment "License management is enabled and will be used" - -comment "Trying to get a license key" -Set $LicenseKey$ = demandLicenseKey ($LicensePool$) -; If there is an assignment of exactly one licensepool to the product the following call is possible: -; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use: -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - -DefVar $ServiceErrorClass$ -set $ServiceErrorClass$ = getLastServiceErrorClass -comment "Error class: " + $ServiceErrorClass$ - -if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" -else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif -endif - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/old/CLIENT_DATA/setup64.ins b/sample/old/CLIENT_DATA/setup64.ins deleted file mode 100644 index d4ebde1..0000000 --- a/sample/old/CLIENT_DATA/setup64.ins +++ /dev/null @@ -1,234 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - -[Actions] -requiredWinstVersion >= "4.10.8.6" - -; DefVar $MsiId$ -DefVar $UninstallProgram$ -DefVar $LogDir$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $ProductId$ = "opsi-template" -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - - if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /64Bit - - comment "Patch Registry" - Registry_install /64Bit - - comment "Create shortcuts" - LinkFolder_install - - comment "Test for installation success" - ; Test if software marked as installed in registry - ; if (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] DisplayName") = "") - ; logError "Fatal: After Installation 64 Bit [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] not found" - ; isFatalError - ; else - ; comment "Successful Installation" - ; endif - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /SUPPRESSMSGBOXES - -[Files_install] -copy "$IniCfgFile$" "$InstallDir$" - -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/old/CLIENT_DATA/uninstall32.ins b/sample/old/CLIENT_DATA/uninstall32.ins deleted file mode 100644 index 97e01be..0000000 --- a/sample/old/CLIENT_DATA/uninstall32.ins +++ /dev/null @@ -1,71 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - -[Actions] -requiredWinstVersion >= "4.10.8.6" - -; DefVar $MsiId$ -DefVar $MsiIdOld$ -DefVar $UninstallProgram$ -DefVar $LogDir$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - diff --git a/sample/old/CLIENT_DATA/uninstall3264.ins b/sample/old/CLIENT_DATA/uninstall3264.ins deleted file mode 100644 index 2396024..0000000 --- a/sample/old/CLIENT_DATA/uninstall3264.ins +++ /dev/null @@ -1,84 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - -[Actions] -requiredWinstVersion >= "4.10.8.6" - -; DefVar $MsiId32$ -DefVar $MsiIdOld32$ -DefVar $UninstallProgram32$ -DefVar $IniFile32$ -; DefVar $MsiId64$ -DefVar $MsiIdOld64$ -DefVar $UninstallProgram64$ -DefVar $IniFile64$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/old/CLIENT_DATA/uninstall64.ins b/sample/old/CLIENT_DATA/uninstall64.ins deleted file mode 100644 index e64e576..0000000 --- a/sample/old/CLIENT_DATA/uninstall64.ins +++ /dev/null @@ -1,72 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - -[Actions] -requiredWinstVersion >= "4.10.8.6" - -; DefVar $MsiId$ -DefVar $MsiIdOld$ -DefVar $UninstallProgram$ -DefVar $IniFile$ -DefVar $IniCfgFile$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh -; and adds the following variables: -; from builder-product.cfg : all variables definded by attribute WINST[index] -; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE -; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL -; auto generated winst-variables -; $IconFile$: path to product picture -; -@@BUILDER_VARIABLES@@ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/old/OPSI/changelog.txt b/sample/old/OPSI/changelog.txt deleted file mode 100644 index bc69317..0000000 --- a/sample/old/OPSI/changelog.txt +++ /dev/null @@ -1,2 +0,0 @@ -Don't add cahngelog entries here! -It get autogenerated by the opsi-builder.sh \ No newline at end of file diff --git a/sample/old/OPSI/control b/sample/old/OPSI/control deleted file mode 100644 index 07678c7..0000000 --- a/sample/old/OPSI/control +++ /dev/null @@ -1,37 +0,0 @@ -[Package] -version: RELEASE -depends: -incremental: False - -[Product] -type: localboot -id: !!!plz change!!! -name: !!!plz change!!! -description: !!!plz change!!! -advice: ADVICE -version: VERSION -priority: PRIORITY -licenseRequired: False -productClasses: -setupScript: !!!plz change!!! -uninstallScript: !!!plz change!!! -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductProperty] -type: unicode -name: install_architecture -multivalue: False -editable: False -description: which architecture (32/64 bit) has to be installed -values: ["32 only", "64 only", "both", "system specific"] -default: ["system specific"] - -[ProductDependency] -action: setup -requiredProduct: aio -requiredStatus: installed -requirementType: before diff --git a/sample/old/OPSI/postinst b/sample/old/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/old/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/old/OPSI/preinst b/sample/old/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/old/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# diff --git a/sample/old/Testing.txt b/sample/old/Testing.txt deleted file mode 100644 index d6b5e6c..0000000 --- a/sample/old/Testing.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Qualitiymanagement/Testing procedure - -- Product: - - Name: productname - - Version: xxx - - Release: yyyy - -- Environment - - OS: Native windows XP-32Bit installation - - Preinstalled packages: None (also no aio) - - Files used while testing: - File1: http://domain.de/file.ext - -- Testing process: - OPSI-action: - - Installation (without dependencies like AIO/Firefox): ?? - Result: - - File extensions related to program: ?? - - Start menu entry: ?? - - Starting/using program: viewer works, File1 is shown correctly: ?? - - OPSI-action: - - Uninstall - Result: - - File extensions related to program: unrelated: ?? - - Start menu entry: none: ?? - - diff --git a/sample/old/builder-product.cfg b/sample/old/builder-product.cfg deleted file mode 100644 index 1e9ff4f..0000000 --- a/sample/old/builder-product.cfg +++ /dev/null @@ -1,153 +0,0 @@ -############################ -# Setup product information -############################ -VENDOR="itwatch.de" -PN="itwatch" -VERSION="4.10.19" -RELEASE="3" -PRIORITY="0" -ADVICE="" - -# TYPE - defines, if the install files are public or restricted. -# Valid value: restricted | public -TYPE="public" - -# EXTRACTWITH - defines the used programm for decompression -# Valid values: 7zip | unzip -# Default value: 7zip -# This Value is only usefull in combinnation with Variable INSTALL[INDEX] -# EXTRACTWITH="7zip" - -# Begin Not Implemented --- -# DOWNLOADWITH - defines the used programm for download -# Valid values: wget | plowdown -# Default value: wget -# DOWNLOADWITH="wget" -# End Not Implemented --- - - -################# -# Downloader (DL) object array -################ -# -# To build the opsi-packet, some files are needed. The files are defined by a file object. -# A file object contains different attributes. All attributes (FILE, SOURCE, ..) are binded together -# using a file index. -# -# Target "prepare" : Working directory INST_DIR and OUTPUT_DIR are prepared -# Target "retrieve" : the files are downloaded to the the caching storage ${DIST_CACHE_DIR}/$DL_ARCH[i]/$DL_FILE[i] -# Target "create" : the files are extrated/copied to ${INST_DIR}/CLIENT_DATA/${DL_ARCH[$i]} -# Target "package" : opsi-makeproductfile is called processing ${INST_DIR} directory -# -# - Filename -# Filename used inside the builder and opsi package -# Mandatory parameter. -# DL_FILE[index]="cool-stuff.exe" -# -# - Source URL -# The source URL to download the file from. Multiple URLs are separted by a ";" or "," -# The $DIST_PRIVATE_REPOS variable will be added as the first URL automatically -# Therefore, you download the non-public programs to your local/privagte repository. -# You can use variable like $PN or $Version inside the URLs -# DL_SOURCE[index]="http://cool-stuff.de/download/cool-stuff_1.001.exe;http://mirro5.cool-stuff.at/$PN_$VERSION.exe" -# -# - Architecture -# Definition of the architecture to separate different files. This will be used in -# the file structure inside the opsi-package. Also, you can use it in your repos-URL's -# or filenames (OPSI_REPOS_FILE_PATTERN, OPSI_REPOS_PRODUCT_DIR) to structure the repos. -# If it's a file for all architecture, the variable have not to be set. -# Optional parameter. Default value: -# Valid values: , "X86", "X86_64" -# DL_ARCH[index]="X86" -# -# - WINST variable: -# You can access the file (included in the opsi-package) using WINST script language. -# The target "package" will replace all occurence of the string "@@BUILDER_VARIABLES@@" -# by pairs of "DefVar/Set"-commands, if the WINST attribute is set. Default value: -# Optional parameter. Default value: , -# DL_WINST_NAME[index]=itWESS -# -# - Compression format -# If the retrieved file is compressed, the compression format is specified to -# extract it. If the parameter is not set, no extraction happens -# Optional parameter. Valid values: unzip, 7zip. Default value: . -# DL_EXTRACT_FORMAT="zip" -# -# - Extraction directory for compressed files -# This Variable only works in combination with INSTALL and forces the extraction -# to be done into the specified directory. -# This will result in the files to be extracted to ${OUTPUT_DIR}/${DL_ARCH}/${DL_EXTRACT_TO}. -# This feature is mostly needed if a package includes more setup programms that are nemed the -# same. This way you place the setups into diffent dirs -# Optional parameter. Default value: -# DL_EXTRACT_TO[index]="office" -# -# - Specify Downloader -# Defines the downloader to use to retrieve the SOURCE file -# Optional parameter. Valid values: wget|plowdown. Default value: wget -# - -DL_FILE[0]="itWatchLogo.jpg" -DL_SOURCE[0]="http://www.itwatch.de/logos/itWatchLogo.jpg" - -DL_FILE[1]="itWESS-Client_German.msi" -DL_SOURCE[1]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-Client_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-Client_German.msi" -DL_ARCH[1]="X86" -DL_WINST_NAME[1]=itWESS - -DL_FILE[2]="itWESS-64bit_German.msi" -DL_SOURCE[2]="http://repos.dtnet.de/itwatch/itwatch/4.10.19/itWESS-64bit_German.msi;http://internal.graz.disconnected-by-peer.at/Orig/itWatch/itWESS/HB/4.10.19/itWESS-64bit_German.msi" -DL_ARCH[2]="X86_64" -DL_WINST_NAME[2]=itWESS64 - -DL_FILE[3]="AiO-Runtimes-x86-v1.7.1.7z" -DL_SOURCE[3]="http://ftp.computerbase.de/dl-758/weJMhoTGCTbFI5mzRnMlAg/1327825564/AiO-Runtimes-x86-v1.7.1.7z" -DL_ARCH[3]="X86" -DL_DOWNLOADER[3]="wget" -DL_EXTRACT_FORMAT[3]="unzip" -DL_EXTACT_TO[3]="office" - -# File array index for the image showing while installing the program -ICON_DL_INDEX=0 - -######################### -# Setup required WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# if your package is not msi based then you can remove the msi part from *.ins files and drop this variables compleatly -# !!! These Variables are requred if you remove them in this cfg file you will get error's about not defined Variables !!! -# -######################### -# if the packaga just supports X86 OR X86_64 (setupXX.ins delsubXX.ins uninstallXX.ins) then you have to just specify one MsiId - -WINST_NAME[0]="MsiId" -WINST_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -# if the package supports X86 AND X86_64 (setup3264.ins delsub3264.ins uninstall3264.ins) then you have to specify 2 MsiId's - -WINST_NAME[0]="MsiId32" -WINST_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -WINST_NAME[1]="MsiId64" -WINST_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" - -######################### -# Setup additional, custom WINST variables -# which will be injected to the *.ins files (replaces token @@BUILDER_VARIABLES@@ ) -# -# The following tokens inside the WINST_VALUE will be replaced dynamically -# -# @DL_EXTRACT_WINST_PATH[]@ : contains the WINST location of the directory, the files from DL_FILE[] was extracted to. -# Sample: -# WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[]@\\svcpack\\aio-runtimes.exe" -# results in "%ScriptPath%\X86_64\svcpack\aio-runtimes.exe" -# -######################### -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\aio-runtimes.exe" - -WINST_NAME[1]="MyVar" -WINST_VALUE[1]="My content" - diff --git a/sample/old/builder-targets-cb.sh b/sample/old/builder-targets-cb.sh deleted file mode 100644 index 9a3d4a8..0000000 --- a/sample/old/builder-targets-cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# This optional file "builder-targets-cb.sh" will be called by builder.sh -# -# The targets will be called from thde opsi-builder using the following -# order: config, prepare, retrieve, create, package, publish, commit, cleanup -# You can overwrite the target functions in builder-targets-cb.sh -# -# You can define callback functions. The functions are called from -# opsi-builder within processing a target -# cb_package_makeproductfile -# -# You can use every variable defined in any configuration file or by -# the defined builder script itself. Also, calling the predefined -# targets builder_ is possible. -# -# Abstract: -# target order: config, prepare, retrieve, create, package, publish, commit, cleanup -# callbacks: -# -############################################################################## - -function cleanup() { - echo "Cleanup" - builder_cleanup -} diff --git a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/Thumbs.db b/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/Thumbs.db deleted file mode 100644 index 513ee4e..0000000 Binary files a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/Thumbs.db and /dev/null differ diff --git a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/delsub.ins b/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/delsub.ins deleted file mode 100644 index 734d400..0000000 --- a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/delsub.ins +++ /dev/null @@ -1,94 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - -DefVar $MsiId$ -Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists($InstallDir$ + "\uninstall.exe") - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif -if not (GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall - -comment "Cleanup registry" -Registry_uninstall - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; "$InstallDir$\uninstall.exe" /S -; -; === Inno Setup ======================================================================================== -; "$InstallDir$\uninstall.exe" /silent /norestart - - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/opsi-template.png b/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/opsi-template.png deleted file mode 100644 index 0692522..0000000 Binary files a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/opsi-template.png and /dev/null differ diff --git a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/setup32.ins b/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/setup32.ins deleted file mode 100644 index 33f8991..0000000 --- a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/setup32.ins +++ /dev/null @@ -1,207 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - - -[Actions] -ExitWindows /Reboot -DefVar $LogDir$ -Set $LogDir$ = "%SystemDrive%\tmp" -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $NewExe$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $MinimumSpace$ = "1 MB" -Set $InstallDir$ = "%ProgramFilesDir%\" + $ProductId$ -Set $NewExe$ = $InstallDir$ + "\" + $ProductId$ + ".exe" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - ExitWindows /Reboot - isFatalError - ; Stop process and set installation status to failed -else - comment " this is for testing only ...remove on real scripts" - if "true" = GetProductProperty("test-set-fatal","true") - isFatalError - endif - - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - - if FileExists("%ScriptPath%\delsub.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if not ($LicenseRequired$ = "false") - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install - - comment "Patch Registry" - Registry_install - - comment "Create shortcuts" - LinkFolder_install - -endif - - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; "%ScriptPath%\setup.exe" /sp- /silent /norestart - -[Files_install] -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: $NewExe$ -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: $NewExe$ -; parameters: /some_param -; working_dir: $InstallDir$ -; icon_file: $NewExe$ -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - ExitWindows /Reboot - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - ExitWindows /Reboot - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - ExitWindows /Reboot - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - ExitWindows /Reboot - isFatalError - endif - endif - endif -endif - diff --git a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/uninstall.ins b/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/uninstall.ins deleted file mode 100644 index 710ed76..0000000 --- a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/localsetup/uninstall.ins +++ /dev/null @@ -1,74 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/credits/ - -[Initial] -requiredWinstVersion >= "4.8.6" -LogLevel=2 -; Log Errors in Logfile but don't abort: -ExitOnError=false -; Show syntax errors in the script: -ScriptErrorMessages=on -; Dont trace step by step through the script: -TraceMode=off -; Let started programs run in front of the winst window -StayOnTop=false - -[Aktionen] -DefVar $TEMP$ -Set $TEMP$ = EnvVar("TEMP") -DefVar $LogDir$ -Set $LogDir$ = "%SystemDrive%\tmp" -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $InstallDir$ = "%ProgramFilesDir%\" + $ProductId$ -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - - -comment "Show product picture" -ShowBitmap /3 "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub.ins" -endif - -if not ($LicenseRequired$ = "false") - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to free license used for the product" - DefVar $result$ - Set $result$ = FreeLicense($LicensePool$) - ; If there is an assignment of a license pool to the product, it is possible to use - ; Set $result$ = FreeLicense("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) -else - LogError "Error: licensing required, but license management not enabled" - isFatalError -endif - - - diff --git a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/opsi-template-with-admin.png b/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/opsi-template-with-admin.png deleted file mode 100644 index 0692522..0000000 Binary files a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/opsi-template-with-admin.png and /dev/null differ diff --git a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/opsi.bmp b/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/opsi.bmp deleted file mode 100644 index dfe6204..0000000 Binary files a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/opsi.bmp and /dev/null differ diff --git a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/setup.ins b/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/setup.ins deleted file mode 100644 index 9c88203..0000000 --- a/sample/source/4.0.2/opsi-template-with-admin/CLIENT_DATA/setup.ins +++ /dev/null @@ -1,299 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. - -; TEMPLATE for -; Skript fuer Installationen im Kontext eines temporaeren lokalen Administrators -; installations as temporary local admin -; see winst_manual.pdf / winst_handbuch.pdf - -; !!! requires winst32.exe version 4.2.x !!! - -; -; !!! Das lokale Installations-Skript, das durch den temporaeren lokalen Admin ausgefuehrt wird -; !!! (sein Name steht in $LocalSetupScript$), muss mit dem Befehl -; !!! exitWindows /Reboot -; !!! enden -; - -; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -; Vorarbeiten/Voraussetzungen/Doku pruefen wie in Winsthandbuch -; 8.3 Skript fuer Installationen im Kontext eines lokalen Administrators -; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - -[Actions] -requiredWinstVersion >= 4.11.3.3 -setLogLevel=7 -DefVar $ProductName$ -DefVar $ProductSizeMB$ -DefVar $LocalSetupScript$ -DefVar $LockKeyboard$ -DefVar $OpsiAdminPass$ -DefVar $RebootFlag$ -DefVar $WinstRegKey$ -DefVar $AutoName$ -DefVar $AutoPass$ -DefVar $AutoDom$ -DefVar $AutoLogon$ -DefVar $AutoBackupKey$ -DefVar $LocalFilesPath$ -DefVar $LocalWinst$ -DefVar $DefaultLoglevel$ -DefVar $PasswdLogLevel$ -DefVar $AdminGroup$ -DefVar $SearchResult$ -DefVar $LocalDomain$ -DefVar $debug$ -DefVar $isFatal$ - -; ---------------------------------------------------------------- -; - Please edit the following values -; ---------------------------------------------------------------- -Set $ProductName$ = "opsi-template-with-admin" -Set $ProductSizeMB$ = "1" -Set $LocalSetupScript$ = "setup32.ins" -; ---------------------------------------------------------------- - -comment "get and set initial values..." -set $debug$ = GetProductProperty("debug","false") -set $isFatal$ = "false" -set $DefaultLoglevel$ = "7" -SetLogLevel=$DefaultLoglevel$ -Set $LocalDomain$ = "%PCNAME%" - -comment "check if we productive or debugging..." -if $debug$ = "true" - comment "we are in debug mode" - Set $LockKeyboard$="false" - Set $PasswdLogLevel$="7" -else - comment "we are in productive mode" - comment "set $LockKeyboard$ to true to prevent user hacks while admin is logged in" - Set $LockKeyboard$="true" - comment " set $PasswdLogLevel$ to 0 for production" - Set $PasswdLogLevel$="0" -endif - -comment "handle Rebootflag" -Set $WinstRegKey$ = "HKLM\SOFTWARE\opsi.org\winst" -Set $RebootFlag$ = GetRegistryStringValue32("["+$WinstRegKey$+"] "+"RebootFlag") - -comment "some paths required" -Set $AutoBackupKey$ = $WinstRegKey$+"\AutoLogonBackup" -Set $LocalFilesPath$ = "C:\opsi.org\tmp\opsi_local_inst" -Set $LocalWinst$ = "%ProgramFilesDir%\opsi.org\opsi-client-agent\opsi-winst\winst32.exe" -if not( FileExists($LocalWinst$) ) - LogError "No opsi-winst found. Abborting." - isFatalError -endif - -comment "show product picture" -ShowBitmap "%scriptpath%\localsetup\"+$ProductName$+".png" $ProductName$ - -if not (($RebootFlag$ = "1") or ($RebootFlag$ = "2") or ($RebootFlag$ = "3")) - comment "Part before first Reboot" - comment "just reboot - this must be done if this is the first product after OS installation" - comment "handle Rebootflag" - Set $RebootFlag$ = "1" - Registry_SaveRebootFlag /32bit - ;ExitWindows /ImmediateReboot -endif ; Rebootflag = not (1 or 2 or 3) - -if $RebootFlag$ = "1" - comment "Part before second Reboot" - setActionProgress "Preparing" - - if not(HasMinimumSpace ("%SYSTEMDRIVE%", ""+$ProductSizeMB$+" MB")) - LogError "Not enough space on drive C: . "+$ProductSizeMB$+" MB on C: required for "+$ProductName$ - isFatalError - endif - - comment "Lets work..." - Message "Preparing "+$ProductName$+" install step 1..." - sub_Prepare_AutoLogon - - comment "we need to reboot now to be sure that the autologon work" - comment "handle Rebootflag" - Set $RebootFlag$ = "2" - Registry_SaveRebootFlag /32bit - ExitWindows /ImmediateReboot -endif ; Rebootflag = not (1 or 2) - -if ($RebootFlag$ = "2") - comment "Part after first Reboot" - - comment "handle Rebootflag" - Set $RebootFlag$ = "3" - Registry_SaveRebootFlag /32bit - - comment "Lets work..." - Message "Preparing "+$ProductName$+" install step 2..." - Registry_enable_keyboard /sysnative - - comment "now let the autologon work" - comment "it will stop with a reboot" - setActionProgress "Run Installation" - - ExitWindows /ImmediateLogout -endif ; Rebootflag = 2 - -if ($RebootFlag$ = "3") - comment "Part after second Reboot" - ExitWindows /Reboot - setActionProgress "Cleanup" - comment "handle Rebootflag" - Set $RebootFlag$ = "0" - Registry_SaveRebootFlag /32bit - - comment "Lets work..." - Message "Cleanup "+$ProductName$+" install (step 3)..." - sub_Restore_AutoLogon - set $SearchResult$ = GetRegistryStringValueSysnative("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] opsi_autologon_setup") - if $SearchResult$ = $LocalWinst$+" "+$LocalFilesPath$+"\"+$LocalSetupScript$+" /batch /productid %installingProdName%" - LogError "Localscript did not run. We remove the RunOnce entry and abort" - Registry_del_runonce /sysnative - set $isFatal$ = "true" - endif - if "true" = getRegistryStringValue32("[HKLM\Software\opsi.org\winst] with-admin-fatal") - LogError "set to fatal because the local script stored this result" - set $isFatal$ = "true" - endif - comment "cleanup the registry key which stores a fatal result of the local script" - Registry_clean_fatal_flag /32bit - if $isFatal$ = "true" - isFatalError - endif - comment "This is the clean end of the installation" -endif ; Rebootflag = 3 - - -[sub_Prepare_AutoLogon] -comment "copy the setup script and files" -Files_copy_Setup_files_local -comment "read actual Autologon values for backup" -set $AutoName$ = GetRegistryStringValueSysnative("[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] DefaultUserName") -comment "if AutoLogonName is our setup admin user, something bad happend" -comment "then let us cleanup" -if ($AutoName$="opsiSetupAdmin") - set $AutoName$="" - set $AutoPass$="" - set $AutoDom$="" - set $AutoLogon$="0" -else - set $AutoPass$ = GetRegistryStringValueSysnative("[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] DefaultPassword") - set $AutoDom$ = GetRegistryStringValueSysnative("[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] DefaultDomainName") - set $AutoLogon$ = GetRegistryStringValueSysnative("[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] AutoAdminLogon") -endif - -comment "backup AutoLogon values" -Registry_save_autologon /32bit - -comment "prepare the admin AutoLogon" -SetLogLevel=$PasswdLogLevel$ -set $OpsiAdminPass$= randomstr -Registry_autologon /sysnative - -comment "get the name of the admin group" -set $AdminGroup$ = SidToName("S-1-5-32-544") -comment "create our setup admin user" -DosInAnIcon_makeadmin -SetLogLevel=$DefaultLoglevel$ - -comment "store our setup script as run once" -Registry_runOnce /sysnative - -comment "disable keyboard and mouse while the autologin admin works" -if ($LockKeyboard$="true") - Registry_disable_keyboard /Sysnative -endif - -comment "cleanup the registry key which stores a fatal result of the local script" -Registry_clean_fatal_flag /32bit - -[sub_Restore_AutoLogon] -comment "read AutoLogon values from backup" -set $AutoName$ = GetRegistryStringValue("["+$AutoBackupKey$+"] DefaultUserName") -set $AutoPass$ = GetRegistryStringValue("["+$AutoBackupKey$+"] DefaultPassword") -set $AutoDom$ = GetRegistryStringValue("["+$AutoBackupKey$+"] DefaultDomainName") -set $AutoLogon$ = GetRegistryStringValue("["+$AutoBackupKey$+"] AutoAdminLogon") - -comment "restore the values" -SetLogLevel = $PasswdLogLevel$ -Registry_restore_autologon /Sysnative -SetLogLevel = $DefaultLoglevel$ -comment "delete our setup admin user" -DosInAnIcon_deleteadmin -comment "cleanup setup script, files and profiledir" -Files_delete_Setup_files_local -comment "delete profiledir" -DosInAnIcon_deleteprofile - -[Registry_save_autologon] -openkey [$AutoBackupKey$] -set "DefaultUserName"="$AutoName$" -set "DefaultPassword"="$AutoPass$" -set "DefaultDomainName"="$AutoDom$" -set "AutoAdminLogon"="$AutoLogon$" - -[Registry_restore_autologon] -openkey [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] -set "DefaultUserName"="$AutoName$" -set "DefaultPassword"="$AutoPass$" -set "DefaultDomainName"="$AutoDom$" -set "AutoAdminLogon"="$AutoLogon$" - -[DosInAnIcon_deleteadmin] -NET USER opsiSetupAdmin /DELETE - -[Registry_SaveRebootFlag] -openKey [$WinstRegKey$] -set "RebootFlag" = "$RebootFlag$" - -[Files_copy_Setup_files_local] -copy -s %ScriptPath%\localsetup\*.* $LocalFilesPath$ - -[Files_delete_Setup_files_local] -del -sf $LocalFilesPath$\ -; folgender Befehl funktioniert nicht vollständig, deshalb ist er zur Zeit auskommentier -; der Befehl wird durch die Sektion "DosInAnIcon_deleteprofile" ersetzt (P.Ohler) -;delete -sf "%ProfileDir%\opsiSetupAdmin" - -[DosInAnIcon_deleteprofile] -rmdir /S /Q "%ProfileDir%\opsiSetupAdmin" - -[DosInAnIcon_makeadmin] -NET USER opsiSetupAdmin $OpsiAdminPass$ /ADD -NET LOCALGROUP $AdminGroup$ /ADD opsiSetupAdmin - -[Registry_autologon] -openkey [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] -set "DefaultUserName"="opsiSetupAdmin" -set "DefaultPassword"="$OpsiAdminPass$" -set "DefaultDomainName"="$LocalDomain$" -set "AutoAdminLogon"="1" - -[Registry_runonce] -openkey [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] -set "opsi_autologon_setup"='"$LocalWinst$" "$LocalFilesPath$\$LocalSetupScript$" /batch /productid %installingProdName%' - -[Registry_del_runonce] -openkey [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] -DeleteVar "opsi_autologon_setup" - -[Registry_disable_keyboard] -openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kbdclass] -set "Start"=REG_DWORD:0x4 -openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Mouclass] -set "Start"=REG_DWORD:0x4 - -[Registry_enable_keyboard] -openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kbdclass] -set "Start"=REG_DWORD:0x1 -openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Mouclass] -set "Start"=REG_DWORD:0x1 - -[Registry_clean_fatal_flag] -openkey [$WinstRegKey$] -DeleteVar "with-admin-fatal" - diff --git a/sample/source/4.0.2/opsi-template-with-admin/OPSI/control b/sample/source/4.0.2/opsi-template-with-admin/OPSI/control deleted file mode 100644 index cc66a64..0000000 --- a/sample/source/4.0.2/opsi-template-with-admin/OPSI/control +++ /dev/null @@ -1,122 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template-with-admin -name: opsi template for installs with logged in admin -description: A opsi demo package -advice: -version: 4.0.2 -priority: -20 -licenseRequired: False -productClasses: -setupScript: setup.ins -uninstallScript: localsetup\uninstall.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: - -[ProductProperty] -type: bool -name: debug -description: should be false for production: switch off keyboard lock and increase loglevel -default: False - -[ProductProperty] -type: bool -name: test-set-fatal -description: test only: if true script result is set to fatal -default: False - -[Changelog] -opsi-template-with-admin (4.0.2-2) stable; urgency=low - - * requires opsi-winst >= 4.11.3.3 - * uses /productid switch at opsi-winst call - * code cleanup (use of synative instead of 64bit) - * property debug: switches loglevel and lock keyboard - * code cleanup - - -- detlef oertel Thu, 19 Sep 2012 15:01:53 +0200 - - -opsi-template-with-admin (4.0.2-1) stable; urgency=low - - * requires opsi-winst >= 4.11.3 - * using SidToName instead of psgetsid.exe - * priority set to -20 - * first reboot is commented (;ExitWindows /ImmediateReboot). Uncomment it if you have problems with the autologon - - -- detlef oertel Wed, 04 Jul 2012 15:01:53 +0200 - - -opsi-template-with-admin (1.0-8) stable; urgency=low - - * localdomain = "%PCNAME%" - - -- Jan Schneider Wed, 4 May 2011 14:09:00 +0100 - -opsi-template-with-admin (1.0-7) stable; urgency=low - - * localdomain = "." for nt6 - - -- Jan Schneider Tue, 29 Mar 2011 17:56:00 +0100 - -opsi-template-with-admin (1.0-6) stable; urgency=low - - * postinst fix: /bin/bash - * preinst fix: no more case sensitiv for pcgetsid.exe - - -- detlef oertel Tue, 30 Dec 2010 15:01:53 +0200 - -opsi-template-with-admin (1.0-5) testing; urgency=low - - * added support for opsi 4.0 opsi-client-agent - * scripts renamed to setup.ins, local_setup.ins and uninstall.ins - - -- detlef oertel Tue, 13 Jun 2010 15:01:53 +0200 - - -opsi-template-with-admin (1.0-4) testing; urgency=low - - * new (64 bit) functions of winst 4.10.3 used - - -- detlef oertel Fri, 16 Apr 2010 15:01:53 +0200 - - -opsi-template-with-admin (1.0-3) testing; urgency=low - - * in [sub_fetch_SearchResult] changed ("$s$") to ('$s$') - - -- detlef oertel Tue, 26 Jan 2010 15:01:53 +0200 - -opsi-template-with-admin (1.0-2) stable; urgency=low - - * added support for 64 Bit - * code cleanup - * added psgetsid for international support - - -- detlef oertel Mon, 14 Dec 2009 15:01:53 +0200 - - -opsi-template-with-admin (1.0-1) stable; urgency=low - - * initial package based on http://www.opsi.org/opsi_wiki/TemplateForInstallationsAsTemporaryLocalAdmin - - -- detlef oertel Mon, 13 Nov 2009 15:01:53 +0200 - - - - - - - - - - - diff --git a/sample/source/4.0.2/opsi-template-with-admin/OPSI/postinst b/sample/source/4.0.2/opsi-template-with-admin/OPSI/postinst deleted file mode 100644 index 56a8c4b..0000000 --- a/sample/source/4.0.2/opsi-template-with-admin/OPSI/postinst +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/bash -# -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# -TMP_DIR=${CLIENT_DATA_DIR}/../${PRODUCT_ID}.tmp - -echo 'Restoring previous files...' -if [ -f $TMP_DIR/psgetsid.exe ]; then - mv $TMP_DIR/psgetsid.exe $CLIENT_DATA_DIR/ || exit 1 -fi - -echo 'get files if not present' -if [ ! -f "$CLIENT_DATA_DIR/psgetsid.exe" ]; then - cd $CLIENT_DATA_DIR - echo 'try to get zip' - wget http://download.sysinternals.com/Files/PsTools.zip - echo 'unzip' - unzip -o PsTools.zip -fi - -echo "Removing temporary files..." -rm -rf $TMP_DIR diff --git a/sample/source/4.0.2/opsi-template-with-admin/OPSI/preinst b/sample/source/4.0.2/opsi-template-with-admin/OPSI/preinst deleted file mode 100644 index 4cbf4ba..0000000 --- a/sample/source/4.0.2/opsi-template-with-admin/OPSI/preinst +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -# -TMP_DIR=${CLIENT_DATA_DIR}/../${PRODUCT_ID}.tmp - -if [ -d $TMP_DIR ]; then - echo "Temporary directory $TMP_DIR already exist, aborting!" 1>&2 - exit 1 -fi - -[ ! -d $CLIENT_DATA_DIR ] && mkdir $CLIENT_DATA_DIR -mkdir $TMP_DIR - -if [ -d $CLIENT_DATA_DIR ]; then - echo "Saving previous files..." - if [ -f $CLIENT_DATA_DIR/[pP][sS][gG][eE][tT][sS][iI][dD].[eE][xX][eE] ]; then - mv $CLIENT_DATA_DIR/[pP][sS][gG][eE][tT][sS][iI][dD].[eE][xX][eE] $TMP_DIR/psgetsid.exe || exit 1 - fi -fi - -exit 0 - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub32.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub32.ins deleted file mode 100644 index db88f69..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub32.ins +++ /dev/null @@ -1,97 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' -Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif -if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -; del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub3264.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub3264.ins deleted file mode 100644 index dab13c4..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub3264.ins +++ /dev/null @@ -1,143 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $MsiId32$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' -Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe" - -Set $MsiId64$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' -Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" - -if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Uninstalling " + $ProductId$ + " 32 Bit..." - - if FileExists($UninstallProgram32$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_32 - sub_check_exitcode - endif - - if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "") - comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_32 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_32 /32Bit - comment "Cleanup registry" - Registry_uninstall /32Bit -endif - -if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Uninstalling " + $ProductId$ + " 64 Bit..." - - if FileExists($UninstallProgram64$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall_64 - sub_check_exitcode - endif - - if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "") - comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi_64 - sub_check_exitcode - endif - - comment "Delete files" - Files_uninstall_64 /64Bit - comment "Cleanup registry" - Registry_uninstall /64Bit -endif - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall_32] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram32$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall_msi_32] -msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_32] -; Example for recursively deleting the installation directory (don't forget the trailing backslash): -; -; delete -sf "$InstallDir32$\" - -[Winbatch_uninstall_64] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram64$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall_msi_64] -msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress - -[Files_uninstall_64] -; Example for recursively deleting the installation directory: -; -; del -sf "$InstallDir64$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub64.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub64.ins deleted file mode 100644 index cf3a4c9..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub64.ins +++ /dev/null @@ -1,97 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - - -Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' -Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif -if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /64Bit - -comment "Cleanup registry" -Registry_uninstall /64Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; maby better Call as -; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10 -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -; del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub_short32.opsiscript b/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub_short32.opsiscript deleted file mode 100644 index 16d9e26..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/delsub_short32.opsiscript +++ /dev/null @@ -1,67 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -include_append "section_sub_check_exitcode.opsiinc" - -Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}' -Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe" - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists($UninstallProgram$) - comment "Uninstall program found, starting uninstall" - Winbatch_uninstall - sub_check_exitcode -endif -if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") - comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" - Winbatch_uninstall_msi - sub_check_exitcode -endif - -comment "Delete files" -Files_uninstall /32Bit - -comment "Cleanup registry" -Registry_uninstall /32Bit - -comment "Delete program shortcuts" -LinkFolder_uninstall - -[Winbatch_uninstall] -; Choose one of the following examples as basis for program uninstall -; -; === Nullsoft Scriptable Install System ================================================================ -; "$UninstallProgram$" /S -; -; === Inno Setup ======================================================================================== -; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel - - -[Winbatch_uninstall_msi] -msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress - -[Files_uninstall] -; Example for recursively deleting the installation directory: -; -; del -sf "$InstallDir$\" - -[Registry_uninstall] -; Example of deleting a registry key: -; -; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] - -[LinkFolder_uninstall] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of deleting a shortcut from AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; delete_element $ProductId$ - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/login.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/login.ins deleted file mode 100644 index 60419d9..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/login.ins +++ /dev/null @@ -1,24 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif -endif - -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" - -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/opsi-template.png b/sample/source/4.0.2/opsi-template/CLIENT_DATA/opsi-template.png deleted file mode 100644 index e4b974e..0000000 Binary files a/sample/source/4.0.2/opsi-template/CLIENT_DATA/opsi-template.png and /dev/null differ diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup32.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup32.ins deleted file mode 100644 index 4da30e7..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup32.ins +++ /dev/null @@ -1,212 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiId$ -DefVar $UninstallProgram$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $ProductId$ = "opsi-template" -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError "No Space" - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - - if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup3264.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup3264.ins deleted file mode 100644 index 20d8c29..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup3264.ins +++ /dev/null @@ -1,262 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiId32$ -DefVar $UninstallProgram32$ -DefVar $MsiId64$ -DefVar $UninstallProgram64$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - - -Set $LogDir$ = "%SystemDrive%\tmp" - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $ProductId$ = "opsi-template" -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - - if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" - endif - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "installing" - - if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") - Message "Installing " + $ProductId$ + " 32 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_32 - Sub_check_exitcode - comment "Copy files" - Files_install_32 /32Bit - comment "Patch Registry" - Registry_install /32Bit - comment "Create shortcuts" - LinkFolder_install - endif - - if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) - Message "Installing " + $ProductId$ + " 64 Bit..." - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install_64 - Sub_check_exitcode - comment "Copy files" - Files_install_64 /64Bit - comment "Patch Registry" - Registry_install /64Bit - comment "Create shortcuts" - LinkFolder_install - endif - -endif - -[Winbatch_install_32] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_32] -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" - -[Winbatch_install_64] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install_64] -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -comment "License management is enabled and will be used" - -comment "Trying to get a license key" -Set $LicenseKey$ = demandLicenseKey ($LicensePool$) -; If there is an assignment of exactly one licensepool to the product the following call is possible: -; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use: -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - -DefVar $ServiceErrorClass$ -set $ServiceErrorClass$ = getLastServiceErrorClass -comment "Error class: " + $ServiceErrorClass$ - -if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" -else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif -endif - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup64.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup64.ins deleted file mode 100644 index 8fc3187..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup64.ins +++ /dev/null @@ -1,212 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiId$ -DefVar $UninstallProgram$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $ProductId$ = "opsi-template" -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - - if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /64Bit - - comment "Patch Registry" - Registry_install /64Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; You may use an answer file by the parameter /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - -[Sub_get_licensekey] -if opsiLicenseManagementEnabled - comment "License management is enabled and will be used" - - comment "Trying to get a license key" - Set $LicenseKey$ = demandLicenseKey ($LicensePool$) - ; If there is an assignment of exactly one licensepool to the product the following call is possible: - ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) - ; - ; If there is an assignment of a license pool to a windows software id, it is possible to use: - ; DefVar $WindowsSoftwareId$ - ; $WindowsSoftwareId$ = "..." - ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) - - DefVar $ServiceErrorClass$ - set $ServiceErrorClass$ = getLastServiceErrorClass - comment "Error class: " + $ServiceErrorClass$ - - if $ServiceErrorClass$ = "None" - comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" - else - if $ServiceErrorClass$ = "LicenseConfigurationError" - LogError "Fatal: license configuration must be corrected" - LogError getLastServiceErrorMessage - isFatalError - else - if $ServiceErrorClass$ = "LicenseMissingError" - LogError "Fatal: required license is not supplied" - isFatalError - endif - endif - endif -else - LogError "Fatal: license required, but license management not enabled" - isFatalError -endif - - -[Sub_check_exitcode] -comment "Test for installation success via exit code" -set $ExitCode$ = getLastExitCode -; informations to exit codes see -; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx -; http://msdn.microsoft.com/en-us/library/aa368542.aspx -if ($ExitCode$ = "0") - comment "Looks good: setup program gives exitcode zero" -else - comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ - if ($ExitCode$ = "1605") - comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." - comment "Uninstall of a not installed product failed - no problem" - else - if ($ExitCode$ = "1641") - comment "looks good: setup program gives exitcode 1641" - comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." - else - if ($ExitCode$ = "3010") - comment "looks good: setup program gives exitcode 3010" - comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." - else - logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ - isFatalError - endif - endif - endif -endif - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup_short32.opsiscript b/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup_short32.opsiscript deleted file mode 100644 index 3f808e9..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/setup_short32.opsiscript +++ /dev/null @@ -1,147 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.3.2" -include_append "section_sub_check_exitcode.opsiinc" -include_append "section_sub_get_licensekey.opsiinc" - -DefVar $MsiId$ -DefVar $UninstallProgram$ -DefVar $LogDir$ -DefVar $ProductId$ -DefVar $MinimumSpace$ -DefVar $InstallDir$ -DefVar $ExitCode$ -DefVar $LicenseRequired$ -DefVar $LicenseKey$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\opsi.org\tmp" - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -;$ProductId$ should be the name of the product in opsi -; therefore please: only lower letters, no umlauts, -; no white space use '-' as a seperator -Set $ProductId$ = "opsi-template" -Set $MinimumSpace$ = "1 MB" -; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - -if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) - LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ - isFatalError - ; Stop process and set installation status to failed -else - comment "Show product picture" - ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - - if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" - endif - - Message "Installing " + $ProductId$ + " ..." - - if $LicenseRequired$ = "true" - comment "Licensing required, reserve license and get license key" - Sub_get_licensekey - endif - - comment "Start setup program" - ChangeDirectory "%SCRIPTPATH%" - Winbatch_install - Sub_check_exitcode - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - - comment "Create shortcuts" - LinkFolder_install - -endif - -[Winbatch_install] -; Choose one of the following examples as basis for your installation -; You can use $LicenseKey$ var to pass a license key to the installer -; -; === Nullsoft Scriptable Install System ================================================================ -; "%ScriptPath%\Setup.exe" /S -; -; === MSI package ======================================================================================= -; You may use the parameter PIDKEY=$Licensekey$ -; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress -; -; === InstallShield + MSI===================================================================================== -; Attention: The path to the log file should not contain any whitespaces -; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=1 REBOOT=ReallySuppress" -; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress" -; -; === InstallShield ===================================================================================== -; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss" -; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt" -; -; === Inno Setup ======================================================================================== -; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html -; You may create setup answer file by: setup.exe /SAVEINF="filename" -; You may use an answer file by the parameter /LOADINF="filename" -; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES - -[Files_install] -; Example of recursively copying some files into the installation directory: -; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" - -[Registry_install] -; Example of setting some values of an registry key: -; -; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] -; set "name1" = "some string value" -; set "name2" = REG_DWORD:0001 -; set "name3" = REG_BINARY:00 af 99 cd - -[LinkFolder_install] -; Example of deleting a folder from AllUsers startmenu: -; -; set_basefolder common_programs -; delete_subfolder $ProductId$ -; -; Example of creating an shortcut to the installed exe in AllUsers startmenu: -; -; set_basefolder common_programs -; set_subfolder $ProductId$ -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: -; end_link -; -; Example of creating an shortcut to the installed exe on AllUsers desktop: -; -; set_basefolder common_desktopdirectory -; set_subfolder "" -; -; set_link -; name: $ProductId$ -; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: 2 -; end_link - - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall32.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall32.ins deleted file mode 100644 index 6e184b8..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall32.ins +++ /dev/null @@ -1,58 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiId$ -DefVar $UninstallProgram$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub32.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub32.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall3264.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall3264.ins deleted file mode 100644 index 396a593..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall3264.ins +++ /dev/null @@ -1,69 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiId32$ -DefVar $UninstallProgram32$ -DefVar $MsiId64$ -DefVar $UninstallProgram64$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir32$ -DefVar $InstallDir64$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ -DefVar $INST_SystemType$ -DefVar $INST_architecture$ - -Set $INST_SystemType$ = GetSystemType -set $INST_architecture$ = GetProductProperty("install_architecture","system specific") - - -Set $LogDir$ = "%SystemDrive%\tmp" - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $InstallDir32$ = "%ProgramFiles32Dir%\" -Set $InstallDir64$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub3264.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub3264.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall64.ins b/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall64.ins deleted file mode 100644 index fe4474e..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall64.ins +++ /dev/null @@ -1,59 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.2.6" - -DefVar $MsiId$ -DefVar $UninstallProgram$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $InstallDir$ = "%ProgramFiles64Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub64.ins") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub64.ins" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - - diff --git a/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall_short32.opsiscript b/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall_short32.opsiscript deleted file mode 100644 index 9f14fb1..0000000 --- a/sample/source/4.0.2/opsi-template/CLIENT_DATA/uninstall_short32.opsiscript +++ /dev/null @@ -1,58 +0,0 @@ -; Copyright (c) uib gmbh (www.uib.de) -; This sourcecode is owned by uib gmbh -; and published under the Terms of the General Public License. -; credits: http://www.opsi.org/en/credits/ - -[Actions] -requiredWinstVersion >= "4.11.3.2" - -DefVar $MsiId$ -DefVar $UninstallProgram$ -DefVar $LogDir$ -DefVar $ExitCode$ -DefVar $ProductId$ -DefVar $InstallDir$ -DefVar $LicenseRequired$ -DefVar $LicensePool$ - -Set $LogDir$ = "%SystemDrive%\tmp" - -; ---------------------------------------------------------------- -; - Please edit the following values - -; ---------------------------------------------------------------- -Set $ProductId$ = "opsi-template" -Set $InstallDir$ = "%ProgramFiles32Dir%\" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ -; ---------------------------------------------------------------- - - -comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ - -Message "Uninstalling " + $ProductId$ + " ..." - -if FileExists("%ScriptPath%\delsub_short32.opsiscript") - comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub_short32.opsiscript" -endif - -if $LicenseRequired$ = "true" - comment "Licensing required, free license used" - Sub_free_license -endif - -[Sub_free_license] -comment "License management is enabled and will be used" - -comment "Trying to free license used for the product" -DefVar $result$ -Set $result$ = FreeLicense($LicensePool$) -; If there is an assignment of a license pool to the product, it is possible to use -; Set $result$ = FreeLicense("", $ProductId$) -; -; If there is an assignment of a license pool to a windows software id, it is possible to use -; DefVar $WindowsSoftwareId$ -; $WindowsSoftwareId$ = "..." -; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) - diff --git a/sample/source/4.0.2/opsi-template/OPSI/control b/sample/source/4.0.2/opsi-template/OPSI/control deleted file mode 100644 index e97a797..0000000 --- a/sample/source/4.0.2/opsi-template/OPSI/control +++ /dev/null @@ -1,196 +0,0 @@ -[Package] -version: 2 -depends: -incremental: False - -[Product] -type: localboot -id: opsi-template -name: opsi template product -description: A template for opsi products -advice: -version: 4.0.2 -priority: 0 -licenseRequired: False -productClasses: -setupScript: setup3264.ins -uninstallScript: uninstall3264.ins -updateScript: -alwaysScript: -onceScript: -customScript: -userLoginScript: login.ins - -[ProductProperty] -type: unicode -name: install_architecture -multivalue: False -editable: False -description: which architecture (32/64 bit) has to be installed -values: ["32 only", "64 only", "both", "system specific"] -default: ["system specific"] - -[Changelog] -opsi-template (4.0.2-2) stable; urgency=low - - * requiredWinstVersion >= "4.11.3.2" - * Set $LogDir$ = "%SystemDrive%\opsi.org\tmp" - * new: *_short32.opsiscript scripts with includes - * winbatch_install: changed inno-setup example: default without answer file - * winbatch_uninstall: changed NSIS example: /WaitForProcessEnding "Au_.exe" - - -- detlef oertel Fri, 03 Aug 2012 16:01:53 +0200 - -opsi-template (4.0.2-1) stable; urgency=low - - * requiredWinstVersion >= "4.11.2.6" - * added ChangeDirectory "%SCRIPTPATH%" - * changed delete to del (in delsub) - * changed at msi to ALLUSERS=1 - - -- detlef oertel Mon, 02 Jun 2012 16:01:53 +0200 - -opsi-template (4.0.1-5) stable; urgency=low - - * added /nocancel at Inno example - * added login.ins for 'user profile management' - * moved changelog to control file - - -- detlef oertel Mon, 02 Jan 2012 16:01:53 +0200 - - -opsi-template (4.0.1-4) stable; urgency=low - - * removed uncommented test for installation success via registry entries - - -- detlef oertel Thu, 30 Nov 2011 16:01:53 +0200 - - -opsi-template (4.0.1-3) stable; urgency=low - - * changed setup.ins to setup3264.ins (and so on ..) - * added /SUPPRESSMSGBOXES at Inno example - - -- detlef oertel Thu, 06 Oct 2011 16:01:53 +0200 - - -opsi-template (4.0.1-2) stable; urgency=low - - * bugfix: removed '\\' by '\' in showBitMap calls - - -- detlef oertel Tue, 02 Aug 2011 16:01:53 +0200 - - -opsi-template (4.0.1-1) stable; urgency=low - - * bugfix: delsub.ins: Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" - - -- detlef oertel Wed, 18 Jan 2011 16:01:53 +0200 - - -opsi-template (4.0-1) stable; urgency=low - - * requires opsi.winst 4.10.8 - * default: 32Bit Version - * additional: 64Bit Version - * additional: 32/64Bit Version - - -- detlef oertel Wed, 18 Jan 2011 16:01:53 +0200 - - -opsi-template (1.0-20) stable; urgency=low - - * removed EnvVar("temp") - * all variable definitions at top - * new loglevel - * removed $NewExe$ - * more infos for inno setup - * removed number at showBitmap - * Initial section removed - * example for $installDir$ changed - - -- detlef oertel Wed, 14 Apr 2010 16:01:53 +0200 - - -opsi-template (1.0-19) stable; urgency=low - - * adding 'Installshield + MSI' to the Winbatch_install section - * changing to 'if $LicenseRequired$ = "true"' from 'if not ($LicenseRequired$ = "false")' - * changed from .ins to 'setup.ins' - - -- detlef oertel Tue, 26 Jan 2010 16:01:53 +0200 - - -opsi-template (1.0-18) stable; urgency=low - * bug fix in the successful request (comment out) - -opsi-template (1.0-17) stable; urgency=low - - * bug fix in delsub.ins : deleting a shortcut from AllUsers desktop - - -- detlef oertel Mon, 28 Sep 2009 16:01:53 +0200 - -opsi-template (1.0-16) stable; urgency=low - - * Added some examples for other installers - * Some cleanups - * More examples in other sections - - -- Jan Schneider Fri, 18 Sep 2009 13:01:53 +0200 - -opsi-template (1.0-15) stable; urgency=low - - * bugfix for delopsi-template - - -- Rupert Roeder Mon, 06 Jun 2009 11:15:00 +0100 - -opsi-template (1.0-14) stable; urgency=low - - * bugfix for delopsi-template - - -- Rupert Roeder Tue, 26 May 2009 11:15:00 +0100 - -opsi-template (1.0-13) stable; urgency=low - - * some corrections - - -- Rupert Roeder Tue, 26 May 2009 11:15:00 +0100 - -opsi-template (1.0-12) stable; urgency=low - - * code for license management added - - -- Rupert Roeder Tue, 19 May 2009 11:15:00 +0100 - -opsi-template (1.0-11) stable; urgency=low - - * sub_check_exitcode modified - * sub_check_exitcode 1641 added - * sub_check_exitcode integrated in delsub.ins - - -- Detlef Oertel Mon, 18 May 2009 14:15:00 +0100 - -opsi-template (1.0-10) stable; urgency=low - - * modified test on exit code added 3010 success restart required - -- bardo wolf - -opsi-template (1.0-9) stable; urgency=low - - * renamed from softprod to opsi-template - * added test on exit code - - -- Detlef Oertel Fri, 13 Mar 2009 12:35:32 +0100 - -opsi-template (1.0-8) stable; urgency=low - - * comment Anweisungen - * delsub: - Section: Files_uninstall - ;something like (don't forget the trailing backslash) - ;delete -sf "$InstallDir$\" - - -- Detlef Oertel Wed, 5 Nov 2008 17:00:00 +0100 - - - diff --git a/sample/source/4.0.2/opsi-template/OPSI/postinst b/sample/source/4.0.2/opsi-template/OPSI/postinst deleted file mode 100644 index a8e33fc..0000000 --- a/sample/source/4.0.2/opsi-template/OPSI/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# postinst script for softprod -# This script executes after unpacking files from that archive and registering the product at the server. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory which contains the installed client data -# diff --git a/sample/source/4.0.2/opsi-template/OPSI/preinst b/sample/source/4.0.2/opsi-template/OPSI/preinst deleted file mode 100644 index 15a5320..0000000 --- a/sample/source/4.0.2/opsi-template/OPSI/preinst +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# -# preinst script for softprod -# This script executes before that package will be unpacked from its archive file. -# -# The following environment variables can be used to obtain information about the current installation: -# PRODUCT_ID: id of the current product -# CLIENT_DATA_DIR: directory where client data will be installed -#