summaryrefslogtreecommitdiffstats
path: root/windows/pica-client.nsi
blob: ae719028016deb651cf094c29840adc30dadf488 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96

Name "Pica Pica Messenger"
OutFile "pica-client_setup.exe"

Page license
Page directory
Page instfiles

LicenseData "COPYING"

InstallDir "$PROGRAMFILES\Pica Pica Messenger"

Icon "picapica-icon-sit.ico"

RequestExecutionLevel admin

; The stuff to install
Section "" ;No components page, name is not important

  ; Set output path to the installation directory.
  SetOutPath $INSTDIR
  
  ; Put file there
  File "pica-client.exe"
  File "openssl.exe"
  File "picapica-icon-sit.ico"
  File "COPYING"
  File "OPENSSL.LICENSE.txt"
  File "README"
  File "openssl.cnf"
  File "libeay32.dll"
  File "ssleay32.dll"
  File "libgcc_s_sjlj-1.dll"
  File "libstdc++-6.dll"
  File "miniupnpc.dll"
  File "Qt5Core.dll"
  File "Qt5Gui.dll"
  File "Qt5Network.dll"
  File "Qt5Sql.dll"
  File "Qt5Widgets.dll"
  SetOutPath "$INSTDIR\share"
  File  "share\picapica-icon-fly.png"
  File  "share\picapica-icon-sit.png"
  File  "share\picapica-snd-newmessage.wav"
  File  "share\dhparam4096.pem"
  SetOutPath "$INSTDIR\sqldrivers"
  File  "sqldrivers\qsqlite.dll"
  SetOutPath "$INSTDIR\platforms"
  File "platforms\qwindows.dll"

  
  WriteUninstaller "uninstall.exe"
  
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "DisplayName" "Pica Pica Messenger"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "UninstallString" '"$INSTDIR\uninstall.exe"'
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "NoModify" 1
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "NoRepair" 1
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger" "HelpLink" "http://picapica.im"
  
SectionEnd ; end the section

Section "Start Menu Shortcuts"

  CreateDirectory "$SMPROGRAMS\Pica Pica Messenger"
  SetOutPath $INSTDIR
  CreateShortCut "$SMPROGRAMS\Pica Pica Messenger\Pica Pica Messenger.lnk" "$INSTDIR\pica-client.exe" "" "$INSTDIR\picapica-icon-sit.ico" 
  
SectionEnd

Section "Uninstall"
  Delete $INSTDIR\uninstall.exe 
  Delete "$INSTDIR\pica-client.exe"
  Delete "$INSTDIR\openssl.exe"
  Delete "$INSTDIR\*.dll"
  Delete "$INSTDIR\picapica-icon-sit.ico"
  Delete "$INSTDIR\COPYING"
  Delete "$INSTDIR\README"
  Delete "$INSTDIR\OPENSSL.LICENSE.txt"
  Delete "$INSTDIR\openssl.cnf"
  Delete "$INSTDIR\share\picapica-icon-fly.png"
  Delete "$INSTDIR\share\picapica-icon-sit.png"
  Delete "$INSTDIR\share\picapica-snd-newmessage.wav"
  Delete "$INSTDIR\share\dhparam4096.pem"
  Delete "$INSTDIR\platforms\*.dll"
  Delete "$INSTDIR\sqldrivers\*.dll"
  RMDir $INSTDIR\share
  RMDir $INSTDIR\sqldrivers
  RMDir $INSTDIR\platforms
  RMDir $INSTDIR
  
  Delete "$SMPROGRAMS\Pica Pica Messenger\*.*"
  RMDir "$SMPROGRAMS\Pica Pica Messenger"
  
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Messenger"
  
SectionEnd