Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions _msbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,24 @@ def get_commands():


def _make_xyzw_version(v, sep="."):
"""Calculate a suitable x.y.z.w version from our user-friendly version.

For MSIX in the Store, the fourth field must be 0.

For MSI, the first field must be <256.

If the explicit version contains a non-zero field 3, it will override the
one that is calculated from prerelease markers.
"""
from packaging.version import parse
v = parse(v)
if not v.pre:
return "{0}{4}{1}{4}{2}{4}{3}".format(v.major, v.minor, v.micro, 0xF0, sep)
return "{0}{4}{1}{4}{2}{4}{3}".format(
v.major,
v.minor,
v.micro,
{"a": 0xA0, "b": 0xB0, "rc": 0xC0}.get(v.pre[0].lower(), 0) | v.pre[1],
sep,
)
micro = 0xF0
if v.pre:
micro = {"a": 0xA0, "b": 0xB0, "rc": 0xC0}.get(v.pre[0].lower(), 0) | v.pre[1]
if v.micro:
print("[WARNING]Overriding calculated version field 3 with", v)
micro = v.micro
return "{0}{4}{1}{4}{2}{4}{3}".format(v.major, v.minor, micro, 0, sep)


def _patch_appx_identity(source, dest, **new):
Expand Down
12 changes: 0 additions & 12 deletions src/pymanager/appxmanifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@
Square44x44Logo="_resources/setupx44.png"
BackgroundColor="transparent" />
</Application>
<Application Id="Pyw.Manager.Exe"
Executable="pyw-manager.exe"
EntryPoint="Windows.FullTrustApplication"
desktop4:SupportsMultipleInstances="true"
desktop4:Subsystem="windows">
<uap:VisualElements DisplayName="Python install manager (windowed)"
Description="Add, remove and launch Python without creating a console window."
Square150x150Logo="_resources/setupx150.png"
Square44x44Logo="_resources/setupx44.png"
BackgroundColor="transparent"
AppListEntry="none" />
</Application>

<Application Id="Pymanager.Exe"
Executable="pymanager.exe"
Expand Down