mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
python-3.6.zip added from Github
README.cosmo contains the necessary links.
This commit is contained in:
parent
75fc601ff5
commit
0c4c56ff39
4219 changed files with 1968626 additions and 0 deletions
483
third_party/python/Lib/msilib/__init__.py
vendored
Normal file
483
third_party/python/Lib/msilib/__init__.py
vendored
Normal file
|
@ -0,0 +1,483 @@
|
|||
# Copyright (C) 2005 Martin v. Löwis
|
||||
# Licensed to PSF under a Contributor Agreement.
|
||||
from _msi import *
|
||||
import fnmatch
|
||||
import os
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
|
||||
AMD64 = "AMD64" in sys.version
|
||||
Itanium = "Itanium" in sys.version
|
||||
Win64 = AMD64 or Itanium
|
||||
|
||||
# Partially taken from Wine
|
||||
datasizemask= 0x00ff
|
||||
type_valid= 0x0100
|
||||
type_localizable= 0x0200
|
||||
|
||||
typemask= 0x0c00
|
||||
type_long= 0x0000
|
||||
type_short= 0x0400
|
||||
type_string= 0x0c00
|
||||
type_binary= 0x0800
|
||||
|
||||
type_nullable= 0x1000
|
||||
type_key= 0x2000
|
||||
# XXX temporary, localizable?
|
||||
knownbits = datasizemask | type_valid | type_localizable | \
|
||||
typemask | type_nullable | type_key
|
||||
|
||||
class Table:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.fields = []
|
||||
|
||||
def add_field(self, index, name, type):
|
||||
self.fields.append((index,name,type))
|
||||
|
||||
def sql(self):
|
||||
fields = []
|
||||
keys = []
|
||||
self.fields.sort()
|
||||
fields = [None]*len(self.fields)
|
||||
for index, name, type in self.fields:
|
||||
index -= 1
|
||||
unk = type & ~knownbits
|
||||
if unk:
|
||||
print("%s.%s unknown bits %x" % (self.name, name, unk))
|
||||
size = type & datasizemask
|
||||
dtype = type & typemask
|
||||
if dtype == type_string:
|
||||
if size:
|
||||
tname="CHAR(%d)" % size
|
||||
else:
|
||||
tname="CHAR"
|
||||
elif dtype == type_short:
|
||||
assert size==2
|
||||
tname = "SHORT"
|
||||
elif dtype == type_long:
|
||||
assert size==4
|
||||
tname="LONG"
|
||||
elif dtype == type_binary:
|
||||
assert size==0
|
||||
tname="OBJECT"
|
||||
else:
|
||||
tname="unknown"
|
||||
print("%s.%sunknown integer type %d" % (self.name, name, size))
|
||||
if type & type_nullable:
|
||||
flags = ""
|
||||
else:
|
||||
flags = " NOT NULL"
|
||||
if type & type_localizable:
|
||||
flags += " LOCALIZABLE"
|
||||
fields[index] = "`%s` %s%s" % (name, tname, flags)
|
||||
if type & type_key:
|
||||
keys.append("`%s`" % name)
|
||||
fields = ", ".join(fields)
|
||||
keys = ", ".join(keys)
|
||||
return "CREATE TABLE %s (%s PRIMARY KEY %s)" % (self.name, fields, keys)
|
||||
|
||||
def create(self, db):
|
||||
v = db.OpenView(self.sql())
|
||||
v.Execute(None)
|
||||
v.Close()
|
||||
|
||||
class _Unspecified:pass
|
||||
def change_sequence(seq, action, seqno=_Unspecified, cond = _Unspecified):
|
||||
"Change the sequence number of an action in a sequence list"
|
||||
for i in range(len(seq)):
|
||||
if seq[i][0] == action:
|
||||
if cond is _Unspecified:
|
||||
cond = seq[i][1]
|
||||
if seqno is _Unspecified:
|
||||
seqno = seq[i][2]
|
||||
seq[i] = (action, cond, seqno)
|
||||
return
|
||||
raise ValueError("Action not found in sequence")
|
||||
|
||||
def add_data(db, table, values):
|
||||
v = db.OpenView("SELECT * FROM `%s`" % table)
|
||||
count = v.GetColumnInfo(MSICOLINFO_NAMES).GetFieldCount()
|
||||
r = CreateRecord(count)
|
||||
for value in values:
|
||||
assert len(value) == count, value
|
||||
for i in range(count):
|
||||
field = value[i]
|
||||
if isinstance(field, int):
|
||||
r.SetInteger(i+1,field)
|
||||
elif isinstance(field, str):
|
||||
r.SetString(i+1,field)
|
||||
elif field is None:
|
||||
pass
|
||||
elif isinstance(field, Binary):
|
||||
r.SetStream(i+1, field.name)
|
||||
else:
|
||||
raise TypeError("Unsupported type %s" % field.__class__.__name__)
|
||||
try:
|
||||
v.Modify(MSIMODIFY_INSERT, r)
|
||||
except Exception as e:
|
||||
raise MSIError("Could not insert "+repr(values)+" into "+table)
|
||||
|
||||
r.ClearData()
|
||||
v.Close()
|
||||
|
||||
|
||||
def add_stream(db, name, path):
|
||||
v = db.OpenView("INSERT INTO _Streams (Name, Data) VALUES ('%s', ?)" % name)
|
||||
r = CreateRecord(1)
|
||||
r.SetStream(1, path)
|
||||
v.Execute(r)
|
||||
v.Close()
|
||||
|
||||
def init_database(name, schema,
|
||||
ProductName, ProductCode, ProductVersion,
|
||||
Manufacturer):
|
||||
try:
|
||||
os.unlink(name)
|
||||
except OSError:
|
||||
pass
|
||||
ProductCode = ProductCode.upper()
|
||||
# Create the database
|
||||
db = OpenDatabase(name, MSIDBOPEN_CREATE)
|
||||
# Create the tables
|
||||
for t in schema.tables:
|
||||
t.create(db)
|
||||
# Fill the validation table
|
||||
add_data(db, "_Validation", schema._Validation_records)
|
||||
# Initialize the summary information, allowing atmost 20 properties
|
||||
si = db.GetSummaryInformation(20)
|
||||
si.SetProperty(PID_TITLE, "Installation Database")
|
||||
si.SetProperty(PID_SUBJECT, ProductName)
|
||||
si.SetProperty(PID_AUTHOR, Manufacturer)
|
||||
if Itanium:
|
||||
si.SetProperty(PID_TEMPLATE, "Intel64;1033")
|
||||
elif AMD64:
|
||||
si.SetProperty(PID_TEMPLATE, "x64;1033")
|
||||
else:
|
||||
si.SetProperty(PID_TEMPLATE, "Intel;1033")
|
||||
si.SetProperty(PID_REVNUMBER, gen_uuid())
|
||||
si.SetProperty(PID_WORDCOUNT, 2) # long file names, compressed, original media
|
||||
si.SetProperty(PID_PAGECOUNT, 200)
|
||||
si.SetProperty(PID_APPNAME, "Python MSI Library")
|
||||
# XXX more properties
|
||||
si.Persist()
|
||||
add_data(db, "Property", [
|
||||
("ProductName", ProductName),
|
||||
("ProductCode", ProductCode),
|
||||
("ProductVersion", ProductVersion),
|
||||
("Manufacturer", Manufacturer),
|
||||
("ProductLanguage", "1033")])
|
||||
db.Commit()
|
||||
return db
|
||||
|
||||
def add_tables(db, module):
|
||||
for table in module.tables:
|
||||
add_data(db, table, getattr(module, table))
|
||||
|
||||
def make_id(str):
|
||||
identifier_chars = string.ascii_letters + string.digits + "._"
|
||||
str = "".join([c if c in identifier_chars else "_" for c in str])
|
||||
if str[0] in (string.digits + "."):
|
||||
str = "_" + str
|
||||
assert re.match("^[A-Za-z_][A-Za-z0-9_.]*$", str), "FILE"+str
|
||||
return str
|
||||
|
||||
def gen_uuid():
|
||||
return "{"+UuidCreate().upper()+"}"
|
||||
|
||||
class CAB:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.files = []
|
||||
self.filenames = set()
|
||||
self.index = 0
|
||||
|
||||
def gen_id(self, file):
|
||||
logical = _logical = make_id(file)
|
||||
pos = 1
|
||||
while logical in self.filenames:
|
||||
logical = "%s.%d" % (_logical, pos)
|
||||
pos += 1
|
||||
self.filenames.add(logical)
|
||||
return logical
|
||||
|
||||
def append(self, full, file, logical):
|
||||
if os.path.isdir(full):
|
||||
return
|
||||
if not logical:
|
||||
logical = self.gen_id(file)
|
||||
self.index += 1
|
||||
self.files.append((full, logical))
|
||||
return self.index, logical
|
||||
|
||||
def commit(self, db):
|
||||
from tempfile import mktemp
|
||||
filename = mktemp()
|
||||
FCICreate(filename, self.files)
|
||||
add_data(db, "Media",
|
||||
[(1, self.index, None, "#"+self.name, None, None)])
|
||||
add_stream(db, self.name, filename)
|
||||
os.unlink(filename)
|
||||
db.Commit()
|
||||
|
||||
_directories = set()
|
||||
class Directory:
|
||||
def __init__(self, db, cab, basedir, physical, _logical, default, componentflags=None):
|
||||
"""Create a new directory in the Directory table. There is a current component
|
||||
at each point in time for the directory, which is either explicitly created
|
||||
through start_component, or implicitly when files are added for the first
|
||||
time. Files are added into the current component, and into the cab file.
|
||||
To create a directory, a base directory object needs to be specified (can be
|
||||
None), the path to the physical directory, and a logical directory name.
|
||||
Default specifies the DefaultDir slot in the directory table. componentflags
|
||||
specifies the default flags that new components get."""
|
||||
index = 1
|
||||
_logical = make_id(_logical)
|
||||
logical = _logical
|
||||
while logical in _directories:
|
||||
logical = "%s%d" % (_logical, index)
|
||||
index += 1
|
||||
_directories.add(logical)
|
||||
self.db = db
|
||||
self.cab = cab
|
||||
self.basedir = basedir
|
||||
self.physical = physical
|
||||
self.logical = logical
|
||||
self.component = None
|
||||
self.short_names = set()
|
||||
self.ids = set()
|
||||
self.keyfiles = {}
|
||||
self.componentflags = componentflags
|
||||
if basedir:
|
||||
self.absolute = os.path.join(basedir.absolute, physical)
|
||||
blogical = basedir.logical
|
||||
else:
|
||||
self.absolute = physical
|
||||
blogical = None
|
||||
add_data(db, "Directory", [(logical, blogical, default)])
|
||||
|
||||
def start_component(self, component = None, feature = None, flags = None, keyfile = None, uuid=None):
|
||||
"""Add an entry to the Component table, and make this component the current for this
|
||||
directory. If no component name is given, the directory name is used. If no feature
|
||||
is given, the current feature is used. If no flags are given, the directory's default
|
||||
flags are used. If no keyfile is given, the KeyPath is left null in the Component
|
||||
table."""
|
||||
if flags is None:
|
||||
flags = self.componentflags
|
||||
if uuid is None:
|
||||
uuid = gen_uuid()
|
||||
else:
|
||||
uuid = uuid.upper()
|
||||
if component is None:
|
||||
component = self.logical
|
||||
self.component = component
|
||||
if Win64:
|
||||
flags |= 256
|
||||
if keyfile:
|
||||
keyid = self.cab.gen_id(self.absolute, keyfile)
|
||||
self.keyfiles[keyfile] = keyid
|
||||
else:
|
||||
keyid = None
|
||||
add_data(self.db, "Component",
|
||||
[(component, uuid, self.logical, flags, None, keyid)])
|
||||
if feature is None:
|
||||
feature = current_feature
|
||||
add_data(self.db, "FeatureComponents",
|
||||
[(feature.id, component)])
|
||||
|
||||
def make_short(self, file):
|
||||
oldfile = file
|
||||
file = file.replace('+', '_')
|
||||
file = ''.join(c for c in file if not c in r' "/\[]:;=,')
|
||||
parts = file.split(".")
|
||||
if len(parts) > 1:
|
||||
prefix = "".join(parts[:-1]).upper()
|
||||
suffix = parts[-1].upper()
|
||||
if not prefix:
|
||||
prefix = suffix
|
||||
suffix = None
|
||||
else:
|
||||
prefix = file.upper()
|
||||
suffix = None
|
||||
if len(parts) < 3 and len(prefix) <= 8 and file == oldfile and (
|
||||
not suffix or len(suffix) <= 3):
|
||||
if suffix:
|
||||
file = prefix+"."+suffix
|
||||
else:
|
||||
file = prefix
|
||||
else:
|
||||
file = None
|
||||
if file is None or file in self.short_names:
|
||||
prefix = prefix[:6]
|
||||
if suffix:
|
||||
suffix = suffix[:3]
|
||||
pos = 1
|
||||
while 1:
|
||||
if suffix:
|
||||
file = "%s~%d.%s" % (prefix, pos, suffix)
|
||||
else:
|
||||
file = "%s~%d" % (prefix, pos)
|
||||
if file not in self.short_names: break
|
||||
pos += 1
|
||||
assert pos < 10000
|
||||
if pos in (10, 100, 1000):
|
||||
prefix = prefix[:-1]
|
||||
self.short_names.add(file)
|
||||
assert not re.search(r'[\?|><:/*"+,;=\[\]]', file) # restrictions on short names
|
||||
return file
|
||||
|
||||
def add_file(self, file, src=None, version=None, language=None):
|
||||
"""Add a file to the current component of the directory, starting a new one
|
||||
if there is no current component. By default, the file name in the source
|
||||
and the file table will be identical. If the src file is specified, it is
|
||||
interpreted relative to the current directory. Optionally, a version and a
|
||||
language can be specified for the entry in the File table."""
|
||||
if not self.component:
|
||||
self.start_component(self.logical, current_feature, 0)
|
||||
if not src:
|
||||
# Allow relative paths for file if src is not specified
|
||||
src = file
|
||||
file = os.path.basename(file)
|
||||
absolute = os.path.join(self.absolute, src)
|
||||
assert not re.search(r'[\?|><:/*]"', file) # restrictions on long names
|
||||
if file in self.keyfiles:
|
||||
logical = self.keyfiles[file]
|
||||
else:
|
||||
logical = None
|
||||
sequence, logical = self.cab.append(absolute, file, logical)
|
||||
assert logical not in self.ids
|
||||
self.ids.add(logical)
|
||||
short = self.make_short(file)
|
||||
full = "%s|%s" % (short, file)
|
||||
filesize = os.stat(absolute).st_size
|
||||
# constants.msidbFileAttributesVital
|
||||
# Compressed omitted, since it is the database default
|
||||
# could add r/o, system, hidden
|
||||
attributes = 512
|
||||
add_data(self.db, "File",
|
||||
[(logical, self.component, full, filesize, version,
|
||||
language, attributes, sequence)])
|
||||
#if not version:
|
||||
# # Add hash if the file is not versioned
|
||||
# filehash = FileHash(absolute, 0)
|
||||
# add_data(self.db, "MsiFileHash",
|
||||
# [(logical, 0, filehash.IntegerData(1),
|
||||
# filehash.IntegerData(2), filehash.IntegerData(3),
|
||||
# filehash.IntegerData(4))])
|
||||
# Automatically remove .pyc files on uninstall (2)
|
||||
# XXX: adding so many RemoveFile entries makes installer unbelievably
|
||||
# slow. So instead, we have to use wildcard remove entries
|
||||
if file.endswith(".py"):
|
||||
add_data(self.db, "RemoveFile",
|
||||
[(logical+"c", self.component, "%sC|%sc" % (short, file),
|
||||
self.logical, 2),
|
||||
(logical+"o", self.component, "%sO|%so" % (short, file),
|
||||
self.logical, 2)])
|
||||
return logical
|
||||
|
||||
def glob(self, pattern, exclude = None):
|
||||
"""Add a list of files to the current component as specified in the
|
||||
glob pattern. Individual files can be excluded in the exclude list."""
|
||||
try:
|
||||
files = os.listdir(self.absolute)
|
||||
except OSError:
|
||||
return []
|
||||
if pattern[:1] != '.':
|
||||
files = (f for f in files if f[0] != '.')
|
||||
files = fnmatch.filter(files, pattern)
|
||||
for f in files:
|
||||
if exclude and f in exclude: continue
|
||||
self.add_file(f)
|
||||
return files
|
||||
|
||||
def remove_pyc(self):
|
||||
"Remove .pyc files on uninstall"
|
||||
add_data(self.db, "RemoveFile",
|
||||
[(self.component+"c", self.component, "*.pyc", self.logical, 2)])
|
||||
|
||||
class Binary:
|
||||
def __init__(self, fname):
|
||||
self.name = fname
|
||||
def __repr__(self):
|
||||
return 'msilib.Binary(os.path.join(dirname,"%s"))' % self.name
|
||||
|
||||
class Feature:
|
||||
def __init__(self, db, id, title, desc, display, level = 1,
|
||||
parent=None, directory = None, attributes=0):
|
||||
self.id = id
|
||||
if parent:
|
||||
parent = parent.id
|
||||
add_data(db, "Feature",
|
||||
[(id, parent, title, desc, display,
|
||||
level, directory, attributes)])
|
||||
def set_current(self):
|
||||
global current_feature
|
||||
current_feature = self
|
||||
|
||||
class Control:
|
||||
def __init__(self, dlg, name):
|
||||
self.dlg = dlg
|
||||
self.name = name
|
||||
|
||||
def event(self, event, argument, condition = "1", ordering = None):
|
||||
add_data(self.dlg.db, "ControlEvent",
|
||||
[(self.dlg.name, self.name, event, argument,
|
||||
condition, ordering)])
|
||||
|
||||
def mapping(self, event, attribute):
|
||||
add_data(self.dlg.db, "EventMapping",
|
||||
[(self.dlg.name, self.name, event, attribute)])
|
||||
|
||||
def condition(self, action, condition):
|
||||
add_data(self.dlg.db, "ControlCondition",
|
||||
[(self.dlg.name, self.name, action, condition)])
|
||||
|
||||
class RadioButtonGroup(Control):
|
||||
def __init__(self, dlg, name, property):
|
||||
self.dlg = dlg
|
||||
self.name = name
|
||||
self.property = property
|
||||
self.index = 1
|
||||
|
||||
def add(self, name, x, y, w, h, text, value = None):
|
||||
if value is None:
|
||||
value = name
|
||||
add_data(self.dlg.db, "RadioButton",
|
||||
[(self.property, self.index, value,
|
||||
x, y, w, h, text, None)])
|
||||
self.index += 1
|
||||
|
||||
class Dialog:
|
||||
def __init__(self, db, name, x, y, w, h, attr, title, first, default, cancel):
|
||||
self.db = db
|
||||
self.name = name
|
||||
self.x, self.y, self.w, self.h = x,y,w,h
|
||||
add_data(db, "Dialog", [(name, x,y,w,h,attr,title,first,default,cancel)])
|
||||
|
||||
def control(self, name, type, x, y, w, h, attr, prop, text, next, help):
|
||||
add_data(self.db, "Control",
|
||||
[(self.name, name, type, x, y, w, h, attr, prop, text, next, help)])
|
||||
return Control(self, name)
|
||||
|
||||
def text(self, name, x, y, w, h, attr, text):
|
||||
return self.control(name, "Text", x, y, w, h, attr, None,
|
||||
text, None, None)
|
||||
|
||||
def bitmap(self, name, x, y, w, h, text):
|
||||
return self.control(name, "Bitmap", x, y, w, h, 1, None, text, None, None)
|
||||
|
||||
def line(self, name, x, y, w, h):
|
||||
return self.control(name, "Line", x, y, w, h, 1, None, None, None, None)
|
||||
|
||||
def pushbutton(self, name, x, y, w, h, attr, text, next):
|
||||
return self.control(name, "PushButton", x, y, w, h, attr, None, text, next, None)
|
||||
|
||||
def radiogroup(self, name, x, y, w, h, attr, prop, text, next):
|
||||
add_data(self.db, "Control",
|
||||
[(self.name, name, "RadioButtonGroup",
|
||||
x, y, w, h, attr, prop, text, next, None)])
|
||||
return RadioButtonGroup(self, name, prop)
|
||||
|
||||
def checkbox(self, name, x, y, w, h, attr, prop, text, next):
|
||||
return self.control(name, "CheckBox", x, y, w, h, attr, prop, text, next, None)
|
1007
third_party/python/Lib/msilib/schema.py
vendored
Normal file
1007
third_party/python/Lib/msilib/schema.py
vendored
Normal file
File diff suppressed because it is too large
Load diff
126
third_party/python/Lib/msilib/sequence.py
vendored
Normal file
126
third_party/python/Lib/msilib/sequence.py
vendored
Normal file
|
@ -0,0 +1,126 @@
|
|||
AdminExecuteSequence = [
|
||||
('InstallInitialize', None, 1500),
|
||||
('InstallFinalize', None, 6600),
|
||||
('InstallFiles', None, 4000),
|
||||
('InstallAdminPackage', None, 3900),
|
||||
('FileCost', None, 900),
|
||||
('CostInitialize', None, 800),
|
||||
('CostFinalize', None, 1000),
|
||||
('InstallValidate', None, 1400),
|
||||
]
|
||||
|
||||
AdminUISequence = [
|
||||
('FileCost', None, 900),
|
||||
('CostInitialize', None, 800),
|
||||
('CostFinalize', None, 1000),
|
||||
('ExecuteAction', None, 1300),
|
||||
('ExitDialog', None, -1),
|
||||
('FatalError', None, -3),
|
||||
('UserExit', None, -2),
|
||||
]
|
||||
|
||||
AdvtExecuteSequence = [
|
||||
('InstallInitialize', None, 1500),
|
||||
('InstallFinalize', None, 6600),
|
||||
('CostInitialize', None, 800),
|
||||
('CostFinalize', None, 1000),
|
||||
('InstallValidate', None, 1400),
|
||||
('CreateShortcuts', None, 4500),
|
||||
('MsiPublishAssemblies', None, 6250),
|
||||
('PublishComponents', None, 6200),
|
||||
('PublishFeatures', None, 6300),
|
||||
('PublishProduct', None, 6400),
|
||||
('RegisterClassInfo', None, 4600),
|
||||
('RegisterExtensionInfo', None, 4700),
|
||||
('RegisterMIMEInfo', None, 4900),
|
||||
('RegisterProgIdInfo', None, 4800),
|
||||
]
|
||||
|
||||
InstallExecuteSequence = [
|
||||
('InstallInitialize', None, 1500),
|
||||
('InstallFinalize', None, 6600),
|
||||
('InstallFiles', None, 4000),
|
||||
('FileCost', None, 900),
|
||||
('CostInitialize', None, 800),
|
||||
('CostFinalize', None, 1000),
|
||||
('InstallValidate', None, 1400),
|
||||
('CreateShortcuts', None, 4500),
|
||||
('MsiPublishAssemblies', None, 6250),
|
||||
('PublishComponents', None, 6200),
|
||||
('PublishFeatures', None, 6300),
|
||||
('PublishProduct', None, 6400),
|
||||
('RegisterClassInfo', None, 4600),
|
||||
('RegisterExtensionInfo', None, 4700),
|
||||
('RegisterMIMEInfo', None, 4900),
|
||||
('RegisterProgIdInfo', None, 4800),
|
||||
('AllocateRegistrySpace', 'NOT Installed', 1550),
|
||||
('AppSearch', None, 400),
|
||||
('BindImage', None, 4300),
|
||||
('CCPSearch', 'NOT Installed', 500),
|
||||
('CreateFolders', None, 3700),
|
||||
('DeleteServices', 'VersionNT', 2000),
|
||||
('DuplicateFiles', None, 4210),
|
||||
('FindRelatedProducts', None, 200),
|
||||
('InstallODBC', None, 5400),
|
||||
('InstallServices', 'VersionNT', 5800),
|
||||
('IsolateComponents', None, 950),
|
||||
('LaunchConditions', None, 100),
|
||||
('MigrateFeatureStates', None, 1200),
|
||||
('MoveFiles', None, 3800),
|
||||
('PatchFiles', None, 4090),
|
||||
('ProcessComponents', None, 1600),
|
||||
('RegisterComPlus', None, 5700),
|
||||
('RegisterFonts', None, 5300),
|
||||
('RegisterProduct', None, 6100),
|
||||
('RegisterTypeLibraries', None, 5500),
|
||||
('RegisterUser', None, 6000),
|
||||
('RemoveDuplicateFiles', None, 3400),
|
||||
('RemoveEnvironmentStrings', None, 3300),
|
||||
('RemoveExistingProducts', None, 6700),
|
||||
('RemoveFiles', None, 3500),
|
||||
('RemoveFolders', None, 3600),
|
||||
('RemoveIniValues', None, 3100),
|
||||
('RemoveODBC', None, 2400),
|
||||
('RemoveRegistryValues', None, 2600),
|
||||
('RemoveShortcuts', None, 3200),
|
||||
('RMCCPSearch', 'NOT Installed', 600),
|
||||
('SelfRegModules', None, 5600),
|
||||
('SelfUnregModules', None, 2200),
|
||||
('SetODBCFolders', None, 1100),
|
||||
('StartServices', 'VersionNT', 5900),
|
||||
('StopServices', 'VersionNT', 1900),
|
||||
('MsiUnpublishAssemblies', None, 1750),
|
||||
('UnpublishComponents', None, 1700),
|
||||
('UnpublishFeatures', None, 1800),
|
||||
('UnregisterClassInfo', None, 2700),
|
||||
('UnregisterComPlus', None, 2100),
|
||||
('UnregisterExtensionInfo', None, 2800),
|
||||
('UnregisterFonts', None, 2500),
|
||||
('UnregisterMIMEInfo', None, 3000),
|
||||
('UnregisterProgIdInfo', None, 2900),
|
||||
('UnregisterTypeLibraries', None, 2300),
|
||||
('ValidateProductID', None, 700),
|
||||
('WriteEnvironmentStrings', None, 5200),
|
||||
('WriteIniValues', None, 5100),
|
||||
('WriteRegistryValues', None, 5000),
|
||||
]
|
||||
|
||||
InstallUISequence = [
|
||||
('FileCost', None, 900),
|
||||
('CostInitialize', None, 800),
|
||||
('CostFinalize', None, 1000),
|
||||
('ExecuteAction', None, 1300),
|
||||
('ExitDialog', None, -1),
|
||||
('FatalError', None, -3),
|
||||
('UserExit', None, -2),
|
||||
('AppSearch', None, 400),
|
||||
('CCPSearch', 'NOT Installed', 500),
|
||||
('FindRelatedProducts', None, 200),
|
||||
('IsolateComponents', None, 950),
|
||||
('LaunchConditions', None, 100),
|
||||
('MigrateFeatureStates', None, 1200),
|
||||
('RMCCPSearch', 'NOT Installed', 600),
|
||||
('ValidateProductID', None, 700),
|
||||
]
|
||||
|
||||
tables=['AdminExecuteSequence', 'AdminUISequence', 'AdvtExecuteSequence', 'InstallExecuteSequence', 'InstallUISequence']
|
129
third_party/python/Lib/msilib/text.py
vendored
Normal file
129
third_party/python/Lib/msilib/text.py
vendored
Normal file
|
@ -0,0 +1,129 @@
|
|||
import msilib,os;dirname=os.path.dirname(__file__)
|
||||
|
||||
ActionText = [
|
||||
('InstallValidate', 'Validating install', None),
|
||||
('InstallFiles', 'Copying new files', 'File: [1], Directory: [9], Size: [6]'),
|
||||
('InstallAdminPackage', 'Copying network install files', 'File: [1], Directory: [9], Size: [6]'),
|
||||
('FileCost', 'Computing space requirements', None),
|
||||
('CostInitialize', 'Computing space requirements', None),
|
||||
('CostFinalize', 'Computing space requirements', None),
|
||||
('CreateShortcuts', 'Creating shortcuts', 'Shortcut: [1]'),
|
||||
('PublishComponents', 'Publishing Qualified Components', 'Component ID: [1], Qualifier: [2]'),
|
||||
('PublishFeatures', 'Publishing Product Features', 'Feature: [1]'),
|
||||
('PublishProduct', 'Publishing product information', None),
|
||||
('RegisterClassInfo', 'Registering Class servers', 'Class Id: [1]'),
|
||||
('RegisterExtensionInfo', 'Registering extension servers', 'Extension: [1]'),
|
||||
('RegisterMIMEInfo', 'Registering MIME info', 'MIME Content Type: [1], Extension: [2]'),
|
||||
('RegisterProgIdInfo', 'Registering program identifiers', 'ProgId: [1]'),
|
||||
('AllocateRegistrySpace', 'Allocating registry space', 'Free space: [1]'),
|
||||
('AppSearch', 'Searching for installed applications', 'Property: [1], Signature: [2]'),
|
||||
('BindImage', 'Binding executables', 'File: [1]'),
|
||||
('CCPSearch', 'Searching for qualifying products', None),
|
||||
('CreateFolders', 'Creating folders', 'Folder: [1]'),
|
||||
('DeleteServices', 'Deleting services', 'Service: [1]'),
|
||||
('DuplicateFiles', 'Creating duplicate files', 'File: [1], Directory: [9], Size: [6]'),
|
||||
('FindRelatedProducts', 'Searching for related applications', 'Found application: [1]'),
|
||||
('InstallODBC', 'Installing ODBC components', None),
|
||||
('InstallServices', 'Installing new services', 'Service: [2]'),
|
||||
('LaunchConditions', 'Evaluating launch conditions', None),
|
||||
('MigrateFeatureStates', 'Migrating feature states from related applications', 'Application: [1]'),
|
||||
('MoveFiles', 'Moving files', 'File: [1], Directory: [9], Size: [6]'),
|
||||
('PatchFiles', 'Patching files', 'File: [1], Directory: [2], Size: [3]'),
|
||||
('ProcessComponents', 'Updating component registration', None),
|
||||
('RegisterComPlus', 'Registering COM+ Applications and Components', 'AppId: [1]{{, AppType: [2], Users: [3], RSN: [4]}}'),
|
||||
('RegisterFonts', 'Registering fonts', 'Font: [1]'),
|
||||
('RegisterProduct', 'Registering product', '[1]'),
|
||||
('RegisterTypeLibraries', 'Registering type libraries', 'LibID: [1]'),
|
||||
('RegisterUser', 'Registering user', '[1]'),
|
||||
('RemoveDuplicateFiles', 'Removing duplicated files', 'File: [1], Directory: [9]'),
|
||||
('RemoveEnvironmentStrings', 'Updating environment strings', 'Name: [1], Value: [2], Action [3]'),
|
||||
('RemoveExistingProducts', 'Removing applications', 'Application: [1], Command line: [2]'),
|
||||
('RemoveFiles', 'Removing files', 'File: [1], Directory: [9]'),
|
||||
('RemoveFolders', 'Removing folders', 'Folder: [1]'),
|
||||
('RemoveIniValues', 'Removing INI files entries', 'File: [1], Section: [2], Key: [3], Value: [4]'),
|
||||
('RemoveODBC', 'Removing ODBC components', None),
|
||||
('RemoveRegistryValues', 'Removing system registry values', 'Key: [1], Name: [2]'),
|
||||
('RemoveShortcuts', 'Removing shortcuts', 'Shortcut: [1]'),
|
||||
('RMCCPSearch', 'Searching for qualifying products', None),
|
||||
('SelfRegModules', 'Registering modules', 'File: [1], Folder: [2]'),
|
||||
('SelfUnregModules', 'Unregistering modules', 'File: [1], Folder: [2]'),
|
||||
('SetODBCFolders', 'Initializing ODBC directories', None),
|
||||
('StartServices', 'Starting services', 'Service: [1]'),
|
||||
('StopServices', 'Stopping services', 'Service: [1]'),
|
||||
('UnpublishComponents', 'Unpublishing Qualified Components', 'Component ID: [1], Qualifier: [2]'),
|
||||
('UnpublishFeatures', 'Unpublishing Product Features', 'Feature: [1]'),
|
||||
('UnregisterClassInfo', 'Unregister Class servers', 'Class Id: [1]'),
|
||||
('UnregisterComPlus', 'Unregistering COM+ Applications and Components', 'AppId: [1]{{, AppType: [2]}}'),
|
||||
('UnregisterExtensionInfo', 'Unregistering extension servers', 'Extension: [1]'),
|
||||
('UnregisterFonts', 'Unregistering fonts', 'Font: [1]'),
|
||||
('UnregisterMIMEInfo', 'Unregistering MIME info', 'MIME Content Type: [1], Extension: [2]'),
|
||||
('UnregisterProgIdInfo', 'Unregistering program identifiers', 'ProgId: [1]'),
|
||||
('UnregisterTypeLibraries', 'Unregistering type libraries', 'LibID: [1]'),
|
||||
('WriteEnvironmentStrings', 'Updating environment strings', 'Name: [1], Value: [2], Action [3]'),
|
||||
('WriteIniValues', 'Writing INI files values', 'File: [1], Section: [2], Key: [3], Value: [4]'),
|
||||
('WriteRegistryValues', 'Writing system registry values', 'Key: [1], Name: [2], Value: [3]'),
|
||||
('Advertise', 'Advertising application', None),
|
||||
('GenerateScript', 'Generating script operations for action:', '[1]'),
|
||||
('InstallSFPCatalogFile', 'Installing system catalog', 'File: [1], Dependencies: [2]'),
|
||||
('MsiPublishAssemblies', 'Publishing assembly information', 'Application Context:[1], Assembly Name:[2]'),
|
||||
('MsiUnpublishAssemblies', 'Unpublishing assembly information', 'Application Context:[1], Assembly Name:[2]'),
|
||||
('Rollback', 'Rolling back action:', '[1]'),
|
||||
('RollbackCleanup', 'Removing backup files', 'File: [1]'),
|
||||
('UnmoveFiles', 'Removing moved files', 'File: [1], Directory: [9]'),
|
||||
('UnpublishProduct', 'Unpublishing product information', None),
|
||||
]
|
||||
|
||||
UIText = [
|
||||
('AbsentPath', None),
|
||||
('bytes', 'bytes'),
|
||||
('GB', 'GB'),
|
||||
('KB', 'KB'),
|
||||
('MB', 'MB'),
|
||||
('MenuAbsent', 'Entire feature will be unavailable'),
|
||||
('MenuAdvertise', 'Feature will be installed when required'),
|
||||
('MenuAllCD', 'Entire feature will be installed to run from CD'),
|
||||
('MenuAllLocal', 'Entire feature will be installed on local hard drive'),
|
||||
('MenuAllNetwork', 'Entire feature will be installed to run from network'),
|
||||
('MenuCD', 'Will be installed to run from CD'),
|
||||
('MenuLocal', 'Will be installed on local hard drive'),
|
||||
('MenuNetwork', 'Will be installed to run from network'),
|
||||
('ScriptInProgress', 'Gathering required information...'),
|
||||
('SelAbsentAbsent', 'This feature will remain uninstalled'),
|
||||
('SelAbsentAdvertise', 'This feature will be set to be installed when required'),
|
||||
('SelAbsentCD', 'This feature will be installed to run from CD'),
|
||||
('SelAbsentLocal', 'This feature will be installed on the local hard drive'),
|
||||
('SelAbsentNetwork', 'This feature will be installed to run from the network'),
|
||||
('SelAdvertiseAbsent', 'This feature will become unavailable'),
|
||||
('SelAdvertiseAdvertise', 'Will be installed when required'),
|
||||
('SelAdvertiseCD', 'This feature will be available to run from CD'),
|
||||
('SelAdvertiseLocal', 'This feature will be installed on your local hard drive'),
|
||||
('SelAdvertiseNetwork', 'This feature will be available to run from the network'),
|
||||
('SelCDAbsent', "This feature will be uninstalled completely, you won't be able to run it from CD"),
|
||||
('SelCDAdvertise', 'This feature will change from run from CD state to set to be installed when required'),
|
||||
('SelCDCD', 'This feature will remain to be run from CD'),
|
||||
('SelCDLocal', 'This feature will change from run from CD state to be installed on the local hard drive'),
|
||||
('SelChildCostNeg', 'This feature frees up [1] on your hard drive.'),
|
||||
('SelChildCostPos', 'This feature requires [1] on your hard drive.'),
|
||||
('SelCostPending', 'Compiling cost for this feature...'),
|
||||
('SelLocalAbsent', 'This feature will be completely removed'),
|
||||
('SelLocalAdvertise', 'This feature will be removed from your local hard drive, but will be set to be installed when required'),
|
||||
('SelLocalCD', 'This feature will be removed from your local hard drive, but will be still available to run from CD'),
|
||||
('SelLocalLocal', 'This feature will remain on you local hard drive'),
|
||||
('SelLocalNetwork', 'This feature will be removed from your local hard drive, but will be still available to run from the network'),
|
||||
('SelNetworkAbsent', "This feature will be uninstalled completely, you won't be able to run it from the network"),
|
||||
('SelNetworkAdvertise', 'This feature will change from run from network state to set to be installed when required'),
|
||||
('SelNetworkLocal', 'This feature will change from run from network state to be installed on the local hard drive'),
|
||||
('SelNetworkNetwork', 'This feature will remain to be run from the network'),
|
||||
('SelParentCostNegNeg', 'This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.'),
|
||||
('SelParentCostNegPos', 'This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.'),
|
||||
('SelParentCostPosNeg', 'This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.'),
|
||||
('SelParentCostPosPos', 'This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.'),
|
||||
('TimeRemaining', 'Time remaining: {[1] minutes }{[2] seconds}'),
|
||||
('VolumeCostAvailable', 'Available'),
|
||||
('VolumeCostDifference', 'Difference'),
|
||||
('VolumeCostRequired', 'Required'),
|
||||
('VolumeCostSize', 'Disk Size'),
|
||||
('VolumeCostVolume', 'Volume'),
|
||||
]
|
||||
|
||||
tables=['ActionText', 'UIText']
|
Loading…
Add table
Add a link
Reference in a new issue