Fix Optima service architecture for x86 COM

This commit is contained in:
2026-09-08 12:35:50 +00:00
parent 6c4e50f7a6
commit cd02e6af5f
123 changed files with 32 additions and 21 deletions

View File

@@ -11,7 +11,8 @@ Testy z bazą są celowo wykonywane dopiero po ręcznym przygotowaniu i zarejest
## Kontrola bez zapisu ## Kontrola bez zapisu
Uruchom opublikowaną wersję x64: Uruchom wersję opublikowaną dla tej samej architektury co `op_base.dll` (`x86`
jest domyślne, opcjonalnie użyj `.\publish-optima.ps1 -Architecture x64`):
```powershell ```powershell
.\release-optima\SmartB2B.Optima.Service.exe --config .\src\SmartB2B.Optima.Service\config\optima.json --check-config .\release-optima\SmartB2B.Optima.Service.exe --config .\src\SmartB2B.Optima.Service\config\optima.json --check-config

View File

@@ -79,13 +79,19 @@ nie kopiuje tej wartości automatycznie z `enova.json.sample` do istniejącej ko
.\publish-enova.ps1 .\publish-enova.ps1
``` ```
Paczka Optimy jest samodzielnym buildem `win-x64`, zgodnym z Optimą 2026.5.1, Paczka Optimy jest domyślnie samodzielnym buildem `win-x86`, zgodnym z 32-bitową
i nie wymaga instalowania runtime .NET x64. Nie zawiera bibliotek ani licencji Comarch: biblioteką COM na stanowisku produkcyjnym, i nie wymaga instalowania runtime .NET.
Nie zawiera bibliotek ani licencji Comarch:
```powershell ```powershell
.\publish-optima.ps1 .\publish-optima.ps1
``` ```
Architektura procesu musi być identyczna z architekturą `op_base.dll` w katalogu
Optimy. Dla instalacji z 64-bitową biblioteką COM zbuduj osobną paczkę poleceniem
`.\publish-optima.ps1 -Architecture x64`. Jedna paczka nie obsługuje obu wariantów,
ponieważ COM Optimy jest ładowany bezpośrednio do procesu.
Wynik trafia do `release-optima`. Po uzupełnieniu `config/optima.json` instalację Wynik trafia do `release-optima`. Po uzupełnieniu `config/optima.json` instalację
wykonuje `release-optima/daemon/install.cmd`. Usługa ma identyfikator wykonuje `release-optima/daemon/install.cmd`. Usługa ma identyfikator
`smartb2bsync-optima`. `smartb2bsync-optima`.

View File

@@ -1,7 +1,9 @@
param( param(
[string]$OutputPath = (Join-Path $PSScriptRoot "release-optima"), [string]$OutputPath = (Join-Path $PSScriptRoot "release-optima"),
[ValidateSet("Debug", "Release")] [ValidateSet("Debug", "Release")]
[string]$Configuration = "Release" [string]$Configuration = "Release",
[ValidateSet("x86", "x64")]
[string]$Architecture = "x86"
) )
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
@@ -18,6 +20,7 @@ $winSwSource = Resolve-Path (Join-Path $daemonSource "smartb2bsync-optima.exe")
$output = [System.IO.Path]::GetFullPath($OutputPath) $output = [System.IO.Path]::GetFullPath($OutputPath)
$workspace = [System.IO.Path]::GetFullPath($PSScriptRoot) $workspace = [System.IO.Path]::GetFullPath($PSScriptRoot)
$daemonOutput = Join-Path $output "daemon" $daemonOutput = Join-Path $output "daemon"
$runtimeIdentifier = "win-$Architecture"
if (-not $output.StartsWith($workspace, [StringComparison]::OrdinalIgnoreCase) -or if (-not $output.StartsWith($workspace, [StringComparison]::OrdinalIgnoreCase) -or
$output -eq $workspace -or $output -eq $workspace -or
@@ -32,7 +35,7 @@ if (Test-Path -LiteralPath $output) {
New-Item -ItemType Directory -Force -Path $output | Out-Null New-Item -ItemType Directory -Force -Path $output | Out-Null
New-Item -ItemType Directory -Force -Path $daemonOutput | Out-Null New-Item -ItemType Directory -Force -Path $daemonOutput | Out-Null
& $dotnet publish $project -c $Configuration -r win-x64 --self-contained true -o $output & $dotnet publish $project -c $Configuration -r $runtimeIdentifier --self-contained true -p:PlatformTarget=$Architecture -o $output
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
throw "Publikowanie usługi Optimy nie powiodło się." throw "Publikowanie usługi Optimy nie powiodło się."
} }
@@ -76,4 +79,4 @@ try {
$writer.Dispose() $writer.Dispose()
} }
Write-Host "Gotowa usługa Optimy (self-contained win-x64): $output" Write-Host "Gotowa usługa Optimy (self-contained $runtimeIdentifier): $output"

Binary file not shown.

Binary file not shown.

View File

@@ -1,24 +1,24 @@
{ {
"runtimeTarget": { "runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0/win-x64", "name": ".NETCoreApp,Version=v8.0/win-x86",
"signature": "" "signature": ""
}, },
"compilationOptions": {}, "compilationOptions": {},
"targets": { "targets": {
".NETCoreApp,Version=v8.0": {}, ".NETCoreApp,Version=v8.0": {},
".NETCoreApp,Version=v8.0/win-x64": { ".NETCoreApp,Version=v8.0/win-x86": {
"SmartB2B.Optima.Service/1.0.0": { "SmartB2B.Optima.Service/1.0.0": {
"dependencies": { "dependencies": {
"SmartB2B.Optima.Adapter": "1.0.0", "SmartB2B.Optima.Adapter": "1.0.0",
"SmartB2B.Sync.Contracts": "1.0.0", "SmartB2B.Sync.Contracts": "1.0.0",
"SmartB2B.Sync.Service": "1.0.0", "SmartB2B.Sync.Service": "1.0.0",
"runtimepack.Microsoft.NETCore.App.Runtime.win-x64": "8.0.24" "runtimepack.Microsoft.NETCore.App.Runtime.win-x86": "8.0.24"
}, },
"runtime": { "runtime": {
"SmartB2B.Optima.Service.dll": {} "SmartB2B.Optima.Service.dll": {}
} }
}, },
"runtimepack.Microsoft.NETCore.App.Runtime.win-x64/8.0.24": { "runtimepack.Microsoft.NETCore.App.Runtime.win-x86/8.0.24": {
"runtime": { "runtime": {
"Microsoft.CSharp.dll": { "Microsoft.CSharp.dll": {
"assemblyVersion": "8.0.0.0", "assemblyVersion": "8.0.0.0",
@@ -694,7 +694,7 @@
} }
}, },
"native": { "native": {
"Microsoft.DiaSymReader.Native.amd64.dll": { "Microsoft.DiaSymReader.Native.x86.dll": {
"fileVersion": "14.42.34436.0" "fileVersion": "14.42.34436.0"
}, },
"System.IO.Compression.Native.dll": { "System.IO.Compression.Native.dll": {
@@ -724,7 +724,7 @@
"mscordaccore.dll": { "mscordaccore.dll": {
"fileVersion": "8.0.2426.7010" "fileVersion": "8.0.2426.7010"
}, },
"mscordaccore_amd64_amd64_8.0.2426.7010.dll": { "mscordaccore_x86_x86_8.0.2426.7010.dll": {
"fileVersion": "8.0.2426.7010" "fileVersion": "8.0.2426.7010"
}, },
"mscordbi.dll": { "mscordbi.dll": {
@@ -861,7 +861,7 @@
}, },
"Microsoft.Data.SqlClient.SNI.runtime/5.2.0": { "Microsoft.Data.SqlClient.SNI.runtime/5.2.0": {
"native": { "native": {
"runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll": { "runtimes/win-x86/native/Microsoft.Data.SqlClient.SNI.dll": {
"fileVersion": "5.2.0.0" "fileVersion": "5.2.0.0"
} }
} }
@@ -1481,7 +1481,7 @@
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"runtimepack.Microsoft.NETCore.App.Runtime.win-x64/8.0.24": { "runtimepack.Microsoft.NETCore.App.Runtime.win-x86/8.0.24": {
"type": "runtimepack", "type": "runtimepack",
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
@@ -2091,7 +2091,7 @@
} }
}, },
"runtimes": { "runtimes": {
"win-x64": [ "win-x86": [
"win", "win",
"any", "any",
"base" "base"

View File

@@ -8,7 +8,6 @@
} }
], ],
"configProperties": { "configProperties": {
"Sentry.Native.IsEnabled": true,
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false, "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More