mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-24 20:32:39 +00:00
Add support for upper/lower case expansion of filename in linker script. Closes #345
This commit is contained in:
parent
08d268f130
commit
34ca539dd5
@ -42,6 +42,8 @@ public class SourceLoader {
|
|||||||
String outputFileName = new File(program.getFileName()).getName();
|
String outputFileName = new File(program.getFileName()).getName();
|
||||||
String linkScript = new String(Files.readAllBytes(filePath));
|
String linkScript = new String(Files.readAllBytes(filePath));
|
||||||
linkScript = linkScript.replace("%O", outputFileName);
|
linkScript = linkScript.replace("%O", outputFileName);
|
||||||
|
linkScript = linkScript.replace("%_O", outputFileName.toLowerCase());
|
||||||
|
linkScript = linkScript.replace("%^O", outputFileName.toUpperCase());
|
||||||
program.setLinkScript(filePath, linkScript);
|
program.setLinkScript(filePath, linkScript);
|
||||||
program.setTargetPlatform(TargetPlatform.CUSTOM);
|
program.setTargetPlatform(TargetPlatform.CUSTOM);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Load a file to memory using the C64 KERNAL LOAD functions
|
// Create a D64 disk containing the program and a sprite file
|
||||||
.file [name="kernalload.prg", type="prg", segments="Program"]
|
.file [name="%O.prg", type="prg", segments="Program"]
|
||||||
.disk [filename="kernalload.d64", name="DISK", id=1] {
|
.disk [filename="%O.d64", name="DISK", id=1] {
|
||||||
[name="KERNALLOAD", type="prg", segments="Program"],
|
[name="%^O", type="prg", segments="Program"],
|
||||||
[name="SPRITE", type="prg", segments="Sprite"]
|
[name="SPRITE", type="prg", segments="Sprite"]
|
||||||
}
|
}
|
||||||
.segmentdef Program [segments="Basic, Code, Data"]
|
.segmentdef Program [segments="Basic, Code, Data"]
|
||||||
|
Loading…
Reference in New Issue
Block a user