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
754752f6
authored
Jun 15, 2015
by
Csók Tamás
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: nx client installation is optional, selenium fully depricated
parent
c4902525
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
63 deletions
+65
-63
src/nsi/cloud.nsi
+45
-13
src/nsi/installer/install.cmd
+12
-18
src/nsi/installer/win_install.py
+8
-32
No files found.
src/nsi/cloud.nsi
View file @
754752f6
...
...
@@ -17,7 +17,6 @@
!define AppUninstaller "Uninstall.exe"
!define IconName "cloud"
!define Show_output "True"
!define Install_selenium "False"
!define DefaulLocation "$LOCALAPPDATA\CIRCLE"
;--------------------------------
...
...
@@ -67,6 +66,7 @@
;--------------------------------
;Pages
!insertmacro MUI_PAGE_LICENSE "gpl-3.0.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
;Done fuction to launch install.bat
...
...
@@ -146,12 +146,34 @@
!insertmacro MUI_RESERVEFILE_LANGDLL
;--------------------------------
;Languanges
;Language strings
LangString NAME_SecInstall ${LANG_ENGLISH} "CIRCLE Client"
LangString NAME_SecInstall ${LANG_HUNGARIAN} "CIRCLE Kliens"
LangString NAME_NXClient ${LANG_ENGLISH} "NoMachine NX Client"
LangString NAME_NXClient ${LANG_HUNGARIAN} "NoMachine NX Kliens"
LangString DESC_NXClient ${LANG_ENGLISH} "Check whether you want to install a CIRCLE compatible NX Client by NoMachine.$\r$\n\
Used for [NX] type of connections."
LangString DESC_NXClient ${LANG_HUNGARIAN} "Vlassza ki, ha fel szeretn telepteni a NoMachine ltal gyrtott NX Klienst.$\r$\n\
[NX] fle kapcsolatokhoz hasznlt."
LangString DESC_SecInstall ${LANG_ENGLISH} "Install the core of the CIRCLE Client.$\r$\n\
Used for [RDP / SSH] type of connections.$\r$\n\
Automates all installed, third party connection tools."
LangString DESC_SecInstall ${LANG_HUNGARIAN} "A CIRCLE Kliens alapjnak teleptse.$\r$\n\
[RDP / SSH] fle kapcsolatokhoz hasznlt.$\r$\n\
Automatizlja az installlt, harmadik fltl szrmaz szoftverek hasznlatt."
;--------------------------------
;Installer Sections
Section "Install Section" SecInstall
Section $(NAME_SecInstall) SecInstall
SectionIn RO
SetOutPath "$INSTDIR"
;ADD OWN FILES HERE----------------------------------------
File /r installer
File /r
/x *nxclient-3.5.0-9.exe /x *nx_client_installer.py
installer
File /r uninstaller
;Store installation folder
...
...
@@ -169,6 +191,12 @@ Section "Install Section" SecInstall
CreateShortCut '$SMPROGRAMS\${Company}\${AppName}\Uninstall ${AppName}.lnk' '$INSTDIR\${AppUninstaller}' "" '$INSTDIR\${AppUninstaller}' 0
SectionEnd
Section /o $(NAME_NXClient) NXClient
SetOutPath "$INSTDIR\installer"
File 'installer\nxclient-3.5.0-9.exe'
File 'installer\nx_client_installer.py'
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
...
...
@@ -182,21 +210,25 @@ Function .onInit
FunctionEnd
Function Done
ExecWait '"$INSTDIR\installer\install.cmd" "$INSTDIR" ${Show_output} ${Install_selenium} "${AppUrl}" >"$INSTDIR\install.log" 2>"$INSTDIR\install_error.log"'
SectionGetFlags ${NXClient} $0
Var /GLOBAL nx_install
IntOp $0 $0 & ${SF_SELECTED}
IntCmp $0 ${SF_SELECTED} equal
StrCpy $nx_install "False"
Goto done
equal:
StrCpy $nx_install "True"
done:
ExecWait '"$INSTDIR\installer\install.cmd" "$INSTDIR" ${Show_output} $nx_install "${AppUrl}" >"$INSTDIR\install.log" 2>"$INSTDIR\install_error.log"'
RMDir /r "$INSTDIR\installer"
FunctionEnd
;--------------------------------
;Descriptions
;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
;Assign descriptions to sections
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
StrCmp $LANGUAGE ${LANG_HUNGARIAN} 0 +3
!insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} "A ${AppName} installlsa"
Goto +2
!insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} "Installing the ${AppName}"
!insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} $(DESC_SecInstall)
!insertmacro MUI_DESCRIPTION_TEXT ${NXClient} $(DESC_NXClient)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
...
...
src/nsi/installer/install.cmd
View file @
754752f6
...
...
@@ -16,21 +16,23 @@ IF NOT "%2"=="" (
) else (
SET "output_on_screen=True"
)
rem Set whether we want to install
selenium
or not
rem Set whether we want to install
NX Client
or not
IF NOT "%3"=="" (
SET "install_
selenium
=%3"
SET "install_
nx
=%3"
) else (
SET "install_
selenium
=False"
SET "install_
nx
=False"
)
if NOT "!install_nx!"=="False" (
SET "nx_install= -n"
)
rem Set which website should the icon point to
SET "site=^"http://cloud.bme.hu/^""
IF NOT "%4"=="" (
IF "%install_selenium%"=="False" (
SET site=%4
SET my_site=!site:"=!
SET "website= -t ^"!my_site!^""
)
SET site=%4
)
SET my_site=!site:"=!
SET "website= -t ^"!my_site!^""
SET "32PythonOn64=False"
...
...
@@ -51,7 +53,7 @@ if '%errorlevel%' NEQ '0' (
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > ^"%temp%\getadmin.vbs^"
set vbs_site=!site:"=""!
echo UAC.ShellExecute "cmd.exe", "/c %~s0 !output_on_screen! !install_
selenium
! !vbs_site!", "", "runas", 1 >> "%temp%\getadmin.vbs"
echo UAC.ShellExecute "cmd.exe", "/c %~s0 !output_on_screen! !install_
nx
! !vbs_site!", "", "runas", 1 >> "%temp%\getadmin.vbs"
^"%temp%\getadmin.vbs^"
del "%temp%\getadmin.vbs"
...
...
@@ -291,19 +293,11 @@ IF NOT "!output_on_screen!"=="False" (
)
@echo Done
@echo.
IF "%install_selenium%"=="False" (
SET "create_url_icon= -u"
) else (
SET "create_url_icon="
)
IF NOT "!output_on_screen!"=="False" (
@echo Starting the python installation script>CON
)
@echo Starting the python installation script
if NOT "!browserToUse!"=="" (
SET "selenium_driver= -d !browserToUse!"
)
call python ^"%running_directory%win_install.py^"!selenium_driver! ^-l "%install_location%\\"!create_url_icon!!website!
call python ^"%running_directory%win_install.py^"!nx_install! ^-l "%install_location%\\"!website!
IF NOT "!output_on_screen!"=="False" (
@echo Done>CON
@echo Installation complete>CON
...
...
src/nsi/installer/win_install.py
View file @
754752f6
...
...
@@ -83,14 +83,6 @@ def custom_protocol_register(custom_protocol):
def
main
():
"""
Main program
Jobs:
read the parameters
create a proper icon with the proper driver (or delete)
call the nx_client_installer
"""
try
:
args
=
parse_arguments
()
shortcut
=
pythoncom
.
CoCreateInstance
(
...
...
@@ -122,7 +114,7 @@ def main():
os
.
remove
(
path
)
print
"
%
s file successfully removed"
%
path
else
:
print
"Creating custom URL protocol handler
s
"
print
"Creating custom URL protocol handler"
try
:
custom_protocol
=
OrderedDict
([
(
'circle'
,
[
"default"
,
...
...
@@ -149,30 +141,14 @@ def main():
subprocess
.
call
(
"python
%
s
\\
nx_client_installer.py"
%
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)))
if
args
.
url
:
location
=
os
.
path
.
join
(
desktop_path
,
"CIRCLE Client.url"
)
shortcut
=
open
(
location
,
"w"
)
shortcut
.
write
(
'[InternetShortcut]
\n
'
)
shortcut
.
write
(
'URL='
+
args
.
target
)
shortcut
.
close
()
else
:
shortcut
.
SetPath
(
args
.
location
+
"cloud.py"
)
if
args
.
driver
==
"chrome"
:
shortcut
.
SetArguments
(
"-d chrome"
)
elif
args
.
driver
==
"iexplore"
:
shortcut
.
SetArguments
(
"-d ie"
)
elif
args
.
driver
==
"opera"
:
shortcut
.
SetArguments
(
"-d opera"
)
shortcut
.
SetDescription
(
"Tool to use CIRCLE Cloud"
)
shortcut
.
SetIconLocation
(
args
.
location
+
"cloud.ico"
,
0
)
desktop_path
=
shell
.
SHGetFolderPath
(
0
,
shellcon
.
CSIDL_DESKTOP
,
0
,
0
)
persist_file
=
shortcut
.
QueryInterface
(
pythoncom
.
IID_IPersistFile
)
location
=
os
.
path
.
join
(
desktop_path
,
"CIRCLE Client.lnk"
)
persist_file
.
Save
(
location
,
0
)
print
"Icon successfully created on desktop"
print
"Creating icon in the installation folder"
location
=
os
.
path
.
join
(
desktop_path
,
"CIRCLE Client.url"
)
shortcut
=
open
(
location
,
"w"
)
shortcut
.
write
(
'[InternetShortcut]
\n
'
)
shortcut
.
write
(
'URL='
+
args
.
target
)
shortcut
.
close
()
shutil
.
copy
(
location
,
args
.
location
)
print
"Icon successfully created"
except
:
print
"Unknown error occurred! Please contact the developers!"
...
...
Csók Tamás
@SM0FZR
mentioned in issue
#5 (closed)
Jun 16, 2015
mentioned in issue
#5 (closed)
mentioned in issue #5
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