Skip to content

Commit

Permalink
Use a dummy include to indicate TGUI isn't built (tgstation#56470)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss authored Feb 2, 2021
1 parent f389ef9 commit d45477f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,4 @@ tools/LinuxOneShot/TGS_Logs

# Common build tooling
!/tools/build
code/modules/tgui/USE_BUILD_BAT_INSTEAD_OF_DREAM_MAKER.dm
5 changes: 5 additions & 0 deletions code/modules/tgui/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
* SPDX-License-Identifier: MIT
*/

#ifndef SPACEMAN_DMM
// Empty file generated by tgui build. Makes the problem clearer if it hasn't been built.
#include "USE_BUILD_BAT_INSTEAD_OF_DREAM_MAKER.dm"
#endif

/**
* tgui datum (represents a UI).
*/
Expand Down
3 changes: 3 additions & 0 deletions tgui/bin/tgui
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ task-install() {
task-webpack() {
cd "${base_dir}"
yarn run webpack-cli "${@}"
touch "../code/modules/tgui/USE_BUILD_BAT_INSTEAD_OF_DREAM_MAKER.dm"
}

## Runs a development server
Expand Down Expand Up @@ -88,6 +89,8 @@ task-clean() {
## NPM artifacts
rm -rf **/node_modules
rm -f **/package-lock.json
## Dummy DM
rm -f ../code/modules/tgui/USE_BUILD_BAT_INSTEAD_OF_DREAM_MAKER.dm
}

## Installs merge drivers and git hooks
Expand Down
1 change: 1 addition & 0 deletions tgui/bin/tgui_.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function task-install {
## Runs webpack
function task-webpack {
yarn run webpack-cli @Args
New-Item -ItemType file "../code/modules/tgui/USE_BUILD_BAT_INSTEAD_OF_DREAM_MAKER.dm"
}

## Runs a development server
Expand Down
1 change: 1 addition & 0 deletions tools/build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const taskTgui = new Task('tgui')
.provides('tgui/public/tgui-common.bundle.js')
.provides('tgui/public/tgui-panel.bundle.css')
.provides('tgui/public/tgui-panel.bundle.js')
.provides('code/modules/tgui/USE_BUILD_BAT_INSTEAD_OF_DREAM_MAKER.dm')
.build(async () => {
// Instead of calling `tgui/bin/tgui`, we reproduce the whole pipeline
// here for maximum compilation speed.
Expand Down

0 comments on commit d45477f

Please sign in to comment.