Skip to content

Commit

Permalink
Compatibility for Webassembly
Browse files Browse the repository at this point in the history
* changed all modal dialogs to be non-blocking on wasm
* changed file exports and imports to use getContent variants on wasm
* changed biome image export to archive images as zip on wasm
* reduced the stack size requirements
* replaced quadhut protobase generation with a precomputed resource
* removed wait-for-finish popup when stopping a search (problematic with wasm)
* fixed fonts not matching config default when unmodified
  • Loading branch information
Cubitect committed Feb 24, 2024
1 parent 73f6f97 commit 0683518
Show file tree
Hide file tree
Showing 84 changed files with 756,969 additions and 1,036 deletions.
2 changes: 1 addition & 1 deletion cubiomes
Submodule cubiomes updated 3 files
+2 −5 README.md
+25 −8 quadbase.c
+9 −8 quadbase.h
25 changes: 17 additions & 8 deletions cubiomes-viewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,23 @@ win32: {
} else {
DEFINES += "LUA_USE_POSIX=1"
}

wasm: {
DEFINES += "WASM=1"
#QT_WASM_SOURCE_MAP=1
QT_WASM_INITIAL_MEMORY = 256MB
QT_WASM_PTHREAD_POOL_SIZE = 32
CONFIG(debug, debug|release): {
#QMAKE_CFLAGS += -O3 -gsource-map
}
}
#CONFIG += sanitizer
#CONFIG += sanitize_undefined
#CONFIG += sanitize_thread

static_gnu: {
LIBS += -static -static-libgcc -static-libstdc++
}
sanitizer: {
QMAKE_CFLAGS += -fsanitize=undefined
LIBS += -lubsan -ldl
}

gcc {
greaterThan(QMAKE_GCC_MAJOR_VERSION, 9): QMAKE_CXXFLAGS += -Wno-deprecated-copy
Expand Down Expand Up @@ -112,7 +122,6 @@ SOURCES += \
src/maptoolsdialog.cpp \
src/message.cpp \
src/presetdialog.cpp \
src/protobasedialog.cpp \
src/layerdialog.cpp \
src/mapview.cpp \
src/rangedialog.cpp \
Expand Down Expand Up @@ -177,9 +186,9 @@ HEADERS += \
src/maptoolsdialog.h \
src/message.h \
src/presetdialog.h \
src/protobasedialog.h \
src/layerdialog.h \
src/mapview.h \
src/qzipwriter.h \
src/rangedialog.h \
src/scripts.h \
src/search.h \
Expand All @@ -206,7 +215,6 @@ FORMS += \
src/gotodialog.ui \
src/maptoolsdialog.ui \
src/presetdialog.ui \
src/protobasedialog.ui \
src/layerdialog.ui \
src/mainwindow.ui \
src/rangedialog.ui \
Expand All @@ -218,7 +226,8 @@ RESOURCES += \
rc/icons.qrc \
rc/style.qrc \
rc/examples.qrc \
rc/lang.qrc
rc/lang.qrc \
rc/qh.qrc

# ----- translations (pluralization) -----

Expand Down
32 changes: 32 additions & 0 deletions rc/qh.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<RCC>
<qresource prefix="/">
<file compress-algo="best">qh/1272d</file>
<file compress-algo="best">qh/17908</file>
<file compress-algo="best">qh/367b9</file>
<file compress-algo="best">qh/43f18</file>
<file compress-algo="best">qh/487c9</file>
<file compress-algo="best">qh/487ce</file>
<file compress-algo="best">qh/50aa7</file>
<file compress-algo="best">qh/647b5</file>
<file compress-algo="best">qh/65118</file>
<file compress-algo="best">qh/75618</file>
<file compress-algo="best">qh/79a0a</file>
<file compress-algo="best">qh/89718</file>
<file compress-algo="best">qh/9371a</file>
<file compress-algo="best">qh/967ec</file>
<file compress-algo="best">qh/a3d0a</file>
<file compress-algo="best">qh/a5918</file>
<file compress-algo="best">qh/a591d</file>
<file compress-algo="best">qh/a5a08</file>
<file compress-algo="best">qh/b5e18</file>
<file compress-algo="best">qh/c6749</file>
<file compress-algo="best">qh/c6d9a</file>
<file compress-algo="best">qh/c751a</file>
<file compress-algo="best">qh/d7108</file>
<file compress-algo="best">qh/d717a</file>
<file compress-algo="best">qh/e2739</file>
<file compress-algo="best">qh/e9918</file>
<file compress-algo="best">qh/ee1c4</file>
<file compress-algo="best">qh/f520a</file>
</qresource>
</RCC>
Loading

0 comments on commit 0683518

Please sign in to comment.