openAVproductions / openAV-Luppp

Luppp is a live performance tool, created by OpenAV productions.
http://openavproductions.com/luppp
GNU General Public License v3.0
257 stars 43 forks source link

App Image #237

Closed georgkrause closed 5 years ago

georgkrause commented 6 years ago

Would be great to have an AppImage of Luppp...

georgkrause commented 6 years ago

Obviously, meson is able to generate a "Linux binary", but not a app image. Might work as well.

https://mesonbuild.com/Creating-Linux-binaries.html

probonopd commented 5 years ago

Can I help to make an AppImage?

georgkrause commented 5 years ago

@probonopd I kind of missed your message, help would be really appreciated!

probonopd commented 5 years ago

Can you compile it on Ubuntu trusty or xenial? Once you have that working, I can help to turn it into an AppImage.

georgkrause commented 5 years ago

@probonopd I am actually working currently on a Travis CI build on Xenial. This is nearly finished and could be merged soon. So we can use this build for the App Image. Can this be build on Travis CI also?

georgkrause commented 5 years ago

Travis CI Build is ready here #270

probonopd commented 5 years ago

Cool @georgkrause thank you 👍

Unfortunately I don't know anything about meson. Do you know how to achieve the equivalent of

  - ./configure --prefix=/usr
  - make -j$(nproc)
  - make install DESTDIR=$(readlink -f appdir)

or

  - cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
  - make -j$(nproc)
  - make DESTDIR=appdir -j$(nproc) install

there?

I need the prefix /usr to be compiled in, but the whole things needs to be installed to ./appdir/usr/.

georgkrause commented 5 years ago

This is probably something @harryhaaren knows, if not I need to dig into the configuration tomorrow.

But as far as I know builds with make are still possible besides meson. So the first example could work.

probonopd commented 5 years ago

Can you use make in your PR?

From my experience it is much less hassle to get it to work on older LTS systems than meson (which seems to need python 3 and other very recent dependencies).

georgkrause commented 5 years ago

Honestly spoken I would prefer to stick with meson since this is or at least will be the official method to build Luppp. Since 14.04 will be not supported anymore in a few weeks, 16.04 is the latest LTS and building it works fine.

I will care for your wished settings.

georgkrause commented 5 years ago

@probonopd Done in the PR. Looks like:

 ~/workspace/openAV-Luppp# ls -R builddir/appdir
builddir/appdir:
usr

builddir/appdir/usr:
bin

builddir/appdir/usr/bin:
luppp

Is this as expected?

probonopd commented 5 years ago

OK, let's consider 16.04 as the oldest supported one. Thanks, that meson change looks easy enough and reasonable. 👍

probonopd commented 5 years ago

Working on it, here is my preliminary .travis.yml: https://github.com/probonopd/openAV-Luppp/blob/patch-1/.travis.yml

georgkrause commented 5 years ago

@probonopd Is it already working? Where will the App Image be uploaded to?

georgkrause commented 5 years ago

- DESTDIR=./appdir ninja -C build install ; find ./builddir/appdir

It is in ./build/appdir

probonopd commented 5 years ago

Once the build is working, it should appear on https://github.com/probonopd/openAV-Luppp/releases. Once we have tested it successfully, I will send a pull request to your repository which, in case you merge it, will be amended to your pull request automatically.

probonopd commented 5 years ago

Running into

Desktop file as first argument: "build/appdir/usr/share/applications/*.desktop"
ERROR: Desktop file in first argument does not exist!

Indeed, only the main binary seems to be installed but the desktop file, icon files, and any other files seem to be missing:

[2/2] Installing files.
Installing luppp to ./appdir/usr/bin
./build/appdir
./build/appdir/usr
./build/appdir/usr/bin
./build/appdir/usr/bin/luppp
The command "DESTDIR=./appdir ninja -C build install ; find ./build/appdir" exited with 0.

Can you add them please? Thanks.

georgkrause commented 5 years ago

Once the build is working, it should appear on https://github.com/probonopd/openAV-Luppp/releases. Once we have tested it successfully, I will send a pull request to your repository which, in case you merge it, will be amended to your pull request automatically.

This generally sounds pretty good. What happens to builds of non-release-stuff, like can we build an AppImage of a branch to allow users to test? Besides this, I am not the maintainer here so in the end @harryhaaren needs to decide if something gets merged.

Can you add them please? Thanks.

This leads me to the question what is actually needed. Sure, the desktop file. There is also an luppp.appdata.xml which at least in archlinux belongs to the package and goes to usr/share/appdata/luppp.appdata.xml. I can also create usr/share/pixmaps/luppp.png, if needed (because you mentioned icons). But there is also a config file which usually lives in ~/.config/openAV/luppp/luppp.prfs and gets created on startup. And there are some controller files but they might not be needed in any case.

Another question, since I cannot write to this repository and only can file a PR, should I send one to your patch so you can merge the meson changes?

This is the line which needs to be added to build.meson to install luppp.desktop to the right place:

install_data('resources/metadata/luppp.desktop', install_dir: 'share/applications')

Feel free to copy ;)

georgkrause commented 5 years ago

This installs luppp.desktop, luppp.appdata.xml and luppp.png to the hopefully right places:

install_data('resources/metadata/luppp.desktop', install_dir: 'share/applications')
install_data('resources/metadata/luppp.appdata.xml', install_dir: 'share/appdata')
install_data('resources/icons/luppp.png', install_dir: 'share/pixmaps')
probonopd commented 5 years ago

This generally sounds pretty good. What happens to builds of non-release-stuff, like can we build an AppImage of a branch to allow users to test?

It will build and upload each commit. Not just the released versions.

probonopd commented 5 years ago

Looks like we have an AppImage to test: https://github.com/probonopd/openAV-Luppp/releases

Please have a look at it and let me know whether it is working as intended. Thanks!

georgkrause commented 5 years ago

@probonopd Had a short test, seems to work as expected. I still want to check some details... (like config file creation and controller mappings)

If you file a PR I can review and recommend the merge asap

sub26nico commented 5 years ago

I've tested and it seems to be ok. 'Save' et 'Open' project works nicely, config file is created and once a controller maps had been add, Luppp opens with the good configuration. Changing the bpm while playing is ok too.

georgkrause commented 5 years ago

@probonopd Thanks a lot! Seems to work pretty well. Just one minor thing: It seems like there is only one release with the latest build. Can we somehow have different App-Images, like for each branch? This way we can test each feature Pull Request and have always a current master build for testing. I suppose somehow we need to set the name of the release?

probonopd commented 5 years ago

An AppImage also gets built and uploaded for each (new) pull request (from now on). The transfer.sh download URL is visible in the build log of a pull request.

georgkrause commented 5 years ago

Alright, this should work. I thought it might be possible to have releases like continous-master and continous-testing. But its not needed...

georgkrause commented 5 years ago

@harryhaaren This still needs to get activated on Travis which require admin rights (So I can't do this)

harryhaaren commented 5 years ago

Done, and seems to be working with this test PR : https://github.com/openAVproductions/openAV-Luppp/pull/273

[Edit: if nothing more here needs to be done, I think we can close the issue?]

georgkrause commented 5 years ago

@harryhaaren You need to setup a Github Access Token to allow the upload of the artifacts into Github Releases. Description here: https://github.com/probonopd/uploadtool#usage

harryhaaren commented 5 years ago

@georgkrause OK Done now, the token is in place. How do we test it?

georgkrause commented 5 years ago

I do. ;)

georgkrause commented 5 years ago

@harryhaaren I restarted the release job, so this would upload the App Image for 1.2.1. BTW: I am on IRC if you wanna talk ;)

georgkrause commented 5 years ago

As you can see here, it works: https://github.com/openAVproductions/openAV-Luppp/releases/tag/release-1.2.1