devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Added basic support for Ubuntu Touch

Open GermanAizek opened this issue 2 years ago • 23 comments

Hello everyone, I hope you enjoy adding a new platform. List of (80+) devices that will support building and installation here: https://devices.ubuntu-touch.io/

GermanAizek avatar Mar 23 '22 16:03 GermanAizek

Is there a way to avoid having the mk folder in the root?

AJenbo avatar Mar 23 '22 16:03 AJenbo

Is there a way to avoid having the mk folder in the root?

Ok, I change path mk folder and force push lease.

GermanAizek avatar Mar 23 '22 16:03 GermanAizek

Most other platform files are located in the Packaging folder.

I still have one of the original Ubuntu Phones, but not sure if it works any more.

AJenbo avatar Mar 23 '22 18:03 AJenbo

Most other platform files are located in the Packaging folder.

I still have one of the original Ubuntu Phones, but not sure if it works any more.

@AJenbo I also have devices, porting should not be complicated given that ubuntu-touch the same nix slightly changed to android.

GermanAizek avatar Mar 23 '22 20:03 GermanAizek

@AJenbo Do you already have a similar list of required packages?

"dependencies_target": [
    "libsdl2-dev",
    "libsdl2-image-dev",
    "libsdl2-ttf-dev"
  ],
  "install_lib": [
    "/usr/lib/${ARCH_TRIPLET}/libSDL2.so*",
    "/usr/lib/${ARCH_TRIPLET}/libSDL2-2.0.so*",
    "/usr/lib/${ARCH_TRIPLET}/libSDL2_image.so*",
    "/usr/lib/${ARCH_TRIPLET}/libSDL2_image-2.0.so*",
    "/usr/lib/${ARCH_TRIPLET}/libSDL2_ttf.so*",
    "/usr/lib/${ARCH_TRIPLET}/libSDL2_ttf-2.0.so*"
  ],

GermanAizek avatar Mar 23 '22 20:03 GermanAizek

I don't know, it's the Bq Aquaris E4.5 and came with Ubuntu Touch on it. I haven't used it since Canonical dropped support.

AJenbo avatar Mar 23 '22 20:03 AJenbo

@AJenbo Canonical has long abandoned the project, now it is a large ubports community. You can update the image through GUI installer. Your model does not have active support, but most functions are working.

https://devices.ubuntu-touch.io/device/krillin/

image

GermanAizek avatar Mar 23 '22 20:03 GermanAizek

Ubuntu Touch GUI installer

Linux: https://snapcraft.io/ubports-installer

Ubuntu (deb): https://devices.ubuntu-touch.io/installer/deb

AppImage: https://devices.ubuntu-touch.io/installer/appimage

Windows: https://devices.ubuntu-touch.io/installer/exe

Mac OS: https://devices.ubuntu-touch.io/installer/dmg

GermanAizek avatar Mar 23 '22 20:03 GermanAizek

Gread job. Can't wait for it.

Also would be nice to have some touch controls to it. At least for spells and potions. :)

nitanmarcel avatar May 10 '22 12:05 nitanmarcel

@nitanmarcel where you able to test it? Normally DevilutionX should enable the touch controls when you interact with a touch screen.

AJenbo avatar May 10 '22 13:05 AJenbo

@nitanmarcel where you able to test it? Normally DevilutionX should enable the touch controls when you interact with a touch screen.

If I can figure out how to install it yes. running clickable build complains about no CMakeList.txt being available. Also I tried moving the clickable files to the main folder and it missing a lot of deps.

Again as in previous issue I'm a noob when it comes to these things.

Probably some things needs to be updated in the PR.

nitanmarcel avatar May 10 '22 13:05 nitanmarcel

@nitanmarcel, I have damaged vm with ubuntu touch sdk, ut-clickable and qt creator with components, so I will try to restore the system as soon as possible.

GermanAizek avatar May 10 '22 13:05 GermanAizek

@nitanmarcel where you able to test it? Normally DevilutionX should enable the touch controls when you interact with a touch screen.

ubuntu touch libraries have touch processing capabilities, needed render controls as in android.

GermanAizek avatar May 10 '22 14:05 GermanAizek

@nitanmarcel, I have damaged vm with ubuntu touch sdk, ut-clickable and qt creator with components, so I will try to restore the system as soon as possible.

Awesome. Quote me when ready. Can't wait to try this :)

nitanmarcel avatar May 10 '22 14:05 nitanmarcel

I keep thinking aboutthis PR and it came in my mind something that need to be changed for Ubuntu Touch.

The packaged folder will only be accessible with sudo due to the OS security. There should be a way to point the game files to a path which can be accessed by the packaged app. That would be /home/phablet/.local/share/appname.domainname appname and domain name is defined in the manifest.json.in file

nitanmarcel avatar May 11 '22 11:05 nitanmarcel

On the desktop it uses ~/.local/share/diasurgical/devilution/, I'm assuming this would work on the phone as well since it's basically the same path as you are suggesting

AJenbo avatar May 11 '22 11:05 AJenbo

On the desktop it uses ~/.local/share/diasurgical/devilution/, I'm assuming this would work on the phone as well since it's basically the same path as you are suggesting

If what I commented for manifest.json.in file isn't mandatory the path should work. But looking at the openttd port I'm concerned about it

https://gitlab.com/abmyii/openttd-ubports/-/blob/master/click/manifest.json#L2

nitanmarcel avatar May 11 '22 11:05 nitanmarcel

I decided to give it a try myself and I hit 2 issues.

  • As of now Ubuntu Touch runs on ubuntu xenial and the following packages are not available there: libgmock-dev and libfmt-dev
  • I'm getting Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY) even if libgtest-dev is installed in the clickable docker container

nitanmarcel avatar May 27 '22 17:05 nitanmarcel

@nitanmarcel you can skip building tests by setting BUILD_TESTING=OFF (cmake .. -DBUILD_TESTING=OFF)

AJenbo avatar May 27 '22 19:05 AJenbo

@nitanmarcel you can skip building tests by setting BUILD_TESTING=OFF (cmake .. -DBUILD_TESTING=OFF)

Thanks. Also do you know about this error?

CMake Error at CMake/Dependencies.cmake:6 (dependency_options):
  Unknown CMake command "dependency_options".
Call Stack (most recent call first):
  CMakeLists.txt:201 (include)

nitanmarcel avatar May 28 '22 09:05 nitanmarcel

It's defined here https://github.com/diasurgical/devilutionX/blob/master/CMake/functions/dependency_options.cmake, maybe you need to clear cache?

AJenbo avatar May 28 '22 14:05 AJenbo

@nitanmarcel, I completely restored vm ubuntu image, I see you've moved on 👍 I was confused that ubtouch has 16.04 with old packages. How did you solve problem with old Cmake version in clickable?

GermanAizek avatar Jul 11 '22 15:07 GermanAizek

@nitanmarcel, oh sorry, I forgot that I already asked this question in clickable repo. Here: https://gitlab.com/clickable/clickable/-/issues/346

GermanAizek avatar Jul 11 '22 15:07 GermanAizek