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

mrpack export #904

Merged
merged 50 commits into from Jun 5, 2023
Merged

mrpack export #904

merged 50 commits into from Jun 5, 2023

Conversation

TheKodeToad
Copy link
Member

@TheKodeToad TheKodeToad commented Mar 3, 2023

Preview

image

Stuff

kind of inspired by MultiMC/Launcher#5052, but i didn't take any code i promise

Partially fixes (pls don't close issue github) #269.

TODO:

  • Reuse information from the index (we can't use CurseForge urls though as they are not whitelisted).
  • Abort task!
  • Make it not crash.
  • Make the code good.
  • Use threads properly! (kind of done?)

Fairly important but not critical (probably won't do in this PR):

  • Maybe some persistence in what the user selected. (support the packwiz pack.toml file? or maybe just add a version and summary field to the onesix format.)
  • Side specific files.
  • Optional files. We only know if this is available once the URLs are too.

Future:

  • Uploading to the site automatically.
  • CurseForge export.

I didn't keep my promise :(.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
I don't know whether this is the prefered method.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Copy link
Contributor

@Ryex Ryex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing is immediately jumping out as causing the crash. I can't exactly test it myself atm but cleaning up the code should help narrow down the problem. and you may stop logic errors when you do.

@TheKodeToad
Copy link
Member Author

The lambda stuff was only intended to be temporary, but thanks for the suggestions!

@RaptaG
Copy link
Contributor

RaptaG commented Mar 3, 2023

I want to hug you rn toad

@RaptaG
Copy link
Contributor

RaptaG commented Mar 3, 2023

(One of the) Best PR(s) in Prism

@TheKodeToad
Copy link
Member Author

TheKodeToad commented Mar 3, 2023

The code is bad, and it crashes! How can you say this?
Well, it does work but you have to open it up again.

@RaptaG
Copy link
Contributor

RaptaG commented Mar 3, 2023

It's the idea, the PR itself. It will be complete one day.

@TheKodeToad
Copy link
Member Author

🤞

Even more broken now (it is stuck loading forever)!

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
… crashing!

The shared pointer was going out of scope 🤦.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
@flowln flowln added the enhancement New feature or request label Mar 14, 2023
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
@kosma
Copy link

kosma commented May 6, 2023

I gave this branch a spin, and it seems to export all my mods as overrides, instead of nicely linking to Modrinth downloads in the medatada. Is something broken?

@TheKodeToad
Copy link
Member Author

TheKodeToad commented May 6, 2023

Are the mods unmodified, in the "mods" folder, and do they end with ".jar" or ".jar.disabled"?
(it seems to work for me)

@kosma
Copy link

kosma commented May 7, 2023

MultiMC exports the same pack from the same folder correctly. Using a build from this branch, the entire JSON is just:

{"dependencies":{"fabric-loader":"0.14.19","minecraft":"1.19.4"},"files":[],"formatVersion":1,"game":"minecraft","name":"Kosmopack Prism Export Test","summary":"Possums","versionId":"1.0"}

And all the mod files (*.jar and *.jar.disabled) land in overrides.

The build I'm using is PrismLauncher-Windows-MSVC-Portable-f93bad5-Debug from here: https://github.com/PrismLauncher/PrismLauncher/actions/runs/4861729182

@TheKodeToad
Copy link
Member Author

Could you send an instance zip to reproduce (with nothing personal such as logs of course)?

@kosma
Copy link

kosma commented May 7, 2023

Here's the instance: https://github.com/kosma/kosmopack

@TheKodeToad
Copy link
Member Author

It exports fine for me... weird

TheKodeToad and others added 7 commits May 12, 2023 14:43
Co-authored-by: flow <flowlnlnln@gmail.com>
Signed-off-by: Kode <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: Kode <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: Kode <TheKodeToad@proton.me>
@TheKodeToad
Copy link
Member Author

[almost] Everything should be fixed! tysm for the help

image
it's a bit tall now since #961

Copy link
Contributor

@flowln flowln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a bit tall now since #961

changing both the height and the minimum height of ProgressDialog to 100 seems to fix this.

Those are my last remarks. You did a good job! Thanks for working on this 🙂

launcher/FileIgnoreProxy.cpp Show resolved Hide resolved
launcher/ui/dialogs/ExportMrPackDialog.ui Show resolved Hide resolved
launcher/modplatform/modrinth/ModrinthPackExportTask.cpp Outdated Show resolved Hide resolved
@TheKodeToad
Copy link
Member Author

You're welcome! I don't think I should change the progress dialog.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
@TheKodeToad
Copy link
Member Author

@kosma Mentioning you because you've hopefully unsubscribed from this pr :P

Could you send launcher logs (making sure to remove anything personal such as accent tokens)?

@Ryex
Copy link
Contributor

Ryex commented Jun 4, 2023

Do the latest changes Kode has made solve the speed issue for you @flowln ?
everything is looking good from where I'm standing.

@flowln
Copy link
Contributor

flowln commented Jun 4, 2023

Do the latest changes Kode has made solve the speed issue for you @flowln ?
everything is looking good from where I'm standing.

Yup, looking nice. Thanks @Ryex and @TheKodeToad, great work! :)

@Ryex
Copy link
Contributor

Ryex commented Jun 5, 2023

... @flowln Can I... make this my first merge?

@flowln
Copy link
Contributor

flowln commented Jun 5, 2023

... @flowln Can I... make this my first merge?

Yes! 🙂

@Ryex Ryex merged commit 3dccc38 into PrismLauncher:develop Jun 5, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants