dsn: debugger, play/stop, runtime (fixes)

This commit is contained in:
bQUARKz 2026-04-06 12:50:32 +01:00
parent a8f7830ccb
commit bbba58297b
Signed by: bquarkz
SSH Key Fingerprint: SHA256:Z7dgqoglWwoK6j6u4QC87OveEq74WOhFN+gitsxtkf8
7 changed files with 7 additions and 23 deletions

View File

@ -210,7 +210,7 @@ public final class StudioPlayStopCoordinator {
executionSession.appendRuntimeLog(StudioExecutionLogSeverity.ERROR, "Runtime preflight failed: prometeuRuntimePath is missing."); executionSession.appendRuntimeLog(StudioExecutionLogSeverity.ERROR, "Runtime preflight failed: prometeuRuntimePath is missing.");
return null; return null;
} }
final Path runtimePath = Path.of(runtimePathValue).toAbsolutePath().normalize(); final Path runtimePath = Path.of(runtimePathValue).resolve("prometeu").toAbsolutePath().normalize();
if (!Files.isRegularFile(runtimePath)) { if (!Files.isRegularFile(runtimePath)) {
executionSession.appendRuntimeLog(StudioExecutionLogSeverity.ERROR, "Runtime preflight failed: runtime not found at " + runtimePath + "."); executionSession.appendRuntimeLog(StudioExecutionLogSeverity.ERROR, "Runtime preflight failed: runtime not found at " + runtimePath + ".");
return null; return null;

View File

@ -11,7 +11,7 @@ public final class StudioExternalRuntimeProcessLauncher implements StudioRuntime
public StudioRuntimeProcessHandle launch( public StudioRuntimeProcessHandle launch(
final ProjectReference projectReference, final ProjectReference projectReference,
final String runtimePath) throws IOException { final String runtimePath) throws IOException {
final Process process = new ProcessBuilder(runtimePath, "run", "build") final Process process = new ProcessBuilder(runtimePath, "debug", "build")
.directory(projectReference.rootPath().toFile()) .directory(projectReference.rootPath().toFile())
.start(); .start();
return new ExternalProcessHandle(process); return new ExternalProcessHandle(process);

View File

@ -7,11 +7,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import p.packer.PackerWorkspaceService; import p.packer.PackerWorkspaceService;
import p.packer.dtos.PackerDiagnosticDTO; import p.packer.dtos.PackerDiagnosticDTO;
import p.packer.dtos.PackerPackValidationAssetDTO; import p.packer.dtos.PackerPackValidationAssetDTO;
import p.packer.messages.PackWorkspaceRequest; import p.packer.messages.*;
import p.packer.messages.PackWorkspaceResult;
import p.packer.messages.PackerOperationStatus;
import p.packer.messages.ValidatePackWorkspaceRequest;
import p.packer.messages.ValidatePackWorkspaceResult;
import p.studio.Container; import p.studio.Container;
import p.studio.compiler.messages.BuilderPipelineConfig; import p.studio.compiler.messages.BuilderPipelineConfig;
import p.studio.compiler.models.BuildResult; import p.studio.compiler.models.BuildResult;
@ -162,7 +158,7 @@ public final class StudioShipperService {
final Path manifestPath = buildRoot.resolve(MANIFEST_FILE); final Path manifestPath = buildRoot.resolve(MANIFEST_FILE);
try { try {
Files.createDirectories(buildRoot); Files.createDirectories(buildRoot);
final ObjectNode manifest = createManifest(projectReference, buildResult, buildRoot); final ObjectNode manifest = createManifest(projectReference, buildResult);
MAPPER.writerWithDefaultPrettyPrinter().writeValue(manifestPath.toFile(), manifest); MAPPER.writerWithDefaultPrettyPrinter().writeValue(manifestPath.toFile(), manifest);
emit(logs, logSink, StudioShipperLogEntry.info( emit(logs, logSink, StudioShipperLogEntry.info(
StudioShipperLogSource.MANIFEST, StudioShipperLogSource.MANIFEST,
@ -178,23 +174,15 @@ public final class StudioShipperService {
private ObjectNode createManifest( private ObjectNode createManifest(
final ProjectReference projectReference, final ProjectReference projectReference,
final BuildResult buildResult, final BuildResult buildResult) throws IOException {
final Path buildRoot) throws IOException {
final ObjectNode manifest = MAPPER.createObjectNode(); final ObjectNode manifest = MAPPER.createObjectNode();
final JsonNode projectManifest = MAPPER.readTree(projectReference.rootPath().resolve(PROJECT_MANIFEST_FILE).toFile());
manifest.put("magic", "PMTU"); manifest.put("magic", "PMTU");
manifest.put("cartridge_version", 1); manifest.put("cartridge_version", 1);
manifest.put("app_id", stableAppId(projectReference)); manifest.put("app_id", stableAppId(projectReference));
manifest.put("title", projectReference.name()); manifest.put("title", projectReference.name());
manifest.put("app_version", projectReference.version()); manifest.put("app_version", projectReference.version());
manifest.put("app_mode", "game"); manifest.put("app_mode", "Game");
manifest.set("capabilities", capabilitiesNode(buildResult)); manifest.set("capabilities", capabilitiesNode(buildResult));
manifest.set("asset_table", readArrayOrEmpty(buildRoot.resolve(ASSET_TABLE_FILE)));
manifest.set("preload", readArrayOrEmpty(buildRoot.resolve(PRELOAD_FILE)));
if (projectManifest != null) {
putIfTextual(manifest, "project_name", projectManifest.get("name"));
putIfTextual(manifest, "language", projectManifest.get("language"));
}
return manifest; return manifest;
} }

View File

@ -5,6 +5,5 @@
"title": "Fragments", "title": "Fragments",
"app_version": "0.1.0", "app_version": "0.1.0",
"app_mode": "Game", "app_mode": "Game",
"entrypoint": "0",
"capabilities": ["log", "gfx", "asset"] "capabilities": ["log", "gfx", "asset"]
} }

View File

@ -5,6 +5,5 @@
"title": "Main Test", "title": "Main Test",
"app_version": "0.1.0", "app_version": "0.1.0",
"app_mode": "Game", "app_mode": "Game",
"entrypoint": "0",
"capabilities": ["log", "gfx", "asset"] "capabilities": ["log", "gfx", "asset"]
} }

View File

@ -2,6 +2,4 @@
set -e set -e
cp build/assets.pa cartridge ./runtime/prometeu run build
cp build/program.pbx cartridge
./runtime/prometeu run cartridge