add file association for supported file types

This commit is contained in:
Mario Fetka 2013-03-27 14:08:57 +01:00
parent 93ac2f3843
commit b66f73cb60
1 changed files with 36 additions and 4 deletions

View File

@ -78,7 +78,8 @@ else
comment "Copy files"
Files_install_32 /32Bit
Files_install_config /AllNtUserProfiles
Dosbatch_set_config_32
DosInAnIcon_set_config_32
DosInAnIcon_install_32
comment "Patch Registry"
Registry_install /32Bit
comment "Create shortcuts"
@ -94,7 +95,8 @@ else
comment "Copy files"
Files_install_64 /64Bit
Files_install_config /AllNTUserProfiles
Dosbatch_set_config_64
DosInAnIcon_set_config_64
DosInAnIcon_install_64
comment "Patch Registry"
Registry_install /64Bit
comment "Create shortcuts"
@ -109,6 +111,21 @@ copy "%ScriptPath%\Imagine.ini" "%UserProfileDir%\Anwendungsdaten\Imagine"
[Winbatch_install_32]
"$Install32Exe$" /S /D="$InstallDir32$"
[DosInAnIcon_install_32]
@echo off
SET SC=HKLM\Software\Classes
SET Extn=bmp-187 dds-188 gif-189 jpg-190 jpeg-190 pcx-191 png-192 psd-193 tga-194 tif-195 tiff-195
FOR %%j IN (%Extn%) DO (
FOR /F "tokens=1,2 delims=-" %%A IN ("%%j") DO (
REG ADD %SC%\.%%A /VE /D "Imagine.%%A" /F
REG ADD %SC%\Imagine.%%A /VE /D "%%A Image" /F
REG ADD %SC%\Imagine.%%A\DefaultIcon /VE /D "$InstallDir32$\Imagine.dll,%%B" /F
REG ADD %SC%\Imagine.%%A\shell\open\command /VE /D "\"$InstallDir32$\Imagine.exe\" \"%%1\"" /F
)
)
[Files_install_32]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir32$"
@ -118,12 +135,27 @@ copy "%ScriptPath%\*.ini" "$InstallDir32$"
;
copy -s "%ScriptPath%\X86\*.*" "$InstallDir32$"
[Dosbatch_set_config_32]
[DosInAnIcon_set_config_32]
attrib +r "$InstallDir32$\Imagine.ini"
[Winbatch_install_64]
"$Install64Exe$" /S /D="$InstallDir64$"
[DosInAnIcon_install_64]
@echo off
SET SC=HKLM\Software\Classes
SET Extn=bmp-187 dds-188 gif-189 jpg-190 jpeg-190 pcx-191 png-192 psd-193 tga-194 tif-195 tiff-195
FOR %%j IN (%Extn%) DO (
FOR /F "tokens=1,2 delims=-" %%A IN ("%%j") DO (
REG ADD %SC%\.%%A /VE /D "Imagine.%%A" /F
REG ADD %SC%\Imagine.%%A /VE /D "%%A Image" /F
REG ADD %SC%\Imagine.%%A\DefaultIcon /VE /D "$InstallDir64$\Imagine64.dll,%%B" /F
REG ADD %SC%\Imagine.%%A\shell\open\command /VE /D "\"$InstallDir64$\Imagine64.exe\" \"%%1\"" /F
)
)
[Files_install_64]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir64$"
@ -133,7 +165,7 @@ copy "%ScriptPath%\*.ini" "$InstallDir64$"
;
copy -s "%ScriptPath%\X86_64\*.*" "$InstallDir64$"
[Dosbatch_set_config_64]
[DosInAnIcon_set_config_64]
attrib +r "$InstallDir64$\Imagine.ini"
[Registry_install]