Skip to content

Commit

Permalink
build: small fixes
Browse files Browse the repository at this point in the history
 - fixes 'GOROOT' with space in path
 - fixes glob.sync breaking on windows path slash
 - fix makefile color printing

Signed-off-by: jarves <[email protected]>
  • Loading branch information
jarveson committed Aug 21, 2022
1 parent 2c2296b commit f7cbba7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $(OUT_DIR)/bundle/.dirstamp: \
touch $@

$(OUT_DIR)/sim_worker.js: ui/worker/sim_worker.js
cat $(GOROOT)/misc/wasm/wasm_exec.js > $(OUT_DIR)/sim_worker.js
cat '$(GOROOT)/misc/wasm/wasm_exec.js' > $(OUT_DIR)/sim_worker.js
cat ui/worker/sim_worker.js >> $(OUT_DIR)/sim_worker.js

$(OUT_DIR)/net_worker.js: ui/worker/net_worker.js
Expand Down Expand Up @@ -111,9 +111,9 @@ wasm: $(OUT_DIR)/lib.wasm
$(OUT_DIR)/lib.wasm: sim/wasm/* sim/core/proto/api.pb.go $(filter-out sim/core/items/all_items.go, $(call rwildcard,sim,*.go))
@echo "Starting webassembly compile now..."
@if GOOS=js GOARCH=wasm go build -o ./$(OUT_DIR)/lib.wasm ./sim/wasm/; then \
echo "\033[1;32mWASM compile successful.\033[0m"; \
printf "\033[1;32mWASM compile successful.\033[0m\n"; \
else \
echo "\033[1;31mWASM COMPILE FAILED\033[0m"; \
printf "\033[1;31mWASM COMPILE FAILED\033[0m\n"; \
exit 1; \
fi

Expand Down Expand Up @@ -146,9 +146,9 @@ wowsimwotlk: binary_dist devserver
devserver: sim/core/proto/api.pb.go sim/web/main.go binary_dist/dist.go
@echo "Starting server compile now..."
@if go build -o wowsimwotlk ./sim/web/main.go; then \
echo "\033[1;32mBuild Completed Succeessfully\033[0m"; \
printf "\033[1;32mBuild Completed Succeessfully\033[0m\n"; \
else \
echo "\033[1;31mBUILD FAILED\033[0m"; \
printf "\033[1;31mBUILD FAILED\033[0m\n"; \
exit 1; \
fi

Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineConfig(({ command, mode }) => ({
sourcemap: command === "serve" ? "inline" : "false",
target: ["es2020"],
rollupOptions: {
input: glob.sync(path.resolve(__dirname, "ui", "**/index.html")),
input: glob.sync(path.resolve(__dirname, "ui", "**/index.html").replace(/\\/g, "/")),
output: {
assetFileNames: () => "bundle/[name]-[hash].style.css",
entryFileNames: () => "bundle/[name]-[hash].entry.js",
Expand Down

0 comments on commit f7cbba7

Please sign in to comment.