diff --git a/Makefile b/Makefile index 76ea6b8c..9e75e73f 100644 --- a/Makefile +++ b/Makefile @@ -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 & \ diff --git a/README.md b/README.md index 267b65e3..fafb9340 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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 diff --git a/presets/vcs/skeleton.remote:llvm-mos b/presets/vcs/skeleton.llvm-mos similarity index 100% rename from presets/vcs/skeleton.remote:llvm-mos rename to presets/vcs/skeleton.llvm-mos diff --git a/src/ide/ui.ts b/src/ide/ui.ts index 3e016724..92485c83 100644 --- a/src/ide/ui.ts +++ b/src/ide/ui.ts @@ -489,7 +489,7 @@ function reloadProject(id: string) { } async function getSkeletonFile(fileid: string): Promise { - 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) { diff --git a/src/worker/builder.ts b/src/worker/builder.ts index 99787948..8215ddf5 100644 --- a/src/worker/builder.ts +++ b/src/worker/builder.ts @@ -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; @@ -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]; @@ -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) {