From 21a456b1b88fba81788b3e22e0b0a2ad65e6b6ae Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Tue, 12 Sep 2023 17:59:07 +0000 Subject: [PATCH] Update SigScript to include C++20 and custom params Co-authored-by: sigonasr2 --- C++/scripts/md5 | 2 +- C++/scripts/web.sh | 6 +++--- sig | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/C++/scripts/md5 b/C++/scripts/md5 index 7b5b28a..8d5b624 100644 --- a/C++/scripts/md5 +++ b/C++/scripts/md5 @@ -4,4 +4,4 @@ debug.sh:8125f303032b6cbc137223df63d10096 - lines.sh:3b907786f7fc9204025993016c9080de - release.sh:b1ce8461a303e8e7aa9ed74259db3873 - temp:d41d8cd98f00b204e9800998ecf8427e - -web.sh:e196c0bb38ff4cd9428b4a4e56f500a9 - +web.sh:cd3b8a99e208244dee7576bc23c0dc80 - diff --git a/C++/scripts/web.sh b/C++/scripts/web.sh index b575188..1097efb 100755 --- a/C++/scripts/web.sh +++ b/C++/scripts/web.sh @@ -12,12 +12,12 @@ source ../emsdk/emsdk_env.sh if [ ! -f "pixelGameEngine_wasm.o" ] then printf "Pixel Game Engine compile object missing. Compiling for the first time..." - em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -c pixelGameEngine.cpp -o pixelGameEngine_wasm.o + em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -c pixelGameEngine.cpp -o pixelGameEngine_wasm.o fi if [ -d "assets" ]; then - em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html --preload-file ./assets + em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html --preload-file ./assets else - em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html + em++ -std=c++20 -O2 ${EMSCRIPTEN_CUSTOM_PARAMS} -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html fi cp buildtemplate.html ${PROJECT_NAME}.html diff --git a/sig b/sig index b29b259..67932c6 100755 --- a/sig +++ b/sig @@ -4,6 +4,7 @@ source utils/define.sh define PROJECT_NAME "C++ProjectTemplate" define CUSTOM_PARAMS "-std=c++17 -lX11 -lGL -lpthread -lpng -lstdc++fs -I/usr/include/lua5.3" +define EMSCRIPTEN_CUSTOM_PARAMS "" define LANGUAGE "C++" source utils/main.sh