Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cf9dd786
authored
Mar 11, 2015
by
Csók Tamás
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added install directory support
parent
c3deebfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
20 deletions
+60
-20
src/nsi/cloud.nsi
+60
-20
No files found.
src/nsi/cloud.nsi
View file @
cf9dd786
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
!define IconName "cloud"
!define IconName "cloud"
!define Show_output "True"
!define Show_output "True"
!define Install_selenium "False"
!define Install_selenium "False"
!define DefaulLocation "$LOCALAPPDATA\CIRCLE"
;--------------------------------
;--------------------------------
;General
;General
...
@@ -36,14 +37,14 @@
...
@@ -36,14 +37,14 @@
SetOverwrite try
SetOverwrite try
;Default installation folder
;Default installation folder
InstallDir "$
LOCALAPPDATA\CIRCLE
"
InstallDir "$
{DefaulLocation}
"
;Get installation folder from registry if available
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\${Company} ${AppName}" ""
InstallDirRegKey HKCU "Software\${Company} ${AppName}" "
install_directory
"
;Request application privileges
;Request application privileges
RequestExecutionLevel admin
RequestExecutionLevel admin
;--------------------------------
;--------------------------------
;Interface Settings
;Interface Settings
...
@@ -66,6 +67,7 @@
...
@@ -66,6 +67,7 @@
;--------------------------------
;--------------------------------
;Pages
;Pages
!insertmacro MUI_PAGE_LICENSE "gpl-3.0.txt"
!insertmacro MUI_PAGE_LICENSE "gpl-3.0.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_INSTFILES
;Done fuction to launch install.bat
;Done fuction to launch install.bat
!define MUI_PAGE_CUSTOMFUNCTION_PRE Done
!define MUI_PAGE_CUSTOMFUNCTION_PRE Done
...
@@ -153,7 +155,7 @@ Section "Install Section" SecInstall
...
@@ -153,7 +155,7 @@ Section "Install Section" SecInstall
File /r uninstaller
File /r uninstaller
;Store installation folder
;Store installation folder
WriteRegStr HKCU "Software\${Company} ${AppName}" "" $INSTDIR
WriteRegStr HKCU "Software\${Company} ${AppName}" "
install_directory
" $INSTDIR
;Create uninstaller
;Create uninstaller
WriteUninstaller "$INSTDIR\${AppUninstaller}"
WriteUninstaller "$INSTDIR\${AppUninstaller}"
...
@@ -180,7 +182,7 @@ Function .onInit
...
@@ -180,7 +182,7 @@ Function .onInit
FunctionEnd
FunctionEnd
Function Done
Function Done
ExecWait '"$INSTDIR\installer\install.cmd"
${Show_output} ${Install_selenium} "${AppUrl}
"'
ExecWait '"$INSTDIR\installer\install.cmd"
"$INSTDIR" ${Show_output} ${Install_selenium} "${AppUrl}" >"$INSTDIR\install.log" 2>"$INSTDIR\install_error.log
"'
RMDir /r "$INSTDIR\installer"
RMDir /r "$INSTDIR\installer"
FunctionEnd
FunctionEnd
...
@@ -201,32 +203,71 @@ FunctionEnd
...
@@ -201,32 +203,71 @@ FunctionEnd
;--------------------------------
;--------------------------------
;Uninstaller Section
;Uninstaller Section
Section "Uninstall"
Section "Uninstall"
ExecWait '"$INSTDIR\uninstaller\uninstall.cmd" ${Show_output}'
StrCmp $LANGUAGE ${LANG_HUNGARIAN} 0 +4
IfFileExists "$SMPROGRAMS\${Company}\Ltogasd meg a ${AppUrlName}-t.url" 0 +2
Delete "$INSTDIR\${AppUninstaller}"
Delete "$SMPROGRAMS\${Company}\Ltogasd meg a ${AppUrlName}-t.url"
Goto +3
IfFileExists "$SMPROGRAMS\${Company}\Visit the ${AppUrlName}.url" 0 +2
Delete "$SMPROGRAMS\${Company}\Visit the ${AppUrlName}.url"
StrCmp $LANGUAGE ${LANG_HUNGARIAN} 0 +3
IfFileExists "$SMPROGRAMS\${Company}\${AppName}\*.*" 0 +2
Delete "$SMPROGRAMS\${Company}\Ltogasd meg a ${AppUrlName}-t.url"
RMDir /r "$SMPROGRAMS\${Company}\${AppName}"
Goto +2
Delete "$SMPROGRAMS\${Company}\Visit the ${AppUrlName}.url"
RMDir /r "$INSTDIR"
IfFileExists "$SMPROGRAMS\${Company}\*.*" +2 0
RMDir /r "$SMPROGRAMS\${Company}"
RMDir /r "$SMPROGRAMS\${Company}\${AppName}"
ExecWait '"$INSTDIR\uninstaller\uninstall.cmd" "$INSTDIR" ${Show_output} >"$INSTDIR\uninstall.log" 2>"$INSTDIR\uninstall_error.log"'
IfFileExists "$INSTDIR\uninstaller\*.*" 0 +2
RMDir /r "$INSTDIR\uninstaller"
IfFileExists "$INSTDIR\.rdp\*.*" 0 +2
RMDir /r "$INSTDIR\.rdp"
IfFileExists "$INSTDIR\client.log" 0 +2
Delete "$INSTDIR\client.log"
IfFileExists "$INSTDIR\cloud.py" 0 +2
Delete "$INSTDIR\cloud.py"
IfFileExists "$INSTDIR\cloud_connect_from_windows.py" 0 +2
Delete "$INSTDIR\cloud_connect_from_windows.py"
IfFileExists "$INSTDIR\nxkey.py" 0 +2
Delete "$INSTDIR\nxkey.py"
IfFileExists "$INSTDIR\OrderedDict.py" 0 +2
Delete "$INSTDIR\OrderedDict.py"
IfFileExists "$INSTDIR\putty.exe" 0 +2
Delete "$INSTDIR\putty.exe"
IfFileExists "$INSTDIR\win_install.py" 0 +2
Delete "$INSTDIR\win_install.py"
IfFileExists "$INSTDIR\windowsclasses.py" 0 +2
Delete "$INSTDIR\windowsclasses.py"
IfFileExists "$INSTDIR\windowsclasses.pyc" 0 +2
Delete "$INSTDIR\windowsclasses.pyc"
IfFileExists "$INSTDIR\${AppUninstaller}" 0 +2
Delete "$INSTDIR\${AppUninstaller}"
DeleteRegKey /ifempty HKCU "Software\${Company} ${AppName}"
StrCmp $INSTDIR "${DefaulLocation}" 0 +2
RMDir /r "$INSTDIR"
SectionEnd
SectionEnd
;--------------------------------
;--------------------------------
;Uninstaller Functions
;Uninstaller Functions
Function un.onInit
Function un.onInit
ClearErrors
ReadRegStr $0 HKCU "Software\${Company} ${AppName}" "install_directory"
${If} ${Errors}
${IF} $INSTDIR == ""
StrCpy $INSTDIR "$LOCALAPPDATA\CIRCLE"
${ENDIF}
${Else}
${IF} $0 == ""
StrCpy $INSTDIR "$LOCALAPPDATA\CIRCLE"
${ELSE}
StrCpy $INSTDIR $0
${ENDIF}
${EndIf}
${If} ${RunningX64}
${If} ${RunningX64}
${DisableX64FSRedirection}
${DisableX64FSRedirection}
SetRegView 64
SetRegView 64
${EndIf}
${EndIf}
!insertmacro MUI_UNGETLANGUAGE
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
FunctionEnd
\ No newline at end of file
Csók Tamás
@SM0FZR
mentioned in issue
#2 (closed)
Mar 11, 2015
mentioned in issue
#2 (closed)
mentioned in issue #2
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment