mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
[Application] Add single instance guard and mime types.
Took 2 hours 39 minutes Took 18 minutes Took 5 minutes Took 12 seconds
This commit is contained in:
parent
45d0cedb5c
commit
c413b0627d
8 changed files with 189 additions and 1 deletions
|
|
@ -294,6 +294,20 @@ Section "Application" SecApplication
|
|||
SetShellVarContext all
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
${If} $PortableMode = 0
|
||||
|
||||
; --- Register .cod file type ---
|
||||
WriteRegStr HKCR ".cod" "" "Cockatrice"
|
||||
WriteRegStr HKCR "Cockatrice" "" "Cockatrice Deck File"
|
||||
WriteRegStr HKCR "Cockatrice\shell\open\command" "" '"$INSTDIR\cockatrice.exe" "%1"'
|
||||
|
||||
; --- Register custom URI protocol ---
|
||||
WriteRegStr HKCR "cockatrice" "" "URL: Cockatrice Protocol"
|
||||
WriteRegStr HKCR "cockatrice" "URL Protocol" ""
|
||||
WriteRegStr HKCR "cockatrice\shell\open\command" "" '"$INSTDIR\cockatrice.exe" "%1"'
|
||||
|
||||
${EndIf}
|
||||
|
||||
${If} $PortableMode = 1
|
||||
${AndIf} ${FileExists} "$INSTDIR\portable.dat"
|
||||
; upgrade portable mode
|
||||
|
|
@ -402,6 +416,9 @@ Section "un.Application" UnSecApplication
|
|||
RMDir "$SMPROGRAMS\Cockatrice"
|
||||
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice"
|
||||
DeleteRegKey HKCR ".cod"
|
||||
DeleteRegKey HKCR "Cockatrice"
|
||||
DeleteRegKey HKCR "cockatrice"
|
||||
SectionEnd
|
||||
|
||||
; unselected because it is /o
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue