💾 Archived View for thebackupbox.net › ~epoch › blog › veilid-10 captured on 2024-12-17 at 10:11:12. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-07-09)

-=-=-=-=-=-=-

veilidchat again

based on

https://gitlab.com/veilid/veilidchat/-/issues/18

I figured I should see what "flutter run" does.

turns out it builds a debug version and runs it on a phone if it is plugged in.

Before I actually got it built though, there were handfuls of errors and filled disks.

The veilid documentation says something about setting the PATH to include a few dirs I didn't have by the time I thought I had everything I needed.

export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools

for some reason I didn't have a tools or a tools/bin dir, and just set it to the platform-tools dir.

the setup_linux.sh was looking for ${ANDROID_HOME}/emulator which I did not have after skimming directions.

I figured I needed to do something like this:

sdkmanager --install emulator

and then it stopped complaining.

since I cleaned up all the android stuff I had laying around to all inside ~/android, and studio in ~/android/studio

I had to update flutter's config:

flutter config --android-studio-dir /home/epoch/android/studio

if you try to remove and rerun android-studio make sure there isn't an old version of the process hiding in the background.

that bit me once.

one odd bug was something that appeared to be based on the assumption of a capital A and capital S in Android/Sdk in a path.

[CXX1410] /home/epoch/projects/veilid/veilid-flutter/android/.cxx/Debug/3t5i6sc1/arm64-v8a/android_gradle_build.json debug|arm64-v8a : expected buildTargetsCommandComponents command '/home/epoch/Android/Sdk/cmake/3.22.1/bin/ninja' to exist

was able to work around this by symlinking Android to android and Sdk to sdk like:

cd ~
ln -s android Android
cd Android
ln -s sdk Sdk

Not sure whose fault it is for those two capital letters.

so got it built and running on android. plugged my phone in with a USB cable and ran

then did I tried

flutter install

and it installed the built app to my phone so I could run it untethered.

unplugged the phone and ran `flutter run` again

and this time it built the desktop linux version I guess because it didn't see a phone.

so, I guess to get veilidchat to run, cd to the project dir and do flutter run.

um. for some reason flutter install doesn't seem to do anything on linux anymore.

to get the android sdk and studio stuff setup right, I deleted all the old copies I could find and downloaded new versions into ~/android.

found out that cmdline-tools has to have dumb stuff done to it so sdkmanager can find out what is going on.

so before you extact cmdline-tools.zip

mkdir ~/android/sdk/cmdline-tools
cd ~/android/sdk/cmdline-tools
mv ~/Downloads/cmdline-tools.zip .
unzip cmdline-tools.zip
mv cmdline-tools.zip latest

not exactly sure who thought that was a good idea, but whatever.

found that on some stackoverflow..

this answer

after getting it running on both my desktop and phone at the same time I ofc had to try to get one talking to the other

this failed I expect because they're on different subnets of my local network, and switching the phone to cellphone internet didn't seem to help either.

found out I can get log output and command prompt that appears the same as veilid-cli's by long-pressing on some signal-bars inside of the app's settings.

this works on both desktop and android, so I assume all other platforms too.

I think that's all of the important stuff. and probably some of the not important stuff.

last post was kind of short because I wasn't brain dumping to #veilid on libera like I was doing previously and for this post.

though this one doesn't have a pretty picture.

I guess I'll get this post POSSE'd out to the fediverse and antenna now.

https://indieweb.org/POSSE

<- this is the activitypub actor URI you'd follow.

gemini://warmedal.se/~antenna/