[packaging/craft] /: make appx-Package-Type configurable, for msix support, MakeAppxExe uses the fileEnding to switch its internal logic
Michael 'Flimmy' Flemming <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 3f23fe9b44f9184baa41a24df05208bb4791f5cc by Michael 'Flimmy' Flemming.
Committed on 27/07/2026 at 14:43.
Pushed by vonreth into branch 'master'.
make appx-Package-Type configurable, for msix support, MakeAppxExe uses the fileEnding to switch its internal logic
M +4 -0 CraftSettings.ini.template
M +7 -3 bin/Packager/AppxPackager.py
https://invent.kde.org/packaging/craft/-/commit/3f23fe9b44f9184baa41a24df05208bb4791f5cc
diff --git a/CraftSettings.ini.template b/CraftSettings.ini.template
index 9f4aaedf0..42f702bb6 100644
--- a/CraftSettings.ini.template
+++ b/CraftSettings.ini.template
@@ -151,6 +151,10 @@ EnableDailyUpdates = True
## Todo: rename
#7ZipArchiveType = 7z
+## The package type for the appx-Packager
+## Possible values are: appx, msix
+#AppxPackageType = appx
+
# id assigned to you by the Windows Store
#AppxPublisherId = CN=98B52D9A-DF7C-493E-BADC-37004A92EFC8
diff --git a/bin/Packager/AppxPackager.py b/bin/Packager/AppxPackager.py
index ceef8c204..2fb24bcff 100644
--- a/bin/Packager/AppxPackager.py
+++ b/bin/Packager/AppxPackager.py
@@ -121,6 +121,10 @@ class AppxPackager(CollectionPackagerBase):
defines.setdefault("file_types", "")
defines.setdefault("extensions", "")
+ @property
+ def _packageType(self) -> str:
+ return CraftCore.settings.get("Packager", "AppxPackageType", "appx")
+
def setDefaults(self, defines: dict) -> dict:
defines = super().setDefaults(defines)
defines.setdefault("additional_xmlns", "")
@@ -149,7 +153,7 @@ class AppxPackager(CollectionPackagerBase):
defines.setdefault("appx_identity_name", defines["name"])
utils.createDir(self.artifactsDir())
- defines["setupname"] = self.artifactsDir() / os.path.basename(f"{defines['setupname']}.appx")
+ defines["setupname"] = self.artifactsDir() / os.path.basename(f"{defines['setupname']}.{self._packageType}")
defines.setdefault("craft_id", self.package.path.replace("/", "."))
self._setupFileTypes(defines)
@@ -297,14 +301,14 @@ class AppxPackager(CollectionPackagerBase):
and self.symbolsImageDir().exists()
and any(self.symbolsImageDir().iterdir())
):
- appxSym = Path(defines["setupname"]).with_suffix(".appxsym")
+ appxSym = Path(defines["setupname"]).with_suffix(f".{self._packageType}sym")
artifacts += [appxSym]
if appxSym.exists():
appxSym.unlink()
if not utils.compress(appxSym, self.archiveDebugDir()):
return False
- appxUpload = (Path(self.packageDestinationDir()) / os.path.basename(defines["setupname"])).with_suffix(".appxupload")
+ appxUpload = (Path(self.packageDestinationDir()) / os.path.basename(defines["setupname"])).with_suffix(f".{self._packageType}upload")
if appxUpload.exists():
appxUpload.unlink()
if not utils.compress(appxUpload, artifacts):