I am looking for a way to convert an exe file created in Python into an MSIX file and submit it to the Microsoft Store.
In order to submit the MSIX file to the Microsoft Store, it must pass a review by software called "WIndows App Certification Kit". However, I am unable to pass this.
I have created Python code to create a very simple Tkinter UI.
tkinterTest.py
import sys
import tkinter
root = tkinter.Tk()
root.title(u"title bar")
root.geometry("400x300")
EditBox = tkinter.Entry()
EditBox.pack()
root.mainloop()
I used Nuitka to exe this code. I generated the exe file with the following code
nuitka --windows-disable-console --standalone --onefile --enable-plugin=tk-inter --windows-icon-from-ico="icon.ico" tkinterTest.py
Then, by executing the generated exe file, the following UI was launched
Next, I placed the AppxManifest.xml file, the app logo, and a file named Resouces.pri in the folder. The contents of AppxManifest.xml look like this
AppxManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7" xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10" xmlns:desktop7="http://schemas.microsoft.com/appx/manifest/desktop/windows10/7" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap uap7 uap10 desktop7 rescap">
<!--Package created by MSIX Packaging Tool version: 1.2023.319.0-->
<Identity Name="MyCompany.tkinterTest" Publisher="CN=MyCompany" Version="0.9.15.0" ProcessorArchitecture="x64" />
<Properties>
<DisplayName>tkinterTest</DisplayName>
<PublisherDisplayName>MyCompany</PublisherDisplayName>
<Description>face tracking app</Description>
<Logo>Assets\StoreLogo.png</Logo>
<uap10:PackageIntegrity>
<uap10:Content Enforcement="on" />
</uap10:PackageIntegrity>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22000.1" />
</Dependencies>
<Applications>
<Application Id="TKINTERTEST" Executable="tkinterTest.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements BackgroundColor="transparent" DisplayName="tkinterTest" Square150x150Logo="Assets\TKINTERTEST-Square150x150Logo.png" Square44x44Logo="Assets\TKINTERTEST-Square44x44Logo.png" Description="tkinterTest">
<uap:DefaultTile Wide310x150Logo="Assets\TKINTERTEST-Wide310x150Logo.png" Square310x310Logo="Assets\TKINTERTEST-Square310x310Logo.png" Square71x71Logo="Assets\TKINTERTEST-Square71x71Logo.png" />
</uap:VisualElements>
<Extensions>
<desktop7:Extension Category="windows.shortcut">
<desktop7:Shortcut File="tkinterTest.lnk" Icon="tkinterTest.exe" />
</desktop7:Extension>
</Extensions>
</Application>
</Applications>
</Package>
To convert an exe file into an MSIX application, use the MakeAppx command, a standard Windows tool.Normally, MSIX apps are generated by VisualStudio, but you can use the MakeAppx command to convert an existing exe file into an MSIX file.
set PATH="C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64";%PATH%
MakeAppx pack /v /h SHA256 /d "tkinterTest.dist" /p "MyPackage.msix"
When the generated MSIX app is examined with the Windows App Certification Kit, an error message "Blocked executables" is displayed.
I signed the exe file using signtool and that did not solve the problem. If anyone knows a solution, please let me know.
I don't know if this is a problem on the Python side or the Windows side of the app, I generated an exe file using PyInstaller and still had the same problem. Any answers would help.