Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Best development environment for Moode?
#1
So I am slowly thinking of trying to start messing with the Moode source code..

I have been looking at this Volumio Fusion (CamillaDSP) plugin and could be tempted to try and adopt it into Moode: https://github.com/volumio/volumio-plugi...ter/fusion

Having skimmed the Master Development Guide, it looks like an extra, dedicated Raspberry Pi is needed for development and implementation.

So what is the best/recommended setup?  

Would it be buying the "large" Raspberry Pi 4 (8Gb) with a large SD, and use it as my sole development environment for Moode ?

Or is it better to use my PC for development, and then implement on the Rasp Py?

Best regards
Jens
Reply
#2
I use an iMac for building the sources using the Gulp toolset and a clone of the "moode" repo. 

From from a target moOde Pi I mount a Samba share on my iMac named "Software" that corresponds to ~Documents/Software/ below. The mount is actually //iMac/Software/moode-player to /mnt/moode-player.

Code:
lt5user@LT5 moode % sudo node_modules/.bin/gulp build && sudo node_modules/.bin/gulp deploy --test
Password:
[09:42:53] Using gulpfile ~/Documents/Software/moode-player/GitHub/moode/gulpfile.js
[09:42:53] Starting 'build'...
[09:42:53] Starting 'sass'...
[09:42:53] Finished 'sass' after 1.05 ms
[09:42:53] Starting 'genindexdev'...
[09:42:53] Finished 'genindexdev' after 149 ms
[09:42:53] Starting 'genindex'...
[09:42:53] Finished 'genindex' after 161 ms
[09:42:53] Starting 'bundle'...
[09:42:53] Starting 'cache'...
[09:42:53] Finished 'cache' after 250 ms
[09:42:53] Starting 'maps'...
[09:42:53] Finished 'maps' after 87 ms
[09:42:53] Starting '<anonymous>'...
[09:42:54] index.html 11 kB
[09:42:54] css/main.min.css 1.44 kB
[09:42:54] css/styles.min.css 226 kB
[09:42:54] js/config.min.js 19.2 kB
[09:42:54] js/main.min.js 128 kB
[09:42:55] js/lib.min.js 557 kB
[09:42:55] all files 943 kB
[09:42:55] Finished '<anonymous>' after 1.33 s
[09:42:55] Finished 'bundle' after 1.67 s
[09:42:55] Starting 'artwork'...
[09:42:55] Finished 'artwork' after 4.4 ms
[09:42:55] Starting '<anonymous>'...
[09:42:55] Finished '<anonymous>' after 566 μs
[09:42:55] Finished 'build' after 1.99 s
[09:42:56] Using gulpfile ~/Documents/Software/moode-player/GitHub/moode/gulpfile.js
[09:42:56] Starting 'deploy'...
[09:42:56] Starting 'deployfront'...
[09:42:56] Finished 'deployfront' after 362 ms
[09:42:56] Starting 'deployback'...
[09:42:56] Starting 'patchheader'...
[09:42:56] header.php 11.8 kB
[09:42:56] Finished 'patchheader' after 118 ms
[09:42:56] Starting 'patchfooter'...
[09:42:56] footer.min.php 8 kB
[09:42:56] Finished 'patchfooter' after 176 ms
[09:42:56] Starting 'patchindex'...
[09:42:56] Finished 'patchindex' after 5.9 ms
[09:42:56] Starting 'patchconfigs'...
[09:42:57] net-config.php 11.3 kB
[09:42:57] Finished 'patchconfigs' after 32 ms
[09:42:57] Starting 'minifyhtml'...
[09:42:57] indextpl.min.html 135 kB
[09:42:57] Finished 'minifyhtml' after 159 ms
[09:42:57] Starting '<anonymous>'...
[09:42:57] Finished '<anonymous>' after 710 ms
[09:42:57] Finished 'deployback' after 1.2 s
[09:42:57] Starting '<anonymous>'...
[09:42:57] Finished '<anonymous>' after 250 μs
[09:42:57] Finished 'deploy' after 1.57 s
lt5user@LT5 moode %

Then after a Gulp build I can install the updated sources on a moOde Pi via the commands below. 

Code:
# Purge and Reload /var/www/
sudo ./devutl.sh -m (NOTE: This is a script that does the mount to my iMac)

sudo find /var/www/* -delete
sudo cp -r /mnt/moode-player/GitHub/moode/build/dist/var/www/* /var/www/
sudo cp /mnt/moode-player/GitHub/moode/usr/local/bin/moodeutl /usr/local/bin/
sudo chmod -R 0755 /var/www/

THEME_NAME=$(moodeutl -q "SELECT value FROM cfg_system WHERE param='themename'")
THEME_COLOR=$(moodeutl -q "SELECT bg_color FROM cfg_theme WHERE theme_name='$THEME_NAME'")
sudo sed -i '/<meta name="theme-color" content=/c\ \t<meta name="theme-color" content="rgb($THEME_COLOR)">' /var/www/header.php

sudo reboot
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(05-20-2022, 10:37 PM)Tim Curtis Wrote: I use an iMac for building the sources using the Gulp toolset and a clone of the "moode" repo. 

From from a target moOde Pi I mount a Samba share on my iMac named "Software" that corresponds to ~Documents/Software/ below. The mount is actually //iMac/Software/moode-player to /mnt/moode-player.

So you only use the iMac for editing, and then run the code on the rasp pi?

Do you find the rasp pi too slow for editing, or are the editing tools better on the iMac?

/Jens
Reply
#4
Correct. The IDE I use on the Mac is Atom editor plus GitHub Desktop. Its easier to do code editing, Gulp builds and Git tasks on my iMac because I also use it for everything else (mail, messaging, browsing, image editing, etc...). Other dev's are using VS Code IDE and command line Git on Windows.

The task that has to be done on a Pi, actually two Pi's, one 32-bit and the other 64-bit RaspiOS, is to generate the 32-bit and 64-bit release ISO images. These Pi's should be 3B+ or 4B and the image gen's will take around 1 hour. Also Debian package builds and uploads to Cloudsmith repo are done on a Pi.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
I’m a hacker and tester rather than a hardcore developer but I use tools comparable to Tim’s on my Linux laptop and/or desktop and have exercised the whole development chain. Works great.

There’s no technical reason these tools couldn’t be used in Raspberry Pi OS on a Pi —- but I’d choose a Pi4 with at least 2GB (preferably 4GB or more) of memory. Fortunately I already have spare boards on hand since Pi’s have become as scarce as hens teeth locally and online.

These days I have Windows 10 running only as a virtual machine. It wouldn’t be my first choice for a development platform anyway. OTOH, the Windows Subsystem for Linux keeps getting better and better.

Finally, I’ve occasionally cross-compiled various programs on my x86 boxes with the Raspberry Pi ARM as target. This includes building the entire kernel in less than an hour. Horsepower makes a difference! I’ve never tried building the moOde ISO this way but ….

I’ve also tried emulating a Pi-like machine on an x86 host so I could execute the resulting ARM code but never got to a useable result.

Party on!

Regards,
Kent
Reply
#6
Thanks for your great answers!
/Jens
Reply
#7
Every developer will have its own preference concerning a development environment.

The one I prefer:
  1. A network share from central file server with a linux friendly file system (like NFS).
  2. The share is mounted on the several test targets (either multiple physical, or sd switched after reboot).
  3. Use Visual Code on my host (Win, Linux or Mac) and let it use the VC remote server for development on the target (Pi).
    (for example see article like https://www.raspberrypi.com/news/coding-...udio-code/).
  4. Use the gulp deploy command to go from a source tree to test environment

In this way you will have optimal rich editor performance, while havinge the code, repo and execute commands on the pi.
A pi 4 with will be more then enough 4GB.

Volumio Fusion generates from several template parts a new camilladsp configuration, so it will not require any deep integration into moOde.
That' why you could consider the following suggestion for implementing Volumio Fusion for moOde:
  • Make it a standalone web applications or integrate it in the already existing web gui from CamillaDSP it self.

Among others this has the following benefits:
  1. Befor testing, you can develop it initially on whatever your host is.
  2. You can use a more modern toolchain (like with CamillaDSP gui python backend and react frontend).
  3. More people will benefit from it, because you can use it on every platform where CamillaDSP runs.
  4. No deep integration required into the moode code tree, which eases maintenance.
Reply
#8
(05-22-2022, 08:09 AM)bitlab Wrote: Every developer will have its own preference concerning a development environment.

The one I prefer:
  1. A network share from central file server with a linux friendly file system (like NFS).
  2. The share is mounted on the several test targets (either multiple physical, or sd switched after reboot).
  3. Use Visual Code on my host (Win, Linux or Mac) and let it use the VC remote server for development on the target (Pi).
    (for example see article like https://www.raspberrypi.com/news/coding-...udio-code/).
  4. Use the gulp deploy command to go from a source tree to test environment

In this way you will have optimal rich editor performance, while havinge the code, repo and execute commands on the pi.
A pi 4 with will be more then enough 4GB.

Yes, I think it will be something like this I will be aiming for.

Quote:Volumio Fusion generates from several template parts a new camilladsp configuration, so it will not require any deep integration into moOde.
That' why you could consider the following suggestion for implementing Volumio Fusion for moOde:
  • Make it a standalone web applications or integrate it in the already existing web gui from CamillaDSP it self.

Among others this has the following benefits:
  1. Befor testing, you can develop it initially on whatever your host is.
  2. You can use a more modern toolchain (like with CamillaDSP gui python backend and react frontend).
  3. More people will benefit from it, because you can use it on every platform where CamillaDSP runs.
  4. No deep integration required into the moode code tree, which eases maintenance.

Thanks, that is a good approach. Actually it could be something to propose to the maintainer instead of trying to do myself :-)  
(There are other things in Moode I could have fun trying out).

/Jens
Reply


Forum Jump: