dsn: debugger, play/stop, runtime (fixes)
This commit is contained in:
parent
a8f7830ccb
commit
bbba58297b
@ -210,7 +210,7 @@ public final class StudioPlayStopCoordinator {
|
||||
executionSession.appendRuntimeLog(StudioExecutionLogSeverity.ERROR, "Runtime preflight failed: prometeuRuntimePath is missing.");
|
||||
return null;
|
||||
}
|
||||
final Path runtimePath = Path.of(runtimePathValue).toAbsolutePath().normalize();
|
||||
final Path runtimePath = Path.of(runtimePathValue).resolve("prometeu").toAbsolutePath().normalize();
|
||||
if (!Files.isRegularFile(runtimePath)) {
|
||||
executionSession.appendRuntimeLog(StudioExecutionLogSeverity.ERROR, "Runtime preflight failed: runtime not found at " + runtimePath + ".");
|
||||
return null;
|
||||
|
||||
@ -11,7 +11,7 @@ public final class StudioExternalRuntimeProcessLauncher implements StudioRuntime
|
||||
public StudioRuntimeProcessHandle launch(
|
||||
final ProjectReference projectReference,
|
||||
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())
|
||||
.start();
|
||||
return new ExternalProcessHandle(process);
|
||||
|
||||
@ -7,11 +7,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import p.packer.PackerWorkspaceService;
|
||||
import p.packer.dtos.PackerDiagnosticDTO;
|
||||
import p.packer.dtos.PackerPackValidationAssetDTO;
|
||||
import p.packer.messages.PackWorkspaceRequest;
|
||||
import p.packer.messages.PackWorkspaceResult;
|
||||
import p.packer.messages.PackerOperationStatus;
|
||||
import p.packer.messages.ValidatePackWorkspaceRequest;
|
||||
import p.packer.messages.ValidatePackWorkspaceResult;
|
||||
import p.packer.messages.*;
|
||||
import p.studio.Container;
|
||||
import p.studio.compiler.messages.BuilderPipelineConfig;
|
||||
import p.studio.compiler.models.BuildResult;
|
||||
@ -162,7 +158,7 @@ public final class StudioShipperService {
|
||||
final Path manifestPath = buildRoot.resolve(MANIFEST_FILE);
|
||||
try {
|
||||
Files.createDirectories(buildRoot);
|
||||
final ObjectNode manifest = createManifest(projectReference, buildResult, buildRoot);
|
||||
final ObjectNode manifest = createManifest(projectReference, buildResult);
|
||||
MAPPER.writerWithDefaultPrettyPrinter().writeValue(manifestPath.toFile(), manifest);
|
||||
emit(logs, logSink, StudioShipperLogEntry.info(
|
||||
StudioShipperLogSource.MANIFEST,
|
||||
@ -178,23 +174,15 @@ public final class StudioShipperService {
|
||||
|
||||
private ObjectNode createManifest(
|
||||
final ProjectReference projectReference,
|
||||
final BuildResult buildResult,
|
||||
final Path buildRoot) throws IOException {
|
||||
final BuildResult buildResult) throws IOException {
|
||||
final ObjectNode manifest = MAPPER.createObjectNode();
|
||||
final JsonNode projectManifest = MAPPER.readTree(projectReference.rootPath().resolve(PROJECT_MANIFEST_FILE).toFile());
|
||||
manifest.put("magic", "PMTU");
|
||||
manifest.put("cartridge_version", 1);
|
||||
manifest.put("app_id", stableAppId(projectReference));
|
||||
manifest.put("title", projectReference.name());
|
||||
manifest.put("app_version", projectReference.version());
|
||||
manifest.put("app_mode", "game");
|
||||
manifest.put("app_mode", "Game");
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,5 @@
|
||||
"title": "Fragments",
|
||||
"app_version": "0.1.0",
|
||||
"app_mode": "Game",
|
||||
"entrypoint": "0",
|
||||
"capabilities": ["log", "gfx", "asset"]
|
||||
}
|
||||
|
||||
@ -5,6 +5,5 @@
|
||||
"title": "Main Test",
|
||||
"app_version": "0.1.0",
|
||||
"app_mode": "Game",
|
||||
"entrypoint": "0",
|
||||
"capabilities": ["log", "gfx", "asset"]
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -2,6 +2,4 @@
|
||||
|
||||
set -e
|
||||
|
||||
cp build/assets.pa cartridge
|
||||
cp build/program.pbx cartridge
|
||||
./runtime/prometeu run cartridge
|
||||
./runtime/prometeu run build
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user