Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak build #4175

Open
wants to merge 69 commits into
base: main
Choose a base branch
from
Open

Flatpak build #4175

wants to merge 69 commits into from

Conversation

powpingdone
Copy link
Contributor

This is here so that I can link #3949 and #1670, along with testing the CI. THIS IS NOT FINISHED, AT ALL.

(imho it's really hard to find external work to show what's going on in an issue so I'm linking it here)

@powpingdone
Copy link
Contributor Author

Flatpak build is ready, but I need to fix CI and add a CI job for flatpak.

@anarsoul
Copy link

@powpingdone it looks like github CI VM doesn't get enough free disk space to build a flatpak. Maybe it's time to ask help from flatpak experts?

@powpingdone
Copy link
Contributor Author

I'm trying one last thing before that.

@powpingdone
Copy link
Contributor Author

@SoftFever could you please approve the workflow so I can continue testing?

@SoftFever
Copy link
Owner

@SoftFever could you please approve the workflow so I can continue testing?

It should build automatically now. I temporarily disabled CI/CD this morning as I was fixing a build error. Let me know if it still has issues.

@powpingdone
Copy link
Contributor Author

Alright, @SoftFever . It's ready. Took way too damn long but it's ready for review and merging. From here, because of the unique setup, after this is merged (and begins building bundles) I'll get in contact with the Flathub admins so that automated upload keys can be given. You'll be given a secret API key which will be used in the CI.

@powpingdone powpingdone marked this pull request as ready for review May 14, 2024 21:46
@powpingdone powpingdone changed the title WIP: Flatpak build Flatpak build May 14, 2024
@buzzhuzz
Copy link
Contributor

Looking at the changes within this PR I'd suggest to split it into several phases:

  1. Compilation fixes: all the cpp and hpp files within src directory
  2. *.cmake changes within deps
  3. root CMakeLists.txt
  4. actual Flatpak support

That'll make review of the changes and validation easier

@SoftFever
Copy link
Owner

@powpingdone
Thank you so much for your incredible work.
I will start reviewing the changes!

@cochcoder
Copy link
Contributor

cochcoder commented May 19, 2024

Should the included images be updated for the redesign that yw4z made and some other changes that were added?

@powpingdone
Copy link
Contributor Author

@cochcoder What updated design? The cube navigator?

@cochcoder
Copy link
Contributor

@cochcoder What updated design? The cube navigator?

The #4368 was a redesign of all of the icons in Orca Slicer while #5239 changed the color scheme in some areas (G-Code viewer, Bed plate, etc.).

@powpingdone
Copy link
Contributor Author

Ah, I had not noticed. Oops. Anyways, up to Softfever.

@Alaric323
Copy link

I'm testing out the artifact generated above. Can slice and send to a Bambu printer without issue! A few issues exist that are probably unrelated to the Flatpak itself, such as being unable to preview an X1 camera feed due to the "system player missing", which I've seen as a general Linux issue.

@rehashedsalt
Copy link

rehashedsalt commented May 21, 2024

such as being unable to preview an X1 camera feed due to the "system player missing", which I've seen as a general Linux issue.

Just grabbed the flatpak myself to test and was able to replicate. My X1C camera works under Bambu Studio's flatpak but not under this one. Using x1plus 1.1 in LAN mode.

image

Everything else seems to work fine though. There a way for me to provide some helpful logs? STDOUT and the log dir in config/OrcaSlicer/log didn't have anything useful.

I wouldn't consider this a blocker for merging though. Could always iron out this particular bug later.

@SoftFever
Copy link
Owner

@powpingdone
I noticed you have modified the CMake files, especially for dependencies. Are these changes absolutely needed for the Flatpak? If they are not, can we revert them (and other unrelated CMake changes in the source as well)? It’s better to focus on one feature in one PR so it will be easier to troubleshoot in the future.

@powpingdone
Copy link
Contributor Author

powpingdone commented May 22, 2024

They are required to make the Flatpak (CI) work, mostly because of size constraints and for installing into /app. Just reverted a few lines that were unnecessary.

@powpingdone
Copy link
Contributor Author

powpingdone commented May 22, 2024

@SoftFever The CMake changes can be put into a list:

  • Boost dep resolution refactoring, because the previous method was causing resolution issues during building on CI.
  • Compressing debug info in GCC, for the future. Previously, this was another CI size issue, but we're not (currently) bundling debug info as part of the build. So, in the future, this flag will be used because all it does is space savings.
  • Unbinding $DESTDIR from <dir>/usr/local, because it's installing into /app. The path stays the same on non-flatpak builds (it appends /usr/local), but is changed for Flatpak builds. This is mostly the reason why I touched all the deps, because it effects everything.
  • Removing deps' build files after the build. Github CI has a limit of about 15GB of disk space (I don't remember the exact amount), and was making builds just outright fail, so I put that hack in to reduce disk usage.
  • Using the bundled flatpak image deps, which comes provided by flathub for all applications. CI forced my hand. While it does bundle a newer version of OpenSSL that is incompatible with 1.1, this is easily rectified by checking the version.
  • Patching TBB to not build with LTO. I don't have an explanation for this one, but the Flatpak doesn't build without it.
  • Building wxwidgets in the flatpak manifest (not technically a cmake issue). CI forced my hand again, so I chucked it here so that it could be adequately cleaned up.
  • Force linking slic3r GUI to webkit2gtk and X11, because somehow that linker flag got dropped.

@powpingdone
Copy link
Contributor Author

@Alaric323 @rehashedsalt unfortunately I don't have any bambu lab printer to test with so once this is merged, I'll need some help debugging this particular dep issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet