change to nirsoft zipinstall for this tool

This commit is contained in:
Mario Fetka 2013-08-21 10:10:13 +02:00
parent 837ae2a56e
commit 30c893e63c
8 changed files with 128 additions and 31 deletions

View File

@ -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"

View File

@ -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

View File

@ -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: <path to the program>
; 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: <path to the program>
; parameters: <some_param>
; working_dir: $InstallDir$
; icon_file: <path to icon file>
; icon_index: 2
; end_link
[Sub_check_exitcode]
comment "Test for installation success via exit code"

View File

@ -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"

View File

@ -35,3 +35,10 @@ action: setup
requiredProduct: sereby.aio
requiredStatus: installed
requirementType: before
[ProductDependency]
action: setup
requiredProduct: nirsoft.zipinstall
requiredStatus: installed
requirementType: before

View File

@ -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"

View File

@ -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
}

View File

@ -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