Skip to content

Commit

Permalink
dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
chucksellick committed Mar 4, 2025
1 parent 57c45af commit 61d1173
Show file tree
Hide file tree
Showing 7 changed files with 585 additions and 12 deletions.
11 changes: 6 additions & 5 deletions crawl-ref/source/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ CFWARN_L += -Wextra \
DEFINES := $(EXTERNAL_DEFINES)

ifndef ANDROID
LDFLAGS := -sLEGACY_GL_EMULATION -sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=1gb -lworkerfs.js
LDFLAGS := -sLEGACY_GL_EMULATION -sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=1gb -lworkerfs.js -sMAX_WEBGL_VERSION=2 -sGL_UNSAFE_OPTS=0
endif

#
Expand Down Expand Up @@ -333,7 +333,8 @@ all: greet check-fonts $(GAME) docs webserver

# XX these are set wrong on mac cross-compiling
LIBPCRE := contrib/install/$(ARCH)/lib/libpcre.a
LIBSDL2 :=
# LIBSDL2 :=
LIBSDL2 := contrib/sdl/build/libSDL2.a
# LIBSDL2 := contrib/install/$(ARCH)/lib/libSDL2.a
LIBPNG := contrib/install/$(ARCH)/lib/libpng.a
LIBSDL2IMAGE :=
Expand Down Expand Up @@ -527,7 +528,7 @@ export HOSTCC
else
# GCC := emcc -pthread -sSHARED_MEMORY -sWASM_WORKERS=1 -sUSE_ZLIB=1 -sUSE_FREETYPE=1 -sUSE_SDL_IMAGE=2
# GCC := emcc -pthread -sSHARED_MEMORY=1 -sWASM_WORKERS=1 -sUSE_ZLIB=1 -sUSE_SDL=2 -sUSE_SDL_IMAGE=2 -sUSE_FREETYPE=1
GCC := emcc -O3 -pthread -sSHARED_MEMORY=1 -sUSE_ZLIB=1 -sUSE_SDL=2 -sUSE_SDL_IMAGE=2 -sUSE_FREETYPE=1
GCC := emcc -O3 -pthread -sSHARED_MEMORY=1 -sUSE_ZLIB=1 -sUSE_SDL_IMAGE=2 -sUSE_FREETYPE=1
# GCC := $(LMACH)$(GCC_VER_PREFIX)emcc$(GCC_VER_SUFFIX)
endif

Expand All @@ -538,7 +539,7 @@ export HOSTCXX
else
# GXX := em++ -pthread -sSHARED_MEMORY -sWASM_WORKERS=1 -sUSE_ZLIB=1 -sUSE_FREETYPE=1 -sUSE_SDL_IMAGE=2
# GXX := em++ -pthread -sSHARED_MEMORY=1 -sWASM_WORKERS=1 -sUSE_ZLIB=1 -sUSE_SDL=2 -sUSE_SDL_IMAGE=2 -sUSE_FREETYPE=1
GXX := em++ -O3 -pthread -sSHARED_MEMORY=1 -sUSE_ZLIB=1 -sUSE_SDL=2 -sUSE_SDL_IMAGE=2 -sUSE_FREETYPE=1
GXX := em++ -O3 -pthread -sSHARED_MEMORY=1 -sUSE_ZLIB=1 -sUSE_SDL_IMAGE=2 -sUSE_FREETYPE=1
# GXX := $(LMACH)$(GCC_VER_PREFIX)em++$(GCC_VER_SUFFIX)
endif

Expand Down Expand Up @@ -1682,7 +1683,7 @@ distclean: clean clean-contrib clean-rltiles
$(RM) -r $(DOXYGEN_HTML_GEN)

$(GAME): $(GAME_OBJS) $(CONTRIB_LIBS) dat/dlua/tags.lua
+$(QUIET_LINK)$(CXX) $(LDFLAGS) $(GAME_OBJS) -o $(GAME).html $(LIBS) --preload-file dat/des --preload-file dat/tiles --preload-file dat/clua --preload-file dat/dlua --use-preload-plugins
+$(QUIET_LINK)$(CXX) $(LDFLAGS) $(GAME_OBJS) -o $(GAME).html $(LIBS) --preload-file dat --use-preload-plugins

util/monster/vault_monster_data.h: dat/des util/gather_mons
util/gather_mons -v > $@
Expand Down
2 changes: 0 additions & 2 deletions crawl-ref/source/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ dist-ssr
*.njsproj
*.sln
*.sw?

public/crawl.*
14 changes: 11 additions & 3 deletions crawl-ref/source/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crawl-ref/source/web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "crawl",
"private": true,
"version": "0.0.0",
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -10,6 +10,7 @@
},
"devDependencies": {
"typescript": "~5.7.2",
"vite": "^6.2.0"
"vite": "^6.2.0",
"vite-plugin-cross-origin-isolation": "^0.1.6"
}
}
Loading

0 comments on commit 61d1173

Please sign in to comment.