tangled
alpha
login
or
join now
starhaven.dev
/
diorama
1
fork
atom
this repo has no description
1
fork
atom
overview
issues
pulls
pipelines
install baserom before splitting assets
bates64.com
1 month ago
89755f0a
86f8ff5f
+22
-8
2 changed files
expand all
collapse all
unified
split
src
main
java
app
Environment.java
project
engine
Engine.java
+18
-4
src/main/java/app/Environment.java
···
46
46
import project.ProjectListing;
47
47
import project.ProjectManager;
48
48
import project.Manifest;
49
49
+
import project.engine.BuildException;
50
50
+
import project.engine.Engine;
49
51
import project.ui.ProjectSwitcherDialog;
50
52
import assets.AssetExtractor;
51
53
import assets.ExpectedAsset;
···
528
530
}
529
531
530
532
Directories.setProjectDirectory(project.getPath());
531
531
-
Directories.setDumpDirectory(project.getEngine().getDumpDir().getAbsolutePath());
533
533
+
final Engine engine = project.getEngine();
534
534
+
Directories.setDumpDirectory(engine.getDumpDir().getAbsolutePath());
535
535
+
536
536
+
usBaseRom = engine.getBaseRom();
537
537
+
if (!usBaseRom.exists()) {
538
538
+
promptForBaserom();
539
539
+
if (!usBaseRom.exists())
540
540
+
return false;
541
541
+
}
542
542
+
543
543
+
try {
544
544
+
engine.splitAssets();
545
545
+
} catch (BuildException e) {
546
546
+
Logger.logError("Failed to split assets: " + e.getMessage());
547
547
+
return false;
548
548
+
}
532
549
533
550
// Asset stack (TODO: move to Project?)
534
551
assetDirectories = new ArrayList<>();
···
536
553
// ...dependencies...
537
554
assetDirectories.add(Directories.ENGINE_ASSETS_US.toFile());
538
555
539
539
-
usBaseRom = project.getEngine().getBaseRom();
540
540
-
if (!usBaseRom.exists())
541
541
-
promptForBaserom();
542
556
if (!ensureDumpExtracted()) {
543
557
return false;
544
558
}
+4
-4
src/main/java/project/engine/Engine.java
···
46
46
else
47
47
checkoutRef();
48
48
}
49
49
-
50
50
-
splitAssets(); // TODO: only call when necessary i.e. git HEAD changed
51
49
}
52
50
53
51
/**
···
141
139
buildEnv.gitCheckout(directory, ref, BuildOutputListener.toLogger());
142
140
}
143
141
144
144
-
public BuildResult splitAssets() throws BuildException, IOException
142
142
+
public void splitAssets() throws BuildException, IOException
145
143
{
146
144
Logger.log("Splitting assets from ROM...", Priority.MILESTONE);
147
147
-
return buildEnv.configure(directory, BuildOutputListener.toLogger());
145
145
+
BuildResult result = buildEnv.configure(directory, BuildOutputListener.toLogger());
146
146
+
if (!result.isSuccess())
147
147
+
throw new BuildException("Failed to split assets: " + result.getErrorMessage());
148
148
}
149
149
150
150
private static boolean isGitRepo(File dir)