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
bf98e3e6
authored
Sep 24, 2014
by
Csók Tamás
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: added option to install 32bit pywin on 64bit system
parent
a66c7bf3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
11 deletions
+31
-11
src/nsi/installer/pywin_installer.py
+31
-11
No files found.
src/nsi/installer/pywin_installer.py
View file @
bf98e3e6
...
@@ -9,6 +9,23 @@ import os
...
@@ -9,6 +9,23 @@ import os
import
sys
import
sys
import
subprocess
import
subprocess
import
windowsclasses
import
windowsclasses
import
argparse
def
parse_arguments
():
"""
Argument parser, based on argparse module
Keyword arguments:
@return args -- arguments given by console
"""
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"change_architect"
,
type
=
str
,
help
=
"Whether the 32 bit Python version is installed on a 64bit system"
,
nargs
=
'?'
,
default
=
False
)
args
=
parser
.
parse_args
()
return
args
def
main
():
def
main
():
...
@@ -18,31 +35,34 @@ def main():
...
@@ -18,31 +35,34 @@ def main():
Job:
Job:
Install Pywin32 to the computer
Install Pywin32 to the computer
"""
"""
args
=
parse_arguments
()
if
sys
.
hexversion
<
0x02060000
:
if
sys
.
hexversion
<
0x02060000
:
print
"Not a 2.6+ version Python is running, commencing update"
print
"Not a 2.6+ version Python is running, commencing update"
subprocess
.
Popen
(
subprocess
.
Popen
(
"
%
s
\\
no_root_install.bat
"
%
os
.
path
.
dirname
(
"
%
s
\\
install.cmd
"
%
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)))
os
.
path
.
realpath
(
__file__
)))
sys
.
exit
(
1
)
sys
.
exit
(
1
)
else
:
else
:
pywin32_version
=
str
(
219
)
pywin32_version
=
str
(
219
)
if
sys
.
hexversion
<
0x02070000
:
if
sys
.
hexversion
<
0x02070000
:
if
windowsclasses
.
DecideArchitecture
.
Is64Windows
():
if
(
windowsclasses
.
DecideArchitecture
.
Is64Windows
()
subprocess
.
Popen
(
and
not
args
.
change_architect
):
"
%
s
\\
x64
\\
pywin32-
%
s.win-amd64-py2.6.exe"
%
(
subprocess
.
Popen
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
"
%
s
\\
x64
\\
pywin32-
%
s.win-amd64-py2.6.exe"
%
(
pywin32_version
))
.
wait
()
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
pywin32_version
))
.
wait
()
else
:
else
:
subprocess
.
Popen
(
subprocess
.
Popen
(
"
%
s
\\
x86
\\
pywin32-
%
s.win32-py2.6.exe"
%
(
"
%
s
\\
x86
\\
pywin32-
%
s.win32-py2.6.exe"
%
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
pywin32_version
))
.
wait
()
pywin32_version
))
.
wait
()
elif
sys
.
hexversion
<
0x02080000
:
elif
sys
.
hexversion
<
0x02080000
:
if
windowsclasses
.
DecideArchitecture
.
Is64Windows
():
if
(
windowsclasses
.
DecideArchitecture
.
Is64Windows
()
subprocess
.
Popen
(
and
not
args
.
change_architect
):
"
%
s
\\
x64
\\
pywin32-
%
s.win-amd64-py2.7.exe"
%
(
subprocess
.
Popen
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
"
%
s
\\
x64
\\
pywin32-
%
s.win-amd64-py2.7.exe"
%
(
pywin32_version
))
.
wait
()
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
pywin32_version
))
.
wait
()
else
:
else
:
subprocess
.
Popen
(
subprocess
.
Popen
(
"
%
s
\\
x86
\\
pywin32-
%
s.win32-py2.7.exe"
%
(
"
%
s
\\
x86
\\
pywin32-
%
s.win32-py2.7.exe"
%
(
...
...
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