cassia-org / cassiapp

50 stars 13 forks source link

can't build #1

Open xoureldeen opened 3 months ago

xoureldeen commented 3 months ago

how to setup build?

xoureldeen commented 3 months ago

ninja and meson installed Caused by: java.lang.RuntimeException: Ninja failed to build CassiaExt: 127 STDOUT:

STDERR: /bin/bash: line 1: ninja -C build_linux all: command not found

MixedVictor commented 3 months ago

I managed atleast to point the build system to build cassiaext (I see here to build cassiapp, you need to build cassiaext first) using the cassiaext.cfg, which is what probably you need to do here right now. But the bigger problem here is not even cassiapp, but cassiaext. I was trying to build cassiaext using a Arch Linux distrobox, but since there was a nix file that contained the dependencies, I decided instead to create a devcontainer that uses a nix image (you can see it in my cassiaext fork). However, even using a nix image, I had to add some missing dependencies to it (ex: libtool), and even then, cassiaext doesn't really seem compilable. On the Arch Linux distrobox I got some missing dependencies errors even with the packages installed (libdrm is one of then, downloading the wrap file from WrapDB does fix this, but it's not supposed to happen and there are some missing dependencies that isn't available on WrapDB), and on nix I think I am one step back compared to my Arch container since I got stuck on some libtool error, even with it being installed. There is also this invalid -Dstub_session=true argument on cassiaext's main CMakeLists.txt, preventing it to compile. I have absolutely no idea what to do right now to compile all this.

xoureldeen commented 3 months ago

I managed atleast to point the build system to build cassiaext (I see here to build cassiapp, you need to build cassiaext first) using the cassiaext.cfg, which is what probably you need to do here right now. But the bigger problem here is not even cassiapp, but cassiaext. I was trying to build cassiaext using a Arch Linux distrobox, but since there was a nix file that contained the dependencies, I decided instead to create a devcontainer that uses a nix image (you can see it in my cassiaext fork). However, even using a nix image, I had to add some missing dependencies to it (ex: libtool), and even then, cassiaext doesn't really seem compilable. On the Arch Linux distrobox I got some missing dependencies errors even with the packages installed (libdrm is one of then, downloading the wrap file from WrapDB does fix this, but it's not supposed to happen and there are some missing dependencies that isn't available on WrapDB), and on nix I think I am one step back compared to my Arch container since I got stuck on some libtool error, even with it being installed. There is also this invalid -Dstub_session=true argument on cassiaext's main CMakeLists.txt, preventing it to compile. I have absolutely no idea what to do right now to compile all this.

i think we can avoid this cassia-ext by understanding what .kt scripts need like building wine and fex using the patches then compressing it as app needs (totally headache) i just need the x11 bcuz termux-x11 devs are very toxic when i does issue for my fork bcuz the app freaze with no reason when i load cmdentry like termux-x11.deb does but it freazes with no logs, im done with this shit.

rlukas210 commented 3 months ago

I managed atleast to point the build system to build cassiaext (I see here to build cassiapp, you need to build cassiaext first) using the cassiaext.cfg, which is what probably you need to do here right now. But the bigger problem here is not even cassiapp, but cassiaext. I was trying to build cassiaext using a Arch Linux distrobox, but since there was a nix file that contained the dependencies, I decided instead to create a devcontainer that uses a nix image (you can see it in my cassiaext fork). However, even using a nix image, I had to add some missing dependencies to it (ex: libtool), and even then, cassiaext doesn't really seem compilable. On the Arch Linux distrobox I got some missing dependencies errors even with the packages installed (libdrm is one of then, downloading the wrap file from WrapDB does fix this, but it's not supposed to happen and there are some missing dependencies that isn't available on WrapDB), and on nix I think I am one step back compared to my Arch container since I got stuck on some libtool error, even with it being installed. There is also this invalid -Dstub_session=true argument on cassiaext's main CMakeLists.txt, preventing it to compile. I have absolutely no idea what to do right now to compile all this.

hi. i have managed to build cassia-ext using your fork, and had some troubles with gamescope compile errors, but after some trials and error, and a bit of workaround, i was able to build cassia-ext and it have generated an .gz archive, now, how do i use it/integrate into the app?

MixedVictor commented 3 months ago

hi. i have managed to build cassia-ext using your fork, and had some troubles with gamescope compile errors, but after some trials and error, and a bit of workaround, i was able to build cassia-ext and it have generated an .gz archive, now, how do i use it/integrate into the app?

Okay, could you please upload the gz file here or somewhere so I can investigate a bit too? It would be also nice to say how you got it compiled too. We probably need to compile cassiaext using the cassiaext.cfg so the build system does the rest when it finishes compiling cassiaext. Unfortunately this would probably need Android Studio too, since the devcontainers aren't made for GUI apps, I had the idea of using a NixOS virtual machine. I'll probably do an investigation over how to get the build system to accept the gz file without having to compile cassiaext. Meanwhile, I had fixed the libtool errors by merging cassiaruntime's nix file dependencies with the cassiaext's one, however I then got stuck with errors that certain libraries isn't compatible with AArch64 or something like that. (EDIT: turns out the libtool error still persists, the problem is that installing the freetype package was giving errors when compiling the cassiaext's freetype package, this is why it was giving me AArch64 incompatible library errors) Well I guess I am a bit late with that, lol.

rlukas210 commented 3 months ago

hi. i have managed to build cassia-ext using your fork, and had some troubles with gamescope compile errors, but after some trials and error, and a bit of workaround, i was able to build cassia-ext and it have generated an .gz archive, now, how do i use it/integrate into the app?

Okay, could you please upload the gz file here or somewhere so I can investigate a bit too? It would be also nice to say how you got it compiled too. We probably need to compile cassiaext using the cassiaext.cfg so the build system does the rest when it finishes compiling cassiaext. Unfortunately this would probably need Android Studio too, since the devcontainers aren't made for GUI apps, I had the idea of using a NixOS virtual machine. I'll probably do an investigation over how to get the build system to accept the gz file without having to compile cassiaext. Meanwhile, ~I had fixed the libtool errors by merging cassiaruntime's nix file dependencies with the cassiaext's one, however I then got stuck with errors that certain libraries isn't compatible with AArch64 or something like that.~ (EDIT: turns out the libtool error still persists, the problem is that installing the freetype package was giving errors when compiling the cassiaext's freetype package, this is why it was giving me AArch64 incompatible library errors) Well I guess I am a bit late with that, lol.

i have tried importing libdrm into cmake, manually changng the gamescope files, to be able to locate drm headers, and i have removed a lot of code from gamescope hdmi.h, to fix some compile errors. i also didn't have any error related to libtool. i will redo all steps, to ensure everything is fine, and send you as patch or PR, whathever you want. also, i will send the compiled cassiaext file from google drive.

cassiaext prefix: https://drive.google.com/file/d/14EIlGqyw2_p60vKIG-uZuC3054GJM8TG/view?usp=sharing

MixedVictor commented 3 months ago

I DID IT!

I guess all is missing is the cassia runtime. I managed to build doing the following:

For example, my cassiaext.cfg:

/home/mixedvictor/Git/cassiaext/build

The prefix.tar.gz will be inside the build folder.

rlukas210 commented 3 months ago

I DID IT! I guess all is missing is the cassia runtime. I managed to build doing the following:

  • In the build.gradle.kts comment these two lines:
val process3 = ProcessBuilder().command(*shellWrapper, "ninja -C $cassiaExtPath all").start()
if (process3.waitFor() != 0)
     throw RuntimeException("Ninja failed to build CassiaExt: ${process3.exitValue()}\nSTDOUT:\n${process3.inputStream.reader().readText().trim()}\nSTDERR:\n${process3.errorStream.reader().readText().trim()}")
  • Now you'll put the prefix.tar.gz in the folder that is defined in the cassiaext.cfg (if you defined one), and then compile cassiapp on Android Studio

For example, my cassiaext.cfg:

/home/mixedvictor/Git/cassiaext/build

The prefix.tar.gz will be inside the build folder.

Congratulations 👏🏻👏🏻 now let's move on to try to correct the other steps also, you're brazilian? i'm asking due the portuguese time in your phone screen

MixedVictor commented 3 months ago

also, you're brazilian? i'm asking due the portuguese time in your phone screen

Yep.

rlukas210 commented 3 months ago

Yep.

i'm also. do you have dc or telegram?

MixedVictor commented 3 months ago

i'm also. do you have dc or telegram?

I do have DC

rlukas210 commented 3 months ago

I do have DC

so, can we continue on dc? mine is same as github @rlukas210

MixedVictor commented 3 months ago

so, can we continue on dc? mine is same as github @rlukas210

Okay could you send me request? Mine's also the same as github.

xoureldeen commented 3 months ago

I DID IT! I guess all is missing is the cassia runtime. I managed to build doing the following:

  • In the build.gradle.kts comment these two lines:
val process3 = ProcessBuilder().command(*shellWrapper, "ninja -C $cassiaExtPath all").start()
if (process3.waitFor() != 0)
     throw RuntimeException("Ninja failed to build CassiaExt: ${process3.exitValue()}\nSTDOUT:\n${process3.inputStream.reader().readText().trim()}\nSTDERR:\n${process3.errorStream.reader().readText().trim()}")
  • Now you'll put the prefix.tar.gz in the folder that is defined in the cassiaext.cfg (if you defined one), and then compile cassiapp on Android Studio

For example, my cassiaext.cfg:

/home/mixedvictor/Git/cassiaext/build

The prefix.tar.gz will be inside the build folder.

Congratulations 👏🏻👏🏻 now let's move on to try to correct the other steps also, you're brazilian? i'm asking due the portuguese time in your phone screen

Nice guys, can u share the apk and prefix to test?, Tg: xoureldeen Discord: xoureldeen

xoureldeen commented 3 months ago

FATAL EXCEPTION: main Process: cassia.app, PID: 29860 java.lang.RuntimeException: Unable to create application cassia.app.CassiaApplication: java.io.FileNotFoundException: cassiaext.id at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7312) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2337) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:317) at android.app.ActivityThread.main(ActivityThread.java:8501) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878) Caused by: java.io.FileNotFoundException: cassiaext.id at android.content.res.AssetManager.nativeOpenAsset(Native Method) at android.content.res.AssetManager.open(AssetManager.java:910) at android.content.res.AssetManager.open(AssetManager.java:887) at cassia.app.store.CassiaExtStore.(CassiaExtStore.kt:30) at cassia.app.CassiaApplication.onCreate(CassiaApplication.kt:34) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1379) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7307) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2337)  at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loopOnce(Looper.java:232)  at android.os.Looper.loop(Looper.java:317)  at android.app.ActivityThread.main(ActivityThread.java:8501)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878) 

MixedVictor commented 3 months ago

Me and @rlukas210 have managed to make cassiaext and cassia-runtime sucessfully compile. You can see in my forks that I have automated the compilation with a build.sh shell file. @xoureldeen I have built an APK for you, however, I haven't managed to create a working runtime for cassia yet (you need the runtime to create the prefix), but you can try compiling for yourself on my cassia-runtime repo. You can download the APK here: https://gofile.io/d/9Qt8GD (will expire in 10 days)

xoureldeen commented 3 months ago

Me and @rlukas210 have managed to make cassiaext and cassia-runtime sucessfully compile. You can see in my forks that I have automated the compilation with a build.sh shell file. @xoureldeen I have built an APK for you, however, I haven't managed to create a working runtime for cassia yet (you need the runtime to create the prefix), but you can try compiling for yourself on my cassia-runtime repo. You can download the APK here: https://gofile.io/d/9Qt8GD (will expire in 10 days)

image

where shuld i get and put prefix and runtime

MixedVictor commented 3 months ago

where shuld i get and put prefix and runtime

To create the prefix, you'll need a runtime, and as I said, I haven't got the runtime to work yet. You would put the runtime folder inside the runtimes folder here: