@tokamakdev/platform-windows-x64 0.1.1-beta.161 → 0.1.1-beta.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokamakdev/platform-windows-x64",
3
- "version": "0.1.1-beta.161",
3
+ "version": "0.1.1-beta.162",
4
4
  "description": "The tokamak platform pack for windows-x64",
5
5
  "repository": {
6
6
  "type": "git",
@@ -56,6 +56,14 @@ function Invoke-RuntimeLink([string] $Executable) {
56
56
  }
57
57
  }
58
58
 
59
+ # Copy the splash image $Image beside the executable as $Name with the image's
60
+ # extension, returning the file's name.
61
+ function Copy-SplashImage([string] $Image, [string] $Name) {
62
+ $file = $Name + [System.IO.Path]::GetExtension($Image).ToLowerInvariant()
63
+ Copy-Item -LiteralPath $Image (Join-Path $output $file)
64
+ return $file
65
+ }
66
+
59
67
  # The CLI runs the entrypoint from the pack root.
60
68
  $pack = (Get-Location).Path
61
69
  $output = [System.IO.Path]::GetFullPath($OutputDirectory)
@@ -87,6 +95,26 @@ if (Test-Path (Join-Path $InputDirectory "metadata/dev-endpoint")) {
87
95
  $config.devEndpoint = Read-TokamakValue "dev-endpoint"
88
96
  $config.devSessionToken = Read-TokamakValue "dev-session-token"
89
97
  }
98
+ # tok passes every splash setting when the app has a splash. A dark image that
99
+ # is the light one shares its file.
100
+ if ($env:TOKAMAK_WINDOWS_SPLASH_WIDTH) {
101
+ $splash = [ordered]@{
102
+ width = [int] $env:TOKAMAK_WINDOWS_SPLASH_WIDTH
103
+ background = $env:TOKAMAK_WINDOWS_SPLASH_BACKGROUND
104
+ backgroundDark = $env:TOKAMAK_WINDOWS_SPLASH_BACKGROUND_DARK
105
+ }
106
+ $image = $env:TOKAMAK_WINDOWS_SPLASH_IMAGE
107
+ $imageDark = $env:TOKAMAK_WINDOWS_SPLASH_IMAGE_DARK
108
+ if ($image) {
109
+ $splash.image = Copy-SplashImage $image "splash"
110
+ }
111
+ if ($imageDark -and $imageDark -eq $image) {
112
+ $splash.imageDark = $splash.image
113
+ } elseif ($imageDark) {
114
+ $splash.imageDark = Copy-SplashImage $imageDark "splash-dark"
115
+ }
116
+ $config.splash = $splash
117
+ }
90
118
  $config = $config | ConvertTo-Json
91
119
  $encoding = New-Object System.Text.UTF8Encoding($false)
92
120
  [System.IO.File]::WriteAllText((Join-Path $output "tokamak.json"), $config, $encoding)
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/windows-x64/lib/TokamakRuntime/tokamak.lib
3
- size: 43345424 bytes
4
- sha256: b52ec4a4d0f9487eadc96e83e5a14ff8d2426b939ed5cfa0a5486f4cdd35e1df
3
+ size: 43396908 bytes
4
+ sha256: 1eeb9f66b45455de9073d95ed9847de7a40ec69f22bcf7f1ae533eaf2017bc6d