@tokamakdev/platform-windows-x64 0.1.1-beta.70 → 0.1.1-beta.72

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.70",
3
+ "version": "0.1.1-beta.72",
4
4
  "description": "The tokamak platform pack for windows-x64",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,7 +45,7 @@ function Use-MicrosoftLinker {
45
45
  # points of the runtime parts the app links.
46
46
  function Invoke-RuntimeLink([string] $Executable) {
47
47
  Use-MicrosoftLinker
48
- $runtime = Join-Path $InputDirectory "runtime/TokamakRuntime"
48
+ $runtime = Join-Path $pack "lib/TokamakRuntime"
49
49
  $libraries = [System.IO.File]::ReadAllText((Join-Path $runtime "link-libraries")).Trim() -split '\s+'
50
50
  $exports = @([System.IO.File]::ReadAllLines((Join-Path $InputDirectory "metadata/exported-symbols")) | ForEach-Object { "/EXPORT:$_" })
51
51
  $importLibrary = Join-Path $InputDirectory "runtime.lib"
@@ -55,23 +55,15 @@ function Invoke-RuntimeLink([string] $Executable) {
55
55
  }
56
56
  }
57
57
 
58
+ # The CLI runs the entrypoint from the pack root.
59
+ $pack = (Get-Location).Path
58
60
  $output = [System.IO.Path]::GetFullPath($OutputDirectory)
59
61
  $appName = Read-TokamakValue "app-name"
60
62
  $appSlug = Read-TokamakValue "app-slug"
61
- $identifier = Read-TokamakValue "identifier"
62
63
  $appHost = Read-TokamakValue "host"
63
- $devEndpoint = $null
64
- $devSessionToken = $null
65
- $devEndpointPath = Join-Path $InputDirectory "metadata/dev-endpoint"
66
- $devSessionTokenPath = Join-Path $InputDirectory "metadata/dev-session-token"
67
- if (Test-Path $devEndpointPath) {
68
- $devEndpoint = [System.IO.File]::ReadAllText($devEndpointPath).Trim()
69
- }
70
- if (Test-Path $devSessionTokenPath) {
71
- $devSessionToken = [System.IO.File]::ReadAllText($devSessionTokenPath).Trim()
72
- }
73
- if ([string]::IsNullOrWhiteSpace($devEndpoint) -xor [string]::IsNullOrWhiteSpace($devSessionToken)) {
74
- throw "development endpoint and session token must be provided together"
64
+ $icon = $env:TOKAMAK_WINDOWS_ICON
65
+ if ($icon -and (-not (Test-Path -LiteralPath $icon -PathType Leaf) -or [System.IO.Path]::GetExtension($icon) -ne ".ico")) {
66
+ throw "windows.icon must be an .ico file: $icon"
75
67
  }
76
68
  $app = Join-Path $output "app"
77
69
 
@@ -81,23 +73,18 @@ if (Test-Path $output) {
81
73
  New-Item -ItemType Directory -Force -Path $app | Out-Null
82
74
  Copy-Item (Join-Path $InputDirectory "app/*") $app -Recurse -Force
83
75
  Invoke-RuntimeLink (Join-Path $output "$appSlug.exe")
84
- $icon = Join-Path $InputDirectory "icons/windows/AppIcon.ico"
85
- if (Test-Path -LiteralPath $icon -PathType Leaf) {
76
+ if ($icon) {
86
77
  Copy-Item -LiteralPath $icon (Join-Path $output "AppIcon.ico")
87
78
  }
88
79
 
89
80
  $config = [ordered]@{
90
81
  name = $appName
91
82
  slug = $appSlug
92
- identifier = $identifier
93
83
  host = $appHost
94
84
  }
95
- if (Test-Path (Join-Path $InputDirectory "metadata/version")) {
96
- $config.version = Read-TokamakValue "version"
97
- }
98
- if (-not [string]::IsNullOrWhiteSpace($devEndpoint)) {
99
- $config.devEndpoint = $devEndpoint
100
- $config.devSessionToken = $devSessionToken
85
+ if (Test-Path (Join-Path $InputDirectory "metadata/dev-endpoint")) {
86
+ $config.devEndpoint = Read-TokamakValue "dev-endpoint"
87
+ $config.devSessionToken = Read-TokamakValue "dev-session-token"
101
88
  }
102
89
  $config = $config | ConvertTo-Json
103
90
  $encoding = New-Object System.Text.UTF8Encoding($false)
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/windows-x64/lib/TokamakRuntime/tokamak.lib
3
- size: 42866020 bytes
4
- sha256: 76ae6e9c87d7b505a345d49d0abb83034d20e887ebc54f35b30ce6f5716c1e46
3
+ size: 42792670 bytes
4
+ sha256: 14dd99052ae2078338629fdf222ffe15dc9fc3732a1565b70f90183e63d6ac3c
@@ -1,13 +1,6 @@
1
1
  {
2
2
  "tokamakVersion": "0.1.1",
3
3
  "target": "windows-x64",
4
- "artifacts": [
5
- {
6
- "kind": "runtimeLibrary",
7
- "path": "lib/TokamakRuntime"
8
- }
9
- ],
10
- "requiredTools": [],
11
4
  "variables": {},
12
5
  "pluginKeys": {}
13
6
  }