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
c4902525
authored
Jun 15, 2015
by
Csók Tamás
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: installation stabilility fix
parent
1e0e7dea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
30 deletions
+32
-30
src/nsi/installer/win_install.py
+32
-30
No files found.
src/nsi/installer/win_install.py
View file @
c4902525
...
@@ -50,8 +50,8 @@ def parse_arguments():
...
@@ -50,8 +50,8 @@ def parse_arguments():
help
=
"Remove installed files instead of creating them"
,
help
=
"Remove installed files instead of creating them"
,
action
=
"store_true"
,
required
=
False
)
action
=
"store_true"
,
required
=
False
)
parser
.
add_argument
(
parser
.
add_argument
(
"-
u"
,
"--url
"
,
"-
n"
,
"--nx
"
,
help
=
"Whether we
installed and we want to use selenium
or not"
,
help
=
"Whether we
want to install the NX Client
or not"
,
action
=
"store_true"
,
required
=
False
)
action
=
"store_true"
,
required
=
False
)
parser
.
add_argument
(
parser
.
add_argument
(
"-t"
,
"--target"
,
"-t"
,
"--target"
,
...
@@ -110,8 +110,8 @@ def main():
...
@@ -110,8 +110,8 @@ def main():
os
.
remove
(
"
%
s
%
s"
%
(
location
,
".url"
))
os
.
remove
(
"
%
s
%
s"
%
(
location
,
".url"
))
print
"
%
s
%
s file successfully removed"
%
(
location
,
".url"
)
print
"
%
s
%
s file successfully removed"
%
(
location
,
".url"
)
for
subdir
,
dirs
,
files
in
os
.
walk
(
args
.
location
):
for
subdir
,
dirs
,
files
in
os
.
walk
(
args
.
location
):
for
file
in
files
:
for
current_
file
in
files
:
path
=
os
.
path
.
join
(
subdir
,
file
)
path
=
os
.
path
.
join
(
subdir
,
current_
file
)
fileName
,
fileExtension
=
os
.
path
.
splitext
(
path
)
fileName
,
fileExtension
=
os
.
path
.
splitext
(
path
)
if
((
fileExtension
==
'.pyc'
or
if
((
fileExtension
==
'.pyc'
or
fileExtension
==
'.lnk'
or
fileExtension
==
'.lnk'
or
...
@@ -122,12 +122,36 @@ def main():
...
@@ -122,12 +122,36 @@ def main():
os
.
remove
(
path
)
os
.
remove
(
path
)
print
"
%
s file successfully removed"
%
path
print
"
%
s file successfully removed"
%
path
else
:
else
:
subprocess
.
call
(
print
"Creating custom URL protocol handlers"
"python
%
s
\\
nx_client_installer.py"
%
os
.
path
.
dirname
(
try
:
os
.
path
.
realpath
(
__file__
)))
custom_protocol
=
OrderedDict
([
(
'circle'
,
[
"default"
,
"URL:circle Protocol"
,
"URL Protocol"
,
""
]),
(
'circle
\\
URL Protocol'
,
""
),
(
'circle
\\
DefaultIcon'
,
args
.
location
+
"cloud.ico"
),
(
'circle
\\
shell'
,
{
'open'
:
{
'command'
:
(
"
\"
%(prefix)
s
\
pythonw.exe
\"
"
"
\"
%(location)
s"
"cloud.py
\"
"
%
{
'prefix'
:
sys
.
exec_prefix
,
'location'
:
args
.
location
}
+
r'"
%1
"'
)
}})
])
custom_protocol_register
(
custom_protocol
)
except
:
print
"Error! URL Protocol handler installation aborted!"
if
args
.
nx
:
print
"Running NX Client install"
subprocess
.
call
(
"python
%
s
\\
nx_client_installer.py"
%
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)))
if
args
.
url
:
if
args
.
url
:
location
=
os
.
path
.
join
(
desktop_path
,
"CIRCLE Client.url"
)
location
=
os
.
path
.
join
(
desktop_path
,
"CIRCLE Client.url"
)
shortcut
=
file
(
location
,
'w'
)
shortcut
=
open
(
location
,
"w"
)
shortcut
.
write
(
'[InternetShortcut]
\n
'
)
shortcut
.
write
(
'[InternetShortcut]
\n
'
)
shortcut
.
write
(
'URL='
+
args
.
target
)
shortcut
.
write
(
'URL='
+
args
.
target
)
shortcut
.
close
()
shortcut
.
close
()
...
@@ -149,28 +173,6 @@ def main():
...
@@ -149,28 +173,6 @@ def main():
persist_file
.
Save
(
location
,
0
)
persist_file
.
Save
(
location
,
0
)
print
"Icon successfully created on desktop"
print
"Icon successfully created on desktop"
shutil
.
copy
(
location
,
args
.
location
)
shutil
.
copy
(
location
,
args
.
location
)
print
"Creating custom URL protocol handlers"
try
:
custom_protocol
=
OrderedDict
([
(
'circle'
,
[
"default"
,
"URL:circle Protocol"
,
"URL Protocol"
,
""
]),
(
'circle
\\
URL Protocol'
,
""
),
(
'circle
\\
DefaultIcon'
,
args
.
location
+
"cloud.ico"
),
(
'circle
\\
shell'
,
{
'open'
:
{
'command'
:
(
"
\"
%(prefix)
s
\
pythonw.exe
\"
"
"
\"
%(location)
s"
"cloud.py
\"
"
%
{
'prefix'
:
sys
.
exec_prefix
,
'location'
:
args
.
location
}
+
r'"
%1
"'
)
}})
])
custom_protocol_register
(
custom_protocol
)
except
:
print
"Error! URL Protocol handler installation aborted!"
except
:
except
:
print
"Unknown error occurred! Please contact the developers!"
print
"Unknown error occurred! Please contact the developers!"
...
...
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