mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 07:57:50 +00:00
Fixed build system (#31867)
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -5,6 +5,9 @@
|
||||
*.lk
|
||||
info.json
|
||||
|
||||
# Temporary file created by the build system
|
||||
*.m.dme
|
||||
|
||||
# WinMerge backups
|
||||
*.bak
|
||||
|
||||
@@ -75,3 +78,5 @@ Thumbs.db
|
||||
# Linux users can compile this themselves
|
||||
libvg.so
|
||||
|
||||
# Bootstrapped node installation for the tgui build system
|
||||
.cache
|
||||
|
||||
47
.vscode/tasks.json
vendored
47
.vscode/tasks.json
vendored
@@ -33,11 +33,16 @@
|
||||
"group": "build",
|
||||
"label": "dm: build - vgstation13.dme"
|
||||
},
|
||||
{
|
||||
"command": "${command:dreammaker.reparse}",
|
||||
"group": "build",
|
||||
"label": "dm: reparse"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "tgui/bin/tgui",
|
||||
"command": "bin/tgui-build",
|
||||
"windows": {
|
||||
"command": ".\\tgui\\bin\\tgui.bat"
|
||||
"command": ".\\bin\\tgui-build.cmd"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$tsc",
|
||||
@@ -47,9 +52,43 @@
|
||||
"label": "tgui: build"
|
||||
},
|
||||
{
|
||||
"command": "${command:dreammaker.reparse}",
|
||||
"type": "shell",
|
||||
"command": "bin/tgui-dev",
|
||||
"windows": {
|
||||
"command": ".\\bin\\tgui-dev.cmd"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$tsc",
|
||||
"$eslint-stylish"
|
||||
],
|
||||
"group": "build",
|
||||
"label": "dm: reparse"
|
||||
"label": "tgui: dev server"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "bin/tgui-bench",
|
||||
"windows": {
|
||||
"command": ".\\bin\\tgui-bench.cmd"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$tsc",
|
||||
"$eslint-stylish"
|
||||
],
|
||||
"group": "build",
|
||||
"label": "tgui: bench"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "bin/tgui-sonar",
|
||||
"windows": {
|
||||
"command": ".\\bin\\tgui-sonar.cmd"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$tsc",
|
||||
"$eslint-stylish"
|
||||
],
|
||||
"group": "build",
|
||||
"label": "tgui: sonar"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
2
BUILD.cmd
Normal file
2
BUILD.cmd
Normal file
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
call "%~dp0\tools\build\build.bat" --wait-on-error build %*
|
||||
3
bin/tgui-bench.cmd
Normal file
3
bin/tgui-bench.cmd
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
call "%~dp0\..\tools\build\build.bat" --wait-on-error tgui-bench %*
|
||||
pause
|
||||
@@ -450,9 +450,9 @@ var/list/asset_datums = list()
|
||||
|
||||
/datum/asset/simple/tgfont
|
||||
assets = list(
|
||||
"tgfont.eot" = file("tgui/packages/tgfont/dist/tgfont.eot"),
|
||||
"tgfont.woff2" = file("tgui/packages/tgfont/dist/tgfont.woff2"),
|
||||
"tgfont.css" = file("tgui/packages/tgfont/dist/tgfont.css"),
|
||||
"tgfont.eot" = file("tgui/packages/tgfont/static/tgfont.eot"),
|
||||
"tgfont.woff2" = file("tgui/packages/tgfont/static/tgfont.woff2"),
|
||||
"tgfont.css" = file("tgui/packages/tgfont/static/tgfont.css"),
|
||||
)
|
||||
|
||||
/datum/asset/simple/other_fonts
|
||||
|
||||
20
dependencies.sh
Normal file
20
dependencies.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
#Project dependencies file
|
||||
#TODO: Make the Github Actions CI workflow actually use these and
|
||||
#uncomment the entries as they become needed/used.
|
||||
#Currently, this is only used by build.cmd
|
||||
|
||||
# byond version
|
||||
#export BYOND_MAJOR=514
|
||||
#export BYOND_MINOR=1566
|
||||
|
||||
#node version
|
||||
export NODE_VERSION=16
|
||||
export NODE_VERSION_PRECISE=16.13.1
|
||||
|
||||
# SpacemanDMM git tag
|
||||
#export SPACEMAN_DMM_VERSION=suite-1.7.1
|
||||
|
||||
# Python version for mapmerge and other tools
|
||||
#export PYTHON_VERSION=3.6.8
|
||||
50
tgui/packages/tgfont/static/tgfont.css
Normal file
50
tgui/packages/tgfont/static/tgfont.css
Normal file
@@ -0,0 +1,50 @@
|
||||
@font-face {
|
||||
font-family: "tgfont";
|
||||
src: url("./tgfont.woff2?45c3c7acc69dd413375d77898d24e41e") format("woff2"),
|
||||
url("./tgfont.eot?45c3c7acc69dd413375d77898d24e41e#iefix") format("embedded-opentype");
|
||||
}
|
||||
|
||||
i[class^="tg-"]:before, i[class*=" tg-"]:before {
|
||||
font-family: tgfont !important;
|
||||
font-style: normal;
|
||||
font-weight: normal !important;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.tg-air-tank-slash:before {
|
||||
content: "\f101";
|
||||
}
|
||||
.tg-air-tank:before {
|
||||
content: "\f102";
|
||||
}
|
||||
.tg-bad-touch:before {
|
||||
content: "\f103";
|
||||
}
|
||||
.tg-image-minus:before {
|
||||
content: "\f104";
|
||||
}
|
||||
.tg-image-plus:before {
|
||||
content: "\f105";
|
||||
}
|
||||
.tg-nanotrasen-logo:before {
|
||||
content: "\f106";
|
||||
}
|
||||
.tg-non-binary:before {
|
||||
content: "\f107";
|
||||
}
|
||||
.tg-prosthetic-leg:before {
|
||||
content: "\f108";
|
||||
}
|
||||
.tg-sound-minus:before {
|
||||
content: "\f109";
|
||||
}
|
||||
.tg-sound-plus:before {
|
||||
content: "\f10a";
|
||||
}
|
||||
.tg-syndicate-logo:before {
|
||||
content: "\f10b";
|
||||
}
|
||||
BIN
tgui/packages/tgfont/static/tgfont.eot
Normal file
BIN
tgui/packages/tgfont/static/tgfont.eot
Normal file
Binary file not shown.
BIN
tgui/packages/tgfont/static/tgfont.woff2
Normal file
BIN
tgui/packages/tgfont/static/tgfont.woff2
Normal file
Binary file not shown.
@@ -6004,12 +6004,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"marked@npm:^2.1.3":
|
||||
version: 2.1.3
|
||||
resolution: "marked@npm:2.1.3"
|
||||
"marked@npm:^4.0.10":
|
||||
version: 4.0.10
|
||||
resolution: "marked@npm:4.0.10"
|
||||
bin:
|
||||
marked: bin/marked
|
||||
checksum: 21a5ecd4941bc760aba21dfd97185853ec3b464cf707ad971e3ddb3aeb2f44d0deeb36b0889932afdb6f734975a994d92f18815dd0fabadbd902bdaff997cc5b
|
||||
marked: bin/marked.js
|
||||
checksum: 46cd8ef1a7cfcf5e461727c7f3e16dd4244369ef58f60485e75d3f5df9d53a8249b9609e96a336521eaa5c88d9531cbd296509a148718056e9375e69609f4442
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -8211,7 +8211,7 @@ resolve@^2.0.0-next.3:
|
||||
inferno: ^7.4.8
|
||||
inferno-vnode-flags: ^7.4.8
|
||||
js-yaml: ^4.1.0
|
||||
marked: ^2.1.3
|
||||
marked: ^4.0.10
|
||||
tgui-dev-server: "workspace:*"
|
||||
tgui-polyfill: "workspace:*"
|
||||
languageName: unknown
|
||||
|
||||
@@ -195,6 +195,11 @@ export const TguiAnalyzeTarget = new Juke.Target({
|
||||
executes: () => yarn('tgui:analyze'),
|
||||
});
|
||||
|
||||
export const TguiBenchTarget = new Juke.Target({
|
||||
dependsOn: [YarnTarget],
|
||||
executes: () => yarn('tgui:bench'),
|
||||
});
|
||||
|
||||
export const TestTarget = new Juke.Target({
|
||||
dependsOn: [DmTestTarget, TguiTestTarget],
|
||||
});
|
||||
@@ -204,7 +209,7 @@ export const LintTarget = new Juke.Target({
|
||||
});
|
||||
|
||||
export const BuildTarget = new Juke.Target({
|
||||
dependsOn: [TguiTarget, TgFontTarget, DmTarget],
|
||||
dependsOn: [TguiTarget, DmTarget],
|
||||
});
|
||||
|
||||
export const ServerTarget = new Juke.Target({
|
||||
@@ -268,7 +273,7 @@ const prependDefines = (...defines) => {
|
||||
};
|
||||
|
||||
export const TgsTarget = new Juke.Target({
|
||||
dependsOn: [TguiTarget, TgFontTarget],
|
||||
dependsOn: [TguiTarget],
|
||||
executes: async () => {
|
||||
Juke.logger.info('Prepending TGS define');
|
||||
prependDefines('TGS');
|
||||
|
||||
9
tools/build/juke/index.d.ts
vendored
9
tools/build/juke/index.d.ts
vendored
@@ -3,7 +3,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import _chalk from 'chalk';
|
||||
import { SpawnOptions } from 'child_process';
|
||||
import { SpawnOptionsWithoutStdio } from 'child_process';
|
||||
import EventEmitter from 'events';
|
||||
|
||||
/**
|
||||
@@ -166,7 +166,7 @@ export declare class ExitCode extends Error {
|
||||
signal: string | null;
|
||||
constructor(code: number | null, signal?: string | null);
|
||||
}
|
||||
export declare type ExecOptions = SpawnOptions & {
|
||||
export declare type ExecOptions = SpawnOptionsWithoutStdio & {
|
||||
/**
|
||||
* If `true`, this exec call will not pipe its output to stdio.
|
||||
* @default false
|
||||
@@ -177,11 +177,6 @@ export declare type ExecOptions = SpawnOptions & {
|
||||
* @default true
|
||||
*/
|
||||
throw?: boolean;
|
||||
/**
|
||||
* Captures stdout/stderr to be available in exec return value.
|
||||
* This is experimental functionality.
|
||||
*/
|
||||
captureOutput?: boolean;
|
||||
};
|
||||
export declare type ExecReturn = {
|
||||
/** Exit code of the program. */
|
||||
|
||||
@@ -4302,7 +4302,7 @@ var require_glob = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/index.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/index.ts
|
||||
__export(exports, {
|
||||
ExitCode: () => ExitCode,
|
||||
Parameter: () => Parameter,
|
||||
@@ -4322,10 +4322,10 @@ __export(exports, {
|
||||
var import_chalk4 = __toModule(require_source());
|
||||
var import_module = __toModule(require("module"));
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/package.json
|
||||
var version = "0.9.0";
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/package.json
|
||||
var version = "0.8.1";
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/chdir.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/chdir.ts
|
||||
var import_fs = __toModule(require("fs"));
|
||||
var import_path = __toModule(require("path"));
|
||||
var import_url = __toModule(require("url"));
|
||||
@@ -4347,7 +4347,7 @@ var chdir = (directory, relativeTo) => {
|
||||
process.chdir(directory);
|
||||
};
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/exec.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/exec.ts
|
||||
var import_chalk = __toModule(require_source());
|
||||
var import_child_process = __toModule(require("child_process"));
|
||||
var import_fs2 = __toModule(require("fs"));
|
||||
@@ -4404,31 +4404,25 @@ var exec = (executable, args = [], options = {}) => {
|
||||
if (process.env.JUKE_DEBUG) {
|
||||
console.log(import_chalk.default.grey("$", executable, ...args));
|
||||
}
|
||||
const child = (0, import_child_process.spawn)(executable, args, __spreadValues({
|
||||
stdio: "inherit"
|
||||
}, spawnOptions));
|
||||
const child = (0, import_child_process.spawn)(executable, args, spawnOptions);
|
||||
children.add(child);
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
let combined = "";
|
||||
if (child.stdout) {
|
||||
child.stdout.on("data", (data) => {
|
||||
if (!silent) {
|
||||
process.stdout.write(data);
|
||||
}
|
||||
stdout += data;
|
||||
combined += data;
|
||||
});
|
||||
}
|
||||
if (child.stderr) {
|
||||
child.stderr.on("data", (data) => {
|
||||
if (!silent) {
|
||||
process.stderr.write(data);
|
||||
}
|
||||
stderr += data;
|
||||
combined += data;
|
||||
});
|
||||
}
|
||||
child.stdout.on("data", (data) => {
|
||||
if (!silent) {
|
||||
process.stdout.write(data);
|
||||
}
|
||||
stdout += data;
|
||||
combined += data;
|
||||
});
|
||||
child.stderr.on("data", (data) => {
|
||||
if (!silent) {
|
||||
process.stderr.write(data);
|
||||
}
|
||||
stderr += data;
|
||||
combined += data;
|
||||
});
|
||||
child.on("error", (err) => reject(err));
|
||||
child.on("exit", (code, signal) => {
|
||||
children.delete(child);
|
||||
@@ -4450,7 +4444,7 @@ var exec = (executable, args = [], options = {}) => {
|
||||
});
|
||||
};
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/logger.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/logger.ts
|
||||
var import_chalk2 = __toModule(require_source());
|
||||
var logger = {
|
||||
log: (...args) => {
|
||||
@@ -4475,13 +4469,13 @@ var logger = {
|
||||
}
|
||||
};
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/string.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/string.ts
|
||||
var import_stringcase = __toModule(require_lib());
|
||||
var toKebabCase = (str) => (0, import_stringcase.spinalcase)(str);
|
||||
var toCamelCase = (str) => (0, import_stringcase.camelcase)(str);
|
||||
var toConstCase = (str) => (0, import_stringcase.constcase)(str);
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/parameter.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/parameter.ts
|
||||
var Parameter = class {
|
||||
constructor(config) {
|
||||
this.type = config.type;
|
||||
@@ -4518,11 +4512,11 @@ var Parameter = class {
|
||||
};
|
||||
var createParameter = (config) => new Parameter(config);
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/runner.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/runner.ts
|
||||
var import_chalk3 = __toModule(require_source());
|
||||
var import_events = __toModule(require("events"));
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/argparse.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/argparse.ts
|
||||
var stringToBoolean = (str) => str !== void 0 && str !== null && str !== "false" && str !== "0" && str !== "null";
|
||||
var prepareArgs = (args, singleTarget = false) => {
|
||||
let inGlobalContext = true;
|
||||
@@ -4680,7 +4674,7 @@ var parseArgs = (args, parameters) => {
|
||||
return parameterMap;
|
||||
};
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/fs.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/fs.ts
|
||||
var import_fs3 = __toModule(require("fs"));
|
||||
var import_glob = __toModule(require_glob());
|
||||
var File = class {
|
||||
@@ -4788,7 +4782,7 @@ var rm = (path2, options = {}) => {
|
||||
}
|
||||
};
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/runner.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/runner.ts
|
||||
var runner = new class Runner {
|
||||
constructor() {
|
||||
this.config = {};
|
||||
@@ -5030,7 +5024,7 @@ var Worker = class {
|
||||
}
|
||||
};
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/target.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/target.ts
|
||||
var Target = class {
|
||||
constructor(target) {
|
||||
this.name = target.name;
|
||||
@@ -5044,7 +5038,7 @@ var Target = class {
|
||||
};
|
||||
var createTarget = (config) => new Target(config);
|
||||
|
||||
// pnp:/home/style/Documents/Projects/stylemistake/juke-build/src/index.ts
|
||||
// pnp:/Users/style/Documents/Projects/juke-build/src/index.ts
|
||||
var chalk4 = import_chalk4.default;
|
||||
var lastExitCode = null;
|
||||
var setup = async (config) => {
|
||||
|
||||
Reference in New Issue
Block a user