Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,17 @@ distro: buildtsc
rm -r $(TMP)/doc $(TMP)/scripts $(TMP)/test* $(TMP)/tools $(TMP)/.[a-z]* $(TMP)/ts*.json # $(TMP)/meta
rm -f $(TMP)/javatari && mkdir -p $(TMP)/javatari && cp -p javatari.js/release/javatari/* $(TMP)/javatari/

tsweb: submodules node_modules
getip:
@if command -v ip > /dev/null; then \
ip addr | grep -w inet; \
elif command -v ifconfig > /dev/null; then \
ifconfig | grep -w inet; \
else \
ipconfig | grep IPv4; \
fi

tsweb: submodules node_modules getip
npm run esbuild-clean
(ip addr || ifconfig) | grep inet
trap 'kill 0' EXIT; \
make buildgrammars; \
$(TSC) -w --preserveWatchOutput & \
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ git clone -b master --single-branch git@github.com:sehugg/8bitworkshop.git
To build the 8bitworkshop IDE:

```sh
# On Windows, use the `UCRT64` shell from https://msys2.org/
# On Linux/macOS, just type:
make
```

Expand Down Expand Up @@ -51,7 +53,7 @@ Copyright © 2016-2026 [Steven E. Hugg](https://github.com/sehugg).
This project, unless specifically noted, is multi-licensed.
You may choose to adhere to the terms of either the [GPL-3.0](https://github.com/sehugg/8bitworkshop/blob/master/LICENSE) License for the entire project or respect the individual licenses of its dependencies and included code samples, as applicable.

This project includes various dependencies, modules, and components that retain their original licenses.
This project includes various dependencies, modules, and components that retain their original licenses.
For detailed licensing information for each dependency, please refer to the respective files and documentation.

All included code samples located in the `presets/` directory are licensed under
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/ide/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ function reloadProject(id: string) {
}

async function getSkeletonFile(fileid: string): Promise<string> {
var ext = platform.getToolForFilename(fileid);
var ext = platform.getToolForFilename(fileid).replace(/^remote:/, "");
try {
return await $.get("presets/" + getBasePlatform(platform_id) + "/skeleton." + ext, 'text');
} catch (e) {
Expand Down
11 changes: 10 additions & 1 deletion src/worker/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ export interface BuildStep extends WorkerBuildStep {

///

export function fixLineEndings(data: any): any {
if (typeof data === 'string') {
// C build tools require LF line endings.
return data.replace(/\r\n/g, '\n');
}
return data;
}

export class FileWorkingStore implements WorkingStore {
workfs: { [path: string]: FileEntry } = {};
workerseq: number = 0;
Expand Down Expand Up @@ -89,7 +97,7 @@ export class FileWorkingStore implements WorkingStore {
let data = this.getFileData(path);
if (data != null && typeof data !== 'string')
throw new Error(`${path}: expected string`)
return data as string; // TODO
return fixLineEndings(data) as string; // TODO
}
getFileEntry(path: string): FileEntry {
return this.workfs[path];
Expand Down Expand Up @@ -256,6 +264,7 @@ export function populateEntry(fs, path: string, entry: FileEntry, options: Build
if (options && options.processFn) {
data = options.processFn(path, data);
}
data = fixLineEndings(data);
// create subfolders
var toks = path.split('/');
if (toks.length > 1) {
Expand Down
Loading