Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e0f780d5
Commit
e0f780d5
authored
Sep 01, 2004
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conditionalize Tcl feature
parent
e47c381c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
35 deletions
+57
-35
Tools/msi/msi.py
Tools/msi/msi.py
+57
-35
No files found.
Tools/msi/msi.py
View file @
e0f780d5
...
@@ -22,6 +22,8 @@ srcdir = os.path.abspath("../..")
...
@@ -22,6 +22,8 @@ srcdir = os.path.abspath("../..")
# goes into file name and ProductCode. Defaults to
# goes into file name and ProductCode. Defaults to
# current_version.day for Snapshot, current_version otherwise
# current_version.day for Snapshot, current_version otherwise
full_current_version
=
None
full_current_version
=
None
# Is Tcl available at all?
have_tcl
=
True
try
:
try
:
from
config
import
*
from
config
import
*
...
@@ -762,6 +764,7 @@ def add_features(db):
...
@@ -762,6 +764,7 @@ def add_features(db):
ext_feature
=
Feature
(
db
,
"Extensions"
,
"Register Extensions"
,
ext_feature
=
Feature
(
db
,
"Extensions"
,
"Register Extensions"
,
"Make this Python installation the default Python installation"
,
3
,
"Make this Python installation the default Python installation"
,
3
,
parent
=
default_feature
)
parent
=
default_feature
)
if
have_tcl
:
tcltk
=
Feature
(
db
,
"TclTk"
,
"Tcl/Tk"
,
"Tkinter, IDLE, pydoc"
,
5
,
tcltk
=
Feature
(
db
,
"TclTk"
,
"Tcl/Tk"
,
"Tkinter, IDLE, pydoc"
,
5
,
parent
=
default_feature
,
attributes
=
2
)
parent
=
default_feature
,
attributes
=
2
)
htmlfiles
=
Feature
(
db
,
"Documentation"
,
"Documentation"
,
htmlfiles
=
Feature
(
db
,
"Documentation"
,
"Documentation"
,
...
@@ -811,6 +814,7 @@ def add_files(db):
...
@@ -811,6 +814,7 @@ def add_files(db):
# Add all executables, icons, text files into the TARGETDIR component
# Add all executables, icons, text files into the TARGETDIR component
root = PyDirectory(db, cab, None, srcdir, "
TARGETDIR
", "
SourceDir
")
root = PyDirectory(db, cab, None, srcdir, "
TARGETDIR
", "
SourceDir
")
default_feature.set_current()
default_feature.set_current()
if not msilib.Win64:
root.add_file("
PCBuild
/
w9xpopen
.
exe
")
root.add_file("
PCBuild
/
w9xpopen
.
exe
")
root.add_file("
PC
/
py
.
ico
")
root.add_file("
PC
/
py
.
ico
")
root.add_file("
PC
/
pyc
.
ico
")
root.add_file("
PC
/
pyc
.
ico
")
...
@@ -851,6 +855,8 @@ def add_files(db):
...
@@ -851,6 +855,8 @@ def add_files(db):
if dir == "
CVS
" or dir.startswith("
plat
-
"):
if dir == "
CVS
" or dir.startswith("
plat
-
"):
continue
continue
elif dir in ["
lib
-
tk
", "
idlelib
", "
Icons
"]:
elif dir in ["
lib
-
tk
", "
idlelib
", "
Icons
"]:
if not have_tcl:
continue
tcltk.set_current()
tcltk.set_current()
elif dir in ['test', 'output']:
elif dir in ['test', 'output']:
testsuite.set_current()
testsuite.set_current()
...
@@ -913,6 +919,7 @@ def add_files(db):
...
@@ -913,6 +919,7 @@ def add_files(db):
continue
continue
dlls.append(f)
dlls.append(f)
lib.add_file(f)
lib.add_file(f)
if have_tcl:
if not os.path.exists(srcdir+"
/
PCBuild
/
_tkinter
.
pyd
"):
if not os.path.exists(srcdir+"
/
PCBuild
/
_tkinter
.
pyd
"):
print "
WARNING
:
Missing
_tkinter
.
pyd
"
print "
WARNING
:
Missing
_tkinter
.
pyd
"
else:
else:
...
@@ -938,6 +945,7 @@ def add_files(db):
...
@@ -938,6 +945,7 @@ def add_files(db):
for f in dlls:
for f in dlls:
lib.add_file(f.replace('pyd','lib'))
lib.add_file(f.replace('pyd','lib'))
lib.add_file('python%s%s.lib' % (major, minor))
lib.add_file('python%s%s.lib' % (major, minor))
if have_tcl:
# Add Tcl/Tk
# Add Tcl/Tk
tcldirs = [(root, '../tcltk/lib', 'tcl')]
tcldirs = [(root, '../tcltk/lib', 'tcl')]
tcltk.set_current()
tcltk.set_current()
...
@@ -965,6 +973,7 @@ def add_files(db):
...
@@ -965,6 +973,7 @@ def add_files(db):
x.glob("
*
.
txt
")
x.glob("
*
.
txt
")
if f == 'Scripts':
if f == 'Scripts':
lib.add_file("
README
.
txt
", src="
README
")
lib.add_file("
README
.
txt
", src="
README
")
if have_tcl:
lib.start_component("
pydocgui
.
pyw
", tcltk, keyfile="
pydocgui
.
pyw
")
lib.start_component("
pydocgui
.
pyw
", tcltk, keyfile="
pydocgui
.
pyw
")
lib.add_file("
pydocgui
.
pyw
")
lib.add_file("
pydocgui
.
pyw
")
# Add documentation
# Add documentation
...
@@ -984,25 +993,32 @@ def add_registry(db):
...
@@ -984,25 +993,32 @@ def add_registry(db):
# IDLE verbs depend on the tcltk feature.
# IDLE verbs depend on the tcltk feature.
# msidbComponentAttributesRegistryKeyPath = 4
# msidbComponentAttributesRegistryKeyPath = 4
# -1 for Root specifies "
dependent
on
ALLUSERS
property
"
# -1 for Root specifies "
dependent
on
ALLUSERS
property
"
tcldata = []
if have_tcl:
tcldata = [
("
REGISTRY
.
tcl
", msilib.gen_uuid(), "
TARGETDIR
", 4,
"
&%
s
<>
2
" % ext_feature.id, "
py
.
IDLE
")]
add_data(db, "
Component
",
add_data(db, "
Component
",
# msidbComponentAttributesRegistryKeyPath = 4
# msidbComponentAttributesRegistryKeyPath = 4
[("
REGISTRY
", msilib.gen_uuid(), "
TARGETDIR
", 4, None,
[("
REGISTRY
", msilib.gen_uuid(), "
TARGETDIR
", 4, None,
"
InstallPath
"),
"
InstallPath
"),
("
REGISTRY
.
def
", msilib.gen_uuid(), "
TARGETDIR
", 4,
("
REGISTRY
.
def
", msilib.gen_uuid(), "
TARGETDIR
", 4,
None, None),
None, None)] + tcldata)
("
REGISTRY
.
tcl
", msilib.gen_uuid(), "
TARGETDIR
", 4,
"
&%
s
<>
2
" % ext_feature.id, "
py
.
IDLE
")])
# See "
FeatureComponents
Table
".
# See "
FeatureComponents
Table
".
# The association between TclTk and pythonw.exe is necessary to make ICE59
# The association between TclTk and pythonw.exe is necessary to make ICE59
# happy, because the installer otherwise believes that the IDLE and PyDoc
# happy, because the installer otherwise believes that the IDLE and PyDoc
# shortcuts might get installed without pythonw.exe being install. This
# shortcuts might get installed without pythonw.exe being install. This
# is not true, since installing TclTk will install the default feature, which
# is not true, since installing TclTk will install the default feature, which
# will cause pythonw.exe to be installed.
# will cause pythonw.exe to be installed.
tcldata = []
if have_tcl:
tcltkdata = [(tcltk.id, "
REGISTRY
.
tcl
"),
(tcltk.id, "
pythonw
.
exe
")]
add_data(db, "
FeatureComponents
",
add_data(db, "
FeatureComponents
",
[(default_feature.id, "
REGISTRY
"),
[(default_feature.id, "
REGISTRY
"),
(ext_feature.id, "
REGISTRY
.
def
")
,
(ext_feature.id, "
REGISTRY
.
def
")
] +
(tcltk.id, "
REGISTRY
.
tcl
"),
tcldata
(tcltk.id, "
pythonw
.
exe
")]
)
)
pat = r"
Software
\
Classes
\
%
sPython
.
%
sFile
\
shell
\
%
s
\
command
"
pat = r"
Software
\
Classes
\
%
sPython
.
%
sFile
\
shell
\
%
s
\
command
"
ewi = "
Edit
with
IDLE
"
ewi = "
Edit
with
IDLE
"
...
@@ -1028,6 +1044,7 @@ def add_registry(db):
...
@@ -1028,6 +1044,7 @@ def add_registry(db):
# Non-advertised verbs: for advertised verbs, we would need to invoke the same
# Non-advertised verbs: for advertised verbs, we would need to invoke the same
# executable for both open and "
Edit
with
IDLE
". This cannot work, as we want
# executable for both open and "
Edit
with
IDLE
". This cannot work, as we want
# to use pythonw.exe in either case
# to use pythonw.exe in either case
if have_tcl:
add_data(db, "
Registry
",
add_data(db, "
Registry
",
[#Verbs
[#Verbs
("
py
.
IDLE
", -1, pat % (testprefix, "", ewi), "",
("
py
.
IDLE
", -1, pat % (testprefix, "", ewi), "",
...
@@ -1058,12 +1075,17 @@ def add_registry(db):
...
@@ -1058,12 +1075,17 @@ def add_registry(db):
("
MenuDir
", "
ProgramMenuFolder
", "
PY
%
s
%
s
|%
sPython
%
s
.
%
s
" % (major,minor,testprefix,major,minor))])
("
MenuDir
", "
ProgramMenuFolder
", "
PY
%
s
%
s
|%
sPython
%
s
.
%
s
" % (major,minor,testprefix,major,minor))])
add_data(db, "
RemoveFile
",
add_data(db, "
RemoveFile
",
[("
MenuDir
", "
TARGETDIR
", None, "
MenuDir
", 2)])
[("
MenuDir
", "
TARGETDIR
", None, "
MenuDir
", 2)])
add_data(db, "
Shortcut
",
tcltkshortcuts = []
[# Advertised shortcuts: targets are features, not files
if have_tcl:
tcltkshortcuts = [
("
IDLE
", "
MenuDir
", "
IDLE
|
IDLE
(
Python
GUI
)
", "
pythonw
.
exe
",
("
IDLE
", "
MenuDir
", "
IDLE
|
IDLE
(
Python
GUI
)
", "
pythonw
.
exe
",
tcltk.id, r"
[
TARGETDIR
]
Lib
\
idlelib
\
idle
.
pyw
", None, None, "
python_icon
.
exe
", 0, None, "
TARGETDIR
"),
tcltk.id, r"
[
TARGETDIR
]
Lib
\
idlelib
\
idle
.
pyw
", None, None, "
python_icon
.
exe
", 0, None, "
TARGETDIR
"),
("
PyDoc
", "
MenuDir
", "
MODDOCS
|
Module
Docs
", "
pythonw
.
exe
",
("
PyDoc
", "
MenuDir
", "
MODDOCS
|
Module
Docs
", "
pythonw
.
exe
",
tcltk.id, r"
[
TARGETDIR
]
Tools
\
scripts
\
pydocgui
.
pyw
", None, None, "
python_icon
.
exe
", 0, None, "
TARGETDIR
"),
tcltk.id, r"
[
TARGETDIR
]
Tools
\
scripts
\
pydocgui
.
pyw
", None, None, "
python_icon
.
exe
", 0, None, "
TARGETDIR
"),
]
add_data(db, "
Shortcut
",
tcltkshortcuts +
[# Advertised shortcuts: targets are features, not files
("
Python
", "
MenuDir
", "
PYTHON
|
Python
(
command
line
)
", "
python
.
exe
",
("
Python
", "
MenuDir
", "
PYTHON
|
Python
(
command
line
)
", "
python
.
exe
",
default_feature.id, None, None, None, "
python_icon
.
exe
", 2, None, "
TARGETDIR
"),
default_feature.id, None, None, None, "
python_icon
.
exe
", 2, None, "
TARGETDIR
"),
("
Manual
", "
MenuDir
", "
MANUAL
|
Python
Manuals
", "
documentation
",
("
Manual
", "
MenuDir
", "
MANUAL
|
Python
Manuals
", "
documentation
",
...
...
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