Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
17 changes: 14 additions & 3 deletions packaging/windows/store/appxmanifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
storeVersion there); electron-builder fills the ${...} values from the
appx options.
Based on electron-builder's templates/appx/appxmanifest.xml, plus the uap3
namespace for the stepforge.exe execution alias in extensions.xml. -->
namespace for the stepforge.exe execution alias in extensions.xml and
uap11 for graphicsCaptureWithoutBorder. -->
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:uap11="http://schemas.microsoft.com/appx/manifest/uap/windows10/11"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap uap3 desktop rescap">
IgnorableNamespaces="uap uap3 uap11 desktop rescap">
<!-- use single quotes to avoid double quotes escaping in the publisher value -->
<Identity Name="${identityName}"
ProcessorArchitecture="${arch}"
Expand All @@ -29,7 +31,16 @@
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="${minVersion}" MaxVersionTested="${maxVersionTested}" />
</Dependencies>
${capabilities}
<!-- Written out: electron-builder's capability list doesn't know
graphicsCaptureWithoutBorder. It lets StepForge hide the yellow border
Windows draws around a screen being recorded, once the user allows it
(Settings → Privacy & security → Screenshot borders). Desktop installs
get that from the "Desktop apps" switch there; a Store app needs this
capability and its own switch. Windows 10 ignores it. -->
<Capabilities>
<uap11:Capability Name="graphicsCaptureWithoutBorder" />
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Applications>
<Application Id="${applicationId}" Executable="${executable}" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/package-windows-store.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ test('the manifest carries the Store version and the stepforge.exe alias', () =>
'splashScreen', 'arch', 'resourceLanguages', 'capabilities', 'extensions', 'minVersion', 'maxVersionTested'];
assert.deepEqual(macros.filter((m) => !known.includes(m)), []);
assert.ok(macros.includes('extensions'));
// The capabilities are written out, so electron-builder's list can't replace them.
assert.ok(!macros.includes('capabilities'));
assert.match(manifest, /xmlns:uap11="http:\/\/schemas\.microsoft\.com\/appx\/manifest\/uap\/windows10\/11"/);
assert.match(manifest, /IgnorableNamespaces="[^"]*\buap11\b[^"]*"/);
const capabilities = manifest.split('<Capabilities>')[1].split('</Capabilities>')[0];
assert.deepEqual([...capabilities.matchAll(/<(\w+):Capability Name="(\w+)" \/>/g)].map((m) => `${m[1]}:${m[2]}`),
['uap11:graphicsCaptureWithoutBorder', 'rescap:runFullTrust']);
assert.throws(() => renderStoreManifest('1.5.3.1'), /invalid Store version/);

const extensions = read('packaging/windows/store/extensions.xml');
Expand Down
Loading