diff --git a/CLIENT_DATA/delsub32.ins b/CLIENT_DATA/delsub32.ins index 9bf1c45..b83987c 100644 --- a/CLIENT_DATA/delsub32.ins +++ b/CLIENT_DATA/delsub32.ins @@ -19,13 +19,13 @@ if FileExists($IniFile$) Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$ if FileExists($UninstallProgramOld$) comment "Uninstall program found, starting uninstall" - Files_uninstall + Winbatch_uninstall_old sub_check_exitcode endif endif if FileExists($UninstallProgram$) comment "Uninstall program found, starting uninstall" - Files_uninstall + Winbatch_uninstall sub_check_exitcode endif @@ -38,6 +38,30 @@ 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: ; @@ -49,11 +73,16 @@ del -sf "$InstallDir$\" ; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] [LinkFolder_uninstall] -set_basefolder common_programs -delete_subfolder $ProductId$ - -set_basefolder common_programs -delete_subfolder Melk +; 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" diff --git a/CLIENT_DATA/opsi-melk.capslockgoodbye.ini b/CLIENT_DATA/opsi-melk.capslockgoodbye.ini index 41585d5..177908a 100644 --- a/CLIENT_DATA/opsi-melk.capslockgoodbye.ini +++ b/CLIENT_DATA/opsi-melk.capslockgoodbye.ini @@ -3,3 +3,20 @@ [COMMON] PN=name VERSION=version + +[install] +AddUninstall=1 +AddUninstallShortcut=1 +DesktopShortcut=1 +InstallTo=2 +StartMenuShortcut=1 +NoUserInteraction=1 +InstallFolder=%zi.ProgramFiles%\%zi.ProductName% +StartMenuFolder=%zi.CompanyName%\%zi.ProductName% +ProductName=CapsLock Goodbye +ProductVersion=2.0 +CompanyName=Melk +Description=Umbelegung der CapsLock-Tastenfunktion +NoExtraUninstallInfo=0 +NoSuccessMessage=1 +UninstallInDestFolder=1 \ No newline at end of file diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index 8597e33..f56999d 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -37,9 +37,9 @@ Set $LogDir$ = "%SystemDrive%\tmp" ;$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" +Set $MinimumSpace$ = "4 MB" ; the path were we find the product after the installation -Set $InstallDir$ = "%ProgramFiles32Dir%\CapsLockGoodbye" +Set $InstallDir$ = "%ProgramFiles32Dir%\Melk\CapsLock Goodbye" ; ---------------------------------------------------------------- Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" @@ -61,6 +61,8 @@ else comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" + Winbatch_install + Sub_check_exitcode comment "Copy files" Files_install /32Bit @@ -73,11 +75,16 @@ else endif +[Winbatch_install] +zipinst /i $Install32Zip$ [Files_install] ; copy the ini file to the InstallDir copy "$IniCfgFile$" "$InstallDir$" -copy -s "$InstallExe$" "$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: @@ -88,20 +95,38 @@ copy -s "$InstallExe$" "$InstallDir$" ; set "name3" = REG_BINARY:00 af 99 cd [LinkFolder_install] -set_basefolder common_programs -delete_subfolder $ProductId$ - -set_basefolder common_programs -set_subfolder Melk - -set_link - name: $NAME$ - target: $InstallDir$\capslockgoodbye.exe - parameters: - working_dir: $InstallDir$ - icon_file: $InstallDir$\capslockgoodbye.exe - icon_index: 0 -end_link +; 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" diff --git a/CLIENT_DATA/uninstall32.ins b/CLIENT_DATA/uninstall32.ins index d8d6e24..3785350 100644 --- a/CLIENT_DATA/uninstall32.ins +++ b/CLIENT_DATA/uninstall32.ins @@ -33,7 +33,7 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- -Set $InstallDir$ = "%ProgramFiles32Dir%\CapsLockGoodbye" +Set $InstallDir$ = "%ProgramFiles32Dir%\Melk\CapsLock Goodbye" ; ---------------------------------------------------------------- Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" diff --git a/OPSI/control b/OPSI/control index aa1e3a9..0c8b845 100644 --- a/OPSI/control +++ b/OPSI/control @@ -35,3 +35,10 @@ action: setup requiredProduct: sereby.aio requiredStatus: installed requirementType: before + +[ProductDependency] +action: setup +requiredProduct: nirsoft.zipinstall +requiredStatus: installed +requirementType: before + diff --git a/builder-product.cfg b/builder-product.cfg index f280a85..f9a2b2d 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -5,7 +5,7 @@ VENDOR="melk.de" PN="melk.capslockgoodbye" NAME="CapsLock Goodbye" DESCRIPTION="CapsLock Goodbye ermoeglicht eine Umbelegung der CapsLock-Tastenfunktion." -VERSION="2.0" +VERSION="2.0.1" RELEASE="1" PRIORITY="0" ADVICE="" @@ -21,14 +21,24 @@ DL_SOURCE[0]="http://melk.de/software/capslockgoodbye/capslockgb_logo.gif" DL_FILE[1]="capslockgoodbye-${VERSION}.zip" DL_SOURCE[1]="http://melk.de/software/capslockgoodbye/capslockgoodbye.zip" DL_ARCH[1]="X86" -DL_EXTRACT_FORMAT[1]="unzip" +DL_WINST_NAME[1]=Install32Zip # File array index for the image showing while installing the program ICON_DL_INDEX=0 -WINST_NAME[0]="InstallExe" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[1]@\\capslockgoodbye.exe" - OPSI_INI_SECTION[0]="X86" OPSI_INI_OPTION[0]="UninstallProg" OPSI_INI_VALUE[0]="capslockgoodbye.exe" + +OPSI_INI_SECTION[1]="install" +OPSI_INI_OPTION[1]="ProductVersion" +OPSI_INI_VALUE[1]="${VERSION}" + +OPSI_INI_SECTION[2]="install" +OPSI_INI_OPTION[2]="Description" +OPSI_INI_VALUE[2]="${DESCRIPTION}" + +OPSI_INI_SECTION[3]="install" +OPSI_INI_OPTION[3]="CompanyName" +OPSI_INI_VALUE[3]="Melk" + diff --git a/builder-targets-cb.sh b/builder-targets-cb.sh index 9a3d4a8..9246928 100644 --- a/builder-targets-cb.sh +++ b/builder-targets-cb.sh @@ -23,3 +23,12 @@ function cleanup() { echo "Cleanup" builder_cleanup } + +function create() { + echo "Create" + builder_create + + mkdir -p $INST_DIR/CLIENT_DATA/X86/ + cp $INST_DIR/CLIENT_DATA/opsi-$PN.ini $INST_DIR/CLIENT_DATA/X86/~zipinst~.zic + zip -j $INST_DIR/CLIENT_DATA/X86/${DL_FILE[1]} $INST_DIR/CLIENT_DATA/X86/~zipinst~.zic +} \ No newline at end of file diff --git a/capslockgoodbye-2.0.zip.sha1sum b/capslockgoodbye-2.0.1.zip.sha1sum similarity index 50% rename from capslockgoodbye-2.0.zip.sha1sum rename to capslockgoodbye-2.0.1.zip.sha1sum index 2798432..5d6abe9 100644 --- a/capslockgoodbye-2.0.zip.sha1sum +++ b/capslockgoodbye-2.0.1.zip.sha1sum @@ -1 +1 @@ -351dcef2d3f0a904a81ce5c36c42b08c11751750 /home/mario/.opsi-dist-cache/capslockgoodbye-2.0/X86/capslockgoodbye-2.0.zip +351dcef2d3f0a904a81ce5c36c42b08c11751750 /home/mario/.opsi-dist-cache/melk.capslockgoodbye-2.0.1/X86/capslockgoodbye-2.0.1.zip