@tokamakdev/platform-windows-x64 0.1.1-beta.70 → 0.1.1-beta.73
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
|
@@ -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 $
|
|
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
|
-
$
|
|
64
|
-
$
|
|
65
|
-
|
|
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
|
|
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/
|
|
96
|
-
$config.
|
|
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:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 42845924 bytes
|
|
4
|
+
sha256: a3cef195e4a7954ca39b5cc87415902a26365620499b59a5cb47ef6c9b4e5ba3
|