aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-client/build/appx/README.md
blob: ef47411f6b334001d06e97b8e75587bf770ff4a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# AppX/MSIX tile images

Generated once from `../icon-square.png` (1024×1024), not by any build script
— electron-builder's AppX target (`app-builder-lib/out/targets/AppxTarget.js`)
requires these four regardless of `showNameOnTiles`, and looks for them here
(`packager.getResource(undefined, "appx")` resolves to `build/appx/`) before
falling back to its own vendor-bundled samples. Falling back was not an
option here: this repo points `ELECTRON_BUILDER_WINDOWS_KITS_PATH` at the
system Windows SDK instead of letting electron-builder download its own
copy (see `packaging/win/build-win-msix.ps1`'s comment for why), and the
system SDK has no `appxAssets` samples to fall back to at all.

| File | Size | Source |
|---|---|---|
| `StoreLogo.png` | 50×50 | resized |
| `Square44x44Logo.png` | 44×44 | resized |
| `Square150x150Logo.png` | 150×150 | resized |
| `Wide310x150Logo.png` | 310×150 | icon centered on a `#464646` canvas (the appx target's own default `backgroundColor`) |

Regenerate with System.Drawing if the source icon changes:

```powershell
Add-Type -AssemblyName System.Drawing
$img = [System.Drawing.Image]::FromFile("build\icon-square.png")
function Resize-Square($image, $size, $outPath) {
    $bmp = New-Object System.Drawing.Bitmap $size, $size
    $g = [System.Drawing.Graphics]::FromImage($bmp)
    $g.InterpolationMode = [System.Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic
    $g.DrawImage($image, 0, 0, $size, $size)
    $bmp.Save($outPath, [System.Drawing.Imaging.ImageFormat]::Png)
    $g.Dispose(); $bmp.Dispose()
}
Resize-Square $img 50  "build\appx\StoreLogo.png"
Resize-Square $img 44  "build\appx\Square44x44Logo.png"
Resize-Square $img 150 "build\appx\Square150x150Logo.png"

$bmp = New-Object System.Drawing.Bitmap 310, 150
$g = [System.Drawing.Graphics]::FromImage($bmp)
$g.InterpolationMode = [System.Drawing.Drawing2D.InterpolationMode]::HighQualityBicubic
$g.Clear([System.Drawing.Color]::FromArgb(255, 0x46, 0x46, 0x46))
$g.DrawImage($img, 90, 10, 130, 130)
$bmp.Save("build\appx\Wide310x150Logo.png", [System.Drawing.Imaging.ImageFormat]::Png)
$g.Dispose(); $bmp.Dispose(); $img.Dispose()
```