Compare commits

...

2 Commits

Author SHA1 Message Date
Marvin 9f8164ba59 updating gregcore to newer version.
Sponsor Tier Sync / sync (push) Failing after 34s
gregCore CI / build (push) Has been cancelled
2026-04-21 08:11:36 +02:00
Marvin 39ee14d6f3 publ.: Adding Packs to publish
SDK: adding SDKs to give the user more Opportunities to create mods.
2026-04-21 07:41:28 +02:00
30 changed files with 83 additions and 160 deletions
+35 -6
View File
@@ -2,17 +2,20 @@
$ErrorActionPreference = "Stop"
$ProjFile = Join-Path $PSScriptRoot "gregCore.csproj"
$OutDir = Join-Path $PSScriptRoot "publish_out"
Write-Host "Restoring NuGet packages..." -ForegroundColor Cyan
dotnet restore src/gregCore.csproj
dotnet restore $ProjFile
if ($LASTEXITCODE -ne 0) {
Write-Error "Restore failed."
exit 1
}
Write-Host "Building and packing gregCore.dll via ILRepack..." -ForegroundColor Cyan
dotnet build src/gregCore.csproj --configuration Release
Write-Host "Building and publishing gregCore and dependencies..." -ForegroundColor Cyan
dotnet publish $ProjFile --configuration Release -o $OutDir
if ($LASTEXITCODE -ne 0) {
Write-Error "Build failed."
Write-Error "Publish failed."
exit 1
}
@@ -22,14 +25,40 @@ if (!(Test-Path $GameDir)) {
Write-Host "Data Center directory not found at default location. Skipping deploy." -ForegroundColor Yellow
} else {
$ModsDir = Join-Path $GameDir "Mods"
$UserLibsDir = Join-Path $GameDir "UserLibs"
if (!(Test-Path $ModsDir)) {
New-Item -ItemType Directory -Force -Path $ModsDir | Out-Null
}
if (!(Test-Path $UserLibsDir)) {
New-Item -ItemType Directory -Force -Path $UserLibsDir | Out-Null
}
$SourceDll = "src/bin/Release/net6.0/gregCore.dll"
$SourceDll = Join-Path $OutDir "gregCore.dll"
if (Test-Path $SourceDll) {
Write-Host "Deploying to $ModsDir..." -ForegroundColor Cyan
Write-Host "Deploying gregCore.dll to $ModsDir..." -ForegroundColor Cyan
Copy-Item -Path $SourceDll -Destination $ModsDir -Force
Write-Host "Deploying dependencies to $UserLibsDir..." -ForegroundColor Cyan
$Deps = @(
"Acornima.dll",
"Jint.dll",
"LiteDB.dll",
"MoonSharp.Interpreter.dll",
"Newtonsoft.Json.dll",
"Python.Runtime.dll"
)
foreach ($dep in $Deps) {
$depPath = Join-Path $OutDir $dep
if (Test-Path $depPath) {
Copy-Item -Path $depPath -Destination $UserLibsDir -Force
Write-Host " -> $dep" -ForegroundColor Gray
} else {
Write-Host " Warning: Dependency $dep not found in $OutDir" -ForegroundColor Yellow
}
}
Write-Host "Deployment successful." -ForegroundColor Green
} else {
Write-Error "Built DLL not found at $SourceDll"
Binary file not shown.
BIN
View File
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.
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.
-151
View File
@@ -1,151 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"gregCore/1.0.0": {
"dependencies": {
"Jint": "4.8.0",
"LiteDB": "5.0.21",
"Mono.Cecil": "0.11.6",
"MoonSharp": "2.0.0",
"Newtonsoft.Json": "13.0.3",
"pythonnet": "3.0.5"
},
"runtime": {
"gregCore.dll": {}
}
},
"Acornima/1.4.0": {
"runtime": {
"lib/netstandard2.1/Acornima.dll": {
"assemblyVersion": "1.4.0.0",
"fileVersion": "1.4.0.0"
}
}
},
"Jint/4.8.0": {
"dependencies": {
"Acornima": "1.4.0"
},
"runtime": {
"lib/netstandard2.1/Jint.dll": {
"assemblyVersion": "4.8.0.0",
"fileVersion": "4.5.0.0"
}
}
},
"LiteDB/5.0.21": {
"runtime": {
"lib/netstandard2.0/LiteDB.dll": {
"assemblyVersion": "5.0.21.0",
"fileVersion": "5.0.21.0"
}
}
},
"Mono.Cecil/0.11.6": {
"runtime": {
"lib/netstandard2.0/Mono.Cecil.Mdb.dll": {
"assemblyVersion": "0.11.6.0",
"fileVersion": "0.11.6.0"
},
"lib/netstandard2.0/Mono.Cecil.Pdb.dll": {
"assemblyVersion": "0.11.6.0",
"fileVersion": "0.11.6.0"
},
"lib/netstandard2.0/Mono.Cecil.Rocks.dll": {
"assemblyVersion": "0.11.6.0",
"fileVersion": "0.11.6.0"
},
"lib/netstandard2.0/Mono.Cecil.dll": {
"assemblyVersion": "0.11.6.0",
"fileVersion": "0.11.6.0"
}
}
},
"MoonSharp/2.0.0": {
"runtime": {
"lib/netstandard1.6/MoonSharp.Interpreter.dll": {
"assemblyVersion": "2.0.0.0",
"fileVersion": "2.0.0.0"
}
}
},
"Newtonsoft.Json/13.0.3": {
"runtime": {
"lib/net6.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.3.27908"
}
}
},
"pythonnet/3.0.5": {
"runtime": {
"lib/netstandard2.0/Python.Runtime.dll": {
"assemblyVersion": "3.0.5.0",
"fileVersion": "3.0.5.0"
}
}
}
}
},
"libraries": {
"gregCore/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Acornima/1.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3M7NpnhKL//pf7HkSfLJaGQ37uksibdqfa9YuUov1VOX0QXapZeYCUpURZ9an4VMt9wJ70MU/PeAsjhw8DwtJw==",
"path": "acornima/1.4.0",
"hashPath": "acornima.1.4.0.nupkg.sha512"
},
"Jint/4.8.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JlXh13WDivP2izPgS9jeUlzyP//hsHUGhGb33EQHLuRiLhdwJ0ajaYjVETnqnkIQay/qP6NHglxx/40bL0/ihQ==",
"path": "jint/4.8.0",
"hashPath": "jint.4.8.0.nupkg.sha512"
},
"LiteDB/5.0.21": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ykJ7ffFl7P9YQKR/PLci6zupiLrsSCNkOTiw6OtzntH7d2kCYp5L1+3a/pksKgTEHcJBoPXFtg7VZSGVBseN9w==",
"path": "litedb/5.0.21",
"hashPath": "litedb.5.0.21.nupkg.sha512"
},
"Mono.Cecil/0.11.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-f33RkDtZO8VlGXCtmQIviOtxgnUdym9xx/b1p9h91CRGOsJFxCFOFK1FDbVt1OCf1aWwYejUFa2MOQyFWTFjbA==",
"path": "mono.cecil/0.11.6",
"hashPath": "mono.cecil.0.11.6.nupkg.sha512"
},
"MoonSharp/2.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-uiAcRh7d+53k3xW9pFDJfAFVw4RnjHVCJG05M3oPAVEVwPtFavhg1H/IpC6So4X1j9kJlzuLlA3OghhPcIvc5A==",
"path": "moonsharp/2.0.0",
"hashPath": "moonsharp.2.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
"path": "newtonsoft.json/13.0.3",
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
},
"pythonnet/3.0.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-20UVeB1uDpvCHZi8yNv7VCSUKVRRaxPZWFYhkO+BjfBB9GgOh2vEeucy3U7zTY8xEVCHf2XHpRNfAU/3quxXZw==",
"path": "pythonnet/3.0.5",
"hashPath": "pythonnet.3.0.5.nupkg.sha512"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+10 -3
View File
@@ -15,7 +15,7 @@ New-Item -ItemType Directory -Path $publishDir | Out-Null
# 2. Build
Write-Host "Building gregCore (Release)..." -ForegroundColor Yellow
dotnet build "$repoRoot\src\gregCore.csproj" -c Release -o "$buildDir"
dotnet build "$repoRoot\gregCore.csproj" -c Release -o "$buildDir"
# 3. Check output
$dllPath = "$buildDir\gregCore.dll"
@@ -23,7 +23,10 @@ if (-not (Test-Path $dllPath)) {
Write-Error "Build failed: gregCore.dll not found at $dllPath"
}
# 4. Package
# 4. Package SDK Assets
& "$PSScriptRoot\Package-SdkAssets.ps1"
# 5. Package release
$version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($dllPath).FileVersion
$zipName = "gregCore-v$version.zip"
$zipPath = "$publishDir\$zipName"
@@ -36,7 +39,7 @@ if (Test-Path $tmpDir) { Remove-Item -Recurse -Force $tmpDir }
New-Item -ItemType Directory -Path $tmpDir | Out-Null
Copy-Item $dllPath -Destination $tmpDir
Copy-Item "$repoRoot\README.md" -Destination $tmpDir
Copy-Item "C:\Users\marvi\source\repos\gregFramework\CHANGELOG.md" -Destination $tmpDir
Copy-Item "$repoRoot\CHANGELOG.md" -Destination $tmpDir
Copy-Item "$repoRoot\assets\greg_hooks.json" -Destination $tmpDir
# Create zip
@@ -44,5 +47,9 @@ Compress-Archive -Path "$tmpDir\*" -DestinationPath $zipPath -Force
Remove-Item -Recurse -Force $tmpDir
# Copy SDK packs to publish dir for release workflow
Write-Host "Copying SDK packs to $publishDir..." -ForegroundColor Yellow
Copy-Item -Path "$repoRoot\sdk\packs\*.zip" -Destination $publishDir -ErrorAction SilentlyContinue
Write-Host "--- Successfully packaged gregCore to $zipPath ---" -ForegroundColor Green
+38
View File
@@ -0,0 +1,38 @@
# Package-SdkAssets.ps1
# Creates SDK release assets for all supported languages.
$ErrorActionPreference = "Stop"
$repoRoot = Resolve-Path "$PSScriptRoot\..\.."
$coreRoot = "$repoRoot\gregCore"
$packsDir = "$coreRoot\sdk\packs"
Write-Host "Creating SDK packs in $packsDir" -ForegroundColor Cyan
if (Test-Path $packsDir) {
Remove-Item -Recurse -Force $packsDir
}
New-Item -ItemType Directory -Path $packsDir | Out-Null
# 1. Package greg-rust-sdk
$rustSdkDir = "$repoRoot\greg-rust-sdk"
if (Test-Path $rustSdkDir) {
Write-Host "Packaging Rust SDK..."
Compress-Archive -Path "$rustSdkDir\*" -DestinationPath "$packsDir\greg-rust-sdk.zip" -Force
}
# 2. Package other languages from examples
$examplesDir = "$coreRoot\examples"
if (Test-Path $examplesDir) {
$langs = @("Go", "Js", "Lua", "Python", "Rust")
foreach ($lang in $langs) {
$langDir = "$examplesDir\$lang"
if (Test-Path $langDir) {
Write-Host "Packaging $lang SDK/Example..."
$destZip = "$packsDir\greg-${lang}-sdk.zip".ToLower()
Compress-Archive -Path "$langDir\*" -DestinationPath $destZip -Force
}
}
}
Write-Host "SDK packs created successfully!" -ForegroundColor Green
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.