-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Common Build Tooling ## Information for Developers On Windows, the build scripts will automatically install Node. Other platforms should use their package manager or download it from https://nodejs.org/en/download/ Pick one: - VSCode: `Ctrl+Shift+B` - VSCode: `F5` (build & run with debugger) or `Ctrl+F5` (build & run without debugger) - Windows: double-click root `Build.bat` (pause to see output) or `tools/build/build.bat` (no pause) - Git Bash and non-Windows: `tools/build/build` ## Information for Server Admins - TGS scripts will automatically install the version of Node specified in `dependencies.sh` - Either use this build script, or compile tgui by running any script in `tgui/bin` folder. ## Details Both dm and tgui are now built with a single script. It's pretty easy to launch: just press `Ctrl+Shift+B` in VSCode, and tada! 🎉 **It's smart.** It will skip certain steps if source files were untouched for that step. So, if you're only touching dm code, it will only rebuild dm code, and will skip tgui. **Syntax is fairly readable and maintainable.** ```js const { Task, runTasks, exec } = require('./cbt'); const taskTgui = new Task('tgui') .depends('tgui/yarn.lock') .depends('tgui/packages/**/*.js') .provides('tgui/public/*.bundle.*') .provides('tgui/public/*.chunk.*') .build(async () => { await exec('tgui/bin/tgui'); }); runTasks([taskTgui]); ``` **This is a long term solution to the js bundle hell.** Now that we have a single script to build everything, bundles have been excluded from the repo, and they will no longer cause conflicts in PRs. This results in quicker PR turnaround time and less time wasted on rebuilding tgui for PRs. **CI pipelines have been updated.** They're not coded in the most optimal way, just making them green for now. ## Possible future work - Support compiling with DM defines by passing them as an argument, like `-D LOWMEMORYMODE`. - Instead of explicitly listing the task sequence in `runTasks()`, support specifying tasks in `.depends()`, which in turn will allow building a graph of dependencies and running things in parallel. Co-authored-by: Tad Hardesty <[email protected]> - Add root Build.bat - Add trio of tools/bootstrap/ scripts for Node - Add tools/build/README.md - Ensure build script and VSC configuration works properly on Linux - Update TGS4 PreCompile scripts Co-authored-by: Jordan Brown <[email protected]> - Keep PreCompile scripts compatible with TGS3 as well - Update LinuxOneShot PreCompile scripts - Update TGS4 configuration
- Loading branch information
1 parent
1bffb85
commit a5d362c
Showing
46 changed files
with
4,216 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "byond", | ||
"request": "launch", | ||
"name": "Launch DreamSeeker", | ||
"preLaunchTask": "Build All", | ||
"dmb": "${workspaceFolder}/${command:CurrentDMB}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "process", | ||
"command": "tools/build/build", | ||
"windows": { | ||
"command": ".\\tools\\build\\build.bat" | ||
}, | ||
"problemMatcher": [ | ||
"$dreammaker", | ||
"$eslint-stylish" | ||
], | ||
"group": "build", | ||
"label": "Build All" | ||
}, | ||
{ | ||
"type": "dreammaker", | ||
"dme": "tgstation.dme", | ||
"problemMatcher": [ | ||
"$dreammaker" | ||
], | ||
"group": "build", | ||
"label": "dm: build - tgstation.dme" | ||
}, | ||
{ | ||
"type": "shell", | ||
"command": "tgui/bin/tgui", | ||
"windows": { | ||
"command": ".\\tgui\\bin\\tgui.bat" | ||
}, | ||
"problemMatcher": [ | ||
"$eslint-stylish" | ||
], | ||
"group": "build", | ||
"label": "tgui: build" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@call tools\build\build | ||
@pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
yarnPath: .yarn/releases/yarn-2.3.3.cjs | ||
logFilters: | ||
## MUST_BUILD | ||
## It's an opencollective advert in postinstall that is not even displayed | ||
## correctly in Yarn, who the fuck cares. | ||
- code: YN0007 | ||
level: discard | ||
## FETCH_NOT_CACHED | ||
## Too many cache misses on first install. | ||
- code: YN0013 | ||
level: discard | ||
## INCOMPATIBLE_OS | ||
## fsevents are not supposed to build, they're macOS specific. | ||
- code: YN0062 | ||
level: discard | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: "@yarnpkg/plugin-workspace-tools" | ||
|
||
yarnPath: .yarn/releases/yarn.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.