Add Microsoft Store MSIX package build (#14142)

* docs: add MSIX Store build design spec

* docs: update MSIX spec (PFN deep link, .drc, Associate tab) and add implementation plan

* ci: add MSIX logo asset generator and generated assets

* ci: fix MSIX asset rendering edge bleed (PixelOffsetMode) and make output order deterministic

* ci: add MSIX AppxManifest template

* ci: add MSIX packaging script

* ci: make build_msix.ps1 stage-only exit dot-source safe

* ci: build MSIX Store package in Windows job

* ci: run MSIX pack after existing Windows uploads and keep it out of release downloads

* feat: add MSIX packaged-context detection helpers

* fix: resolve MSIX package APIs dynamically to keep Win7 loadable

* feat: suppress self-update in MSIX Store build

* feat: suppress runtime file associations in MSIX Store build

* feat: keep version check in MSIX build, point update dialog at the Store

The update check is notification-only (OrcaSlicer never auto-downloads),
so the Store build keeps checking for new versions instead of skipping
the check. What changes when packaged is the new-version dialog: the
Download button is hidden, the info text asks the user to update from
the Microsoft Store, and the hyperlink / wxID_YES action opens the Store
product page instead of the GitHub release page.

* docs: align spec verification plan with Store-redirect updater behavior

* feat: default MSIX identity to the reserved Partner Center values

* feat: render MSIX logos full-bleed from the gradient-circle SVG

* feat: point update dialog Download button at the Store in MSIX builds

* feat: link Associate tab to Windows Default Apps settings in MSIX builds

* docs: align spec with review-driven logo, dialog and Associate-tab changes

* clearn up
This commit is contained in:
SoftFever
2026-06-11 23:56:16 +08:00
committed by GitHub
parent d07cb462a8
commit 15f330641c
15 changed files with 307 additions and 5 deletions

View File

@@ -24,6 +24,7 @@
#include <wx/font.h>
#include <wx/fontutil.h>
#include <wx/display.h>
#include <wx/utils.h>
#include "libslic3r/Config.hpp"
@@ -171,6 +172,42 @@ template<class F> typename F::FN winapi_get_function(const wchar_t *dll, const c
}
#endif
bool is_running_in_msix()
{
#ifdef _WIN32
// The package identity APIs are Win8+ - resolved dynamically so the exe still loads on Win7
// (same treatment as the DPI APIs below). Null-buffer probe: returns ERROR_INSUFFICIENT_BUFFER
// when packaged, APPMODEL_ERROR_NO_PACKAGE when running unpackaged.
struct GetCurrentPackageFullName_t { typedef LONG (WINAPI *FN)(UINT32 *length, PWSTR full_name); };
static const bool packaged = []() {
auto fn = winapi_get_function<GetCurrentPackageFullName_t>(L"Kernel32.dll", "GetCurrentPackageFullName");
UINT32 length = 0;
return fn != nullptr && fn(&length, nullptr) != APPMODEL_ERROR_NO_PACKAGE;
}();
return packaged;
#else
return false;
#endif
}
void open_ms_store_product_page()
{
#ifdef _WIN32
struct GetCurrentPackageFamilyName_t { typedef LONG (WINAPI *FN)(UINT32 *length, PWSTR family_name); };
static auto fn = winapi_get_function<GetCurrentPackageFamilyName_t>(L"Kernel32.dll", "GetCurrentPackageFamilyName");
if (fn == nullptr)
return;
UINT32 length = 0;
if (fn(&length, nullptr) != ERROR_INSUFFICIENT_BUFFER)
return;
std::wstring family_name(length, L'\0');
if (fn(&length, family_name.data()) != ERROR_SUCCESS)
return;
family_name.resize(length > 0 ? length - 1 : 0); // drop the terminating null
wxLaunchDefaultBrowser(wxString(L"ms-windows-store://pdp/?PFN=") + family_name.c_str());
#endif
}
// If called with nullptr, a DPI for the primary monitor is returned.
int get_dpi_for_window(const wxWindow *window)
{