Skip to content

Conversation

@Ocraftyone
Copy link

  • Port new UI Jobs and related commits from PrusaSlicer

  • Add HttpServer from Orca/BBL and remove BBL specific logic

  • Add OAuthJob

  • Add support for cloud-based print hosts

  • Add SimplyPrint as a print host

Noisyfox and others added 21 commits July 22, 2024 20:55
Note: This does not compile. This is an initial port of the commit.

* Make httpserver more generic and reusable

* Add OAuthJob

* Fix issue caused by the fact that the backing widget of the `TextCtrl` is no longer `wxTextCtrl`

* Implement login and token refresh

* Implement file upload

* Try fix build error

* Support BBL printers

* Show error message if user hasn't done OAuth

* Fix typo

* Update error message

* Disable unsupported options when SimplyPrint is selected

(cherry picked from commit e29bbac)
Co-authored-by: Ocraftyone <[email protected]>
…r#4831)

Note: Does not compile.

* Allow using BBL's device tab when 3rd party print host is used

* Add option to open SimplyPrint panel in device tab after uploading

* Fix default print host for prusa connect

* Do not set api key in device view when SimplyPrint is used

* Sending 3mf file to SimplyPrint when using BBL printers

* Fix file extension when uploading 3mf

* Prepare for large file uploading

* Implement chunk upload

* Fix file uploading exceeding content size

* Fix wrong field type

* Add `temp=true` to all chunk upload calls

* Add macro to enable test api

* Merge branch 'main' into dev/simplyprint-improve

* Fix another missing `temp=true`

* Add delete token

* Try fixing build error on *nix systems

* Merge branch 'main' into dev/simplyprint-improve

* Merge branch 'main' into dev/simplyprint-improve

* Merge remote-tracking branch 'remote/main' into dev/simplyprint-improve

# Conflicts:
#	src/slic3r/GUI/BackgroundSlicingProcess.cpp

* Move the `bbl_use_print_host_webui` option to print host dialog. Also make it a derived option of `print_host_webui` instead.

* Merge branch 'main' into dev/simplyprint-improve

# Conflicts:
#	src/slic3r/GUI/MainFrame.cpp
#	src/slic3r/GUI/Plater.cpp

* Merge branch 'main' into dev/simplyprint-improve

# Conflicts:
#	src/slic3r/GUI/Plater.cpp

* Use a more generic option instead of SimplyPrint specific

* Merge branch 'main' into dev/simplyprint-improve

* Merge branch 'main' into dev/simplyprint-improve

(cherry picked from commit cd6cd07)
Co-authored-by: Ocraftyone <[email protected]>
Cherry-picked commits from prusa3d/PrusaSlicer related to the new system for UI Jobs

Commits included:

Add comments, remove some redundant template fiddling

Also make ThreadSafeQueueSPSC not copyable and non movable

(cherry picked from commit 7975dfa)

Log time for loading fonts

(cherry picked from commit fe90a88)

log as info job processing time

(cherry picked from commit 2d66607)

Fix crash in gcc on Linux

(cherry picked from commit 155b152)

Trying to fix hanging job tests on windows

The issue might be that the worker's m_running flag is not set atomically. It is possible that the finalize message is pushed and is consumed before setting the running flag to false. See the loop in BoostThreadWorker::run

(cherry picked from commit ca824e0)

Fix return value when create job

(cherry picked from commit 95178a2)

Let's not call yield in PlaterWorker

Not worth the risk, needs further investigation

(cherry picked from commit 345ee7c)

Fix PlaterWorker not calling yield from main thread

Also fix UIThreadWorker not setting busy cursor

(cherry picked from commit cf16daf)

Add UIThreadWorker for debugging and profiling purposes

(cherry picked from commit 9892893)

Clarify comments for thread safe queue

Cleanup

(cherry picked from commit 3a1eee0)

Add possibility to wait for current job to stop.

(cherry picked from commit 43f5e61)

Replace std::variant with boost::variant

Unavailable on MacOS < 1.14

(cherry picked from commit 4d0088e)

Rename start_next() to push

PlaterJob refinements

(cherry picked from commit 583c123)

Fix issue with non atomic transition to running state

After popping a job from input queue

(cherry picked from commit 7e070d3)

Avoid issue with invisible status indication.

(cherry picked from commit 17f4b1b)

Make a PlaterWorker to handle PlaterJobs

(cherry picked from commit 3be7d5f)

Prevent accidental stopping of BoostThreadWorker before destruction

(cherry picked from commit a802bdc)

Rework UI jobs to make them more understandable and flexible.

(cherry picked from commit b53ff75)

Co-authored-by: Filip Sykala - NTB T15p <[email protected]>
Co-authored-by: Ocraftyone <[email protected]>
A copy of PlaterWorker.hpp, but it is for any generic wxWindow
Currently, there is no functionality
The version of Boost used by SuperSlicer does not have this type defined
…TextCtrl` is no longer `wxTextCtrl`"

SuperSlicer still uses wxTextCtrl as the sole backing widget of text fields
-Remove BBL specific logic

-Add check for valid request handler on start. With BBL no longer the default, it is possible for a request handler to not be set during development. There is now a check that will throw a RuntimeException if it is not valid.
@supermerill
Copy link
Owner

I didn't have much time rn, maybe next week.

@Ocraftyone
Copy link
Author

I didn't have much time rn, maybe next week.

No worries!

@Ocraftyone
Copy link
Author

Hey @supermerill. Just checking in on this. Do you have any questions?

@AlbertMN
Copy link

Let us know if there's anything we can do on our end to help this get merged :) We have a lot of users eagerly awaiting being able to use this, @supermerill

@AlbertMN
Copy link

@supermerill I know you're a busy man doing this in your free time, so here's the politest of "bumps"! We're still having users ask about the state of this integration every week, and with the code being finished, we and our users would love to see it integrated! :)

@supermerill
Copy link
Owner

Hi

@supermerill I know you're a busy man doing this in your free time, so here's the politest of "bumps"! We're still having users ask about the state of this integration every week, and with the code being finished, we and our users would love to see it integrated! :)

I disconnected myself from github to be more efficient at releasing a workable 2.7 version. There was no point to merging anything before it was finished anyway, why merging a feature if the underlining code is trash? Now I came back.

Trying to merge it rn
I have a roadblock: #include <openssl/sha.h>
I don't have openssl.
I guess it need to be added in the deps to be linked against?

@Ocraftyone
Copy link
Author

Hmm. Did OpenSSL get removed as a dependency? I believe I had everything working when I submitted the PR. Looking at the nightly branch, it looks like it may be the same issue that I had with PrusaSlicer where it wasn't being linked. Here is a link to that commit if you want to attempt adding it (it is a pretty small change). If not, LMK and I can work on it. prusa3d/PrusaSlicer@9386c54 (#13220)

@supermerill
Copy link
Owner

I merged your pr here
https://github.com/supermerill/SuperSlicer/tree/pr4387_SimplyPrint_integration
but I had to comment the sha256b64() of Simplyprint class, as I don't have openssl in my build process.
I looked a bit more, and it seems like linux build may build openssl if linked statically. but windows not, and I don't know about macos.

@Ocraftyone
Copy link
Author

Did you look into the commit I mentioned above?

@supermerill
Copy link
Owner

Sorry, I didn't refresh before posting again, I just saw both post now.
I'll look into it.

@supermerill
Copy link
Owner

Didn't had much time for pull request lately.
i'll do another pass on pull request in some days.

@AlbertMN
Copy link

Hey @supermerill :) Not to rush ya' - just hoping for an update?

@AlbertMN
Copy link

@supermerill any update on this?

@supermerill
Copy link
Owner

hi.
No updates.
Was busy with many more things.
To be transparent, "making an attempt" with dependencies on 4 platforms (mac intel & arm are quite different) is not something very enticing. If it's only 1 hour to check if the build are successful it's okay, but if I need to dedicate 1 full week of vacation to makes it works...
If I cherry pick the commit you link, the github build will complete?

@AlbertMN
Copy link

Totally understandable, @supermerill - we'd be more than happy to pay for your time too if it's a very time-consuming task. I imagine we can't really help with the review part, but if there's any way we can make the process easier for you, do let us know.

As far as we know, it should build and work just fine from our latest commit, and I see no conflicts with the latest commits from the main branch either.

@Ocraftyone
Copy link
Author

@supermerill it seems like master is not an active development branch. what branch are you looking to pick this commit into? I can rebase, test, and open a new PR on that branch so you won't have to handle the merge conflicts.

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.

5 participants