Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Commit

Permalink
client: Remove stub C++ client
Browse files Browse the repository at this point in the history
  • Loading branch information
bakape committed Apr 27, 2019
1 parent 17cc740 commit b4b605f
Show file tree
Hide file tree
Showing 88 changed files with 42 additions and 8,671 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

15 changes: 1 addition & 14 deletions Makefile
Expand Up @@ -22,19 +22,6 @@ client: client_vendor
client_deps:
npm install --progress false --depth 0

wasm:
mkdir -p www/wasm
$(MAKE) -C client_cpp
rm -f www/wasm/main.*
cp client_cpp/*.wasm client_cpp/*.js www/wasm
ifeq ($(DEBUG),1)
cp client_cpp/*.wast client_cpp/*.wasm.map www/wasm
endif

wasm_clean:
$(MAKE) -C client_cpp clean
rm -f www/wasm/*.js www/wasm/*.wasm www/wasm/*.map www/wasm/*.wast

watch:
$(gulp) -w

Expand All @@ -55,7 +42,7 @@ server:
client_clean:
rm -rf www/js www/css/*.css www/css/maps node_modules

clean: client_clean wasm_clean
clean: client_clean
rm -rf .build .ffmpeg .package target meguca-*.zip meguca-*.tar.xz meguca meguca.exe server/pkg
ifeq ($(is_windows), true)
rm -rf /.meguca_build *.dll
Expand Down
9 changes: 0 additions & 9 deletions README.md
Expand Up @@ -71,12 +71,3 @@ the client
detection and Dockerized test suites, respectively
* To run server unit tests (unless Dockerized) add database creation rights to
your PostgreSQL role

### C++ client
For developing the new C++ client

* Run `git submodule update --init --recursive`
* Install [Emscripten](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html)
* Ensure Emscripten environment variables by running `source emsdk_env.sh` in your shell
* Use `DEBUG=1 make wasm` and `make wasm_clean` to compile the C++ client and clean build directories
* To use the C++ client for meguca add the `?wasm=true` query string to the end of the URL
39 changes: 21 additions & 18 deletions clientScripts/loader.js
Expand Up @@ -111,8 +111,10 @@
window.crypto.subtle = window.crypto.webkitSubtle;
}

var wasm = /[\?&]wasm=true/.test(location.search),
head = document.getElementsByTagName('head')[0];
// TODO: Uncomment for WASM client rewrite
// var wasm = /[\?&]wasm=true/.test(location.search);

var head = document.getElementsByTagName('head')[0];

if (polyfills.length) {
for (i = 0; i < polyfills.length; i++) {
Expand Down Expand Up @@ -167,22 +169,23 @@
Array.prototype[Symbol.iterator];
}

if (wasm) {
window.Module = {};
fetch("/assets/wasm/main.wasm").then(function (res) {
return res.arrayBuffer();
}).then(function (bytes) {
// TODO: Parallel downloads of main.js and main.wasm
var script = document.createElement('script');
script.src = "/assets/wasm/main.js";
Module.wasmBinary = bytes;
document.head.appendChild(script);
});
} else {
loadScript("js/main").onload = function () {
require("main");
};
}
// TODO: Uncomment for WASM client rewrite
// if (wasm) {
// window.Module = {};
// fetch("/assets/wasm/main.wasm").then(function (res) {
// return res.arrayBuffer();
// }).then(function (bytes) {
// // TODO: Parallel downloads of main.js and main.wasm
// var script = document.createElement('script');
// script.src = "/assets/wasm/main.js";
// Module.wasmBinary = bytes;
// document.head.appendChild(script);
// });
// } else {
loadScript("js/main").onload = function () {
require("main");
};
// }

if ('serviceWorker' in navigator && (
location.protocol === "https:" ||
Expand Down
35 changes: 0 additions & 35 deletions client_cpp/Makefile

This file was deleted.

16 changes: 0 additions & 16 deletions client_cpp/brunhild/Makefile

This file was deleted.

108 changes: 0 additions & 108 deletions client_cpp/brunhild/events.cc

This file was deleted.

23 changes: 0 additions & 23 deletions client_cpp/brunhild/events.hh

This file was deleted.

11 changes: 0 additions & 11 deletions client_cpp/brunhild/init.cc

This file was deleted.

6 changes: 0 additions & 6 deletions client_cpp/brunhild/init.hh

This file was deleted.

0 comments on commit b4b605f

Please sign in to comment.