mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
scripts
This commit is contained in:
parent
e1593baabf
commit
e9da652e9a
@ -1,6 +1,11 @@
|
||||
#!/bin/bash
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
if [[ "$(uname)" != "Linux" ]]; then
|
||||
echo Not running Linux
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(lsb_release -d | grep -qEi 'debian|buntu|mint')" ]; then
|
||||
echo Not a supported Linux
|
||||
exit 1
|
||||
|
@ -167,6 +167,9 @@ class _MyAppState extends State<MyApp> with UiLoggy {
|
||||
},
|
||||
onSubmitted: (String v) async {
|
||||
try {
|
||||
if (v.isEmpty) {
|
||||
return;
|
||||
}
|
||||
var res = await Veilid.instance.debug(v);
|
||||
loggy.info(res);
|
||||
setState(() {
|
||||
|
@ -1,6 +1,13 @@
|
||||
#!/bin/bash
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
get_abs_filename() {
|
||||
# $1 : relative filename
|
||||
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
|
||||
}
|
||||
|
||||
pushd $SCRIPTDIR &> /dev/null
|
||||
|
||||
if [ -f /usr/local/opt/llvm/bin/llvm-dwarfdump ]; then
|
||||
@ -15,7 +22,15 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if [[ "$1" == "debug" ]]; then
|
||||
if [[ "$1" == "release" ]]; then
|
||||
OUTPUTDIR=../target/wasm32-unknown-unknown/release/pkg
|
||||
INPUTDIR=../target/wasm32-unknown-unknown/release
|
||||
|
||||
cargo build --target wasm32-unknown-unknown --release
|
||||
mkdir -p $OUTPUTDIR
|
||||
wasm-bindgen --out-dir $OUTPUTDIR --target web --no-typescript $INPUTDIR/veilid_wasm.wasm
|
||||
wasm-strip $OUTPUTDIR/veilid_wasm_bg.wasm
|
||||
else
|
||||
OUTPUTDIR=../target/wasm32-unknown-unknown/debug/pkg
|
||||
INPUTDIR=../target/wasm32-unknown-unknown/debug
|
||||
|
||||
@ -24,14 +39,9 @@ if [[ "$1" == "debug" ]]; then
|
||||
wasm-bindgen --out-dir $OUTPUTDIR --target web --no-typescript --keep-debug --debug $INPUTDIR/veilid_wasm.wasm
|
||||
./wasm-sourcemap.py $OUTPUTDIR/veilid_wasm_bg.wasm -o $OUTPUTDIR/veilid_wasm_bg.wasm.map --dwarfdump $DWARFDUMP
|
||||
# wasm-strip $OUTPUTDIR/veilid_wasm_bg.wasm
|
||||
else
|
||||
OUTPUTDIR=../target/wasm32-unknown-unknown/release/pkg
|
||||
INPUTDIR=../target/wasm32-unknown-unknown/release
|
||||
|
||||
cargo build --target wasm32-unknown-unknown --release
|
||||
mkdir -p $OUTPUTDIR
|
||||
wasm-bindgen --out-dir $OUTPUTDIR --target web --no-typescript $INPUTDIR/veilid_wasm.wasm
|
||||
wasm-strip $OUTPUTDIR/veilid_wasm_bg.wasm
|
||||
fi
|
||||
|
||||
popd &> /dev/null
|
||||
|
||||
# Print for use with scripts
|
||||
echo SUCCESS:OUTPUTDIR=$(get_abs_filename $OUTPUTDIR)
|
Loading…
Reference in New Issue
Block a user