Skip to content

[UNTESTED] Static linking on binaries #1

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

Closed
wants to merge 2 commits into from
Closed

[UNTESTED] Static linking on binaries #1

wants to merge 2 commits into from

Conversation

alessiodam
Copy link
Contributor

PR Description:

Prevent Missing OpenSSL Libraries on Windows/Linux (Non-dev Instances)

This PR modifies the build process to generate statically linked binaries for Windows and Linux. By including OpenSSL in the build and disabling dynamic linking, this ensures that the application can run smoothly on non-dev machines without requiring additional OpenSSL libraries or dependencies.

Note: This change is currently untested as I do not have access to the CI environment.

@DecDuck
Copy link
Contributor

DecDuck commented Oct 8, 2024

I'll pull and test on my CI/CD in a few hours to see the delta in bundle size. It's currently around 12-14MB, and shouldn't grow too much from there (anything new will be code and small assets).

You should be able to test the builds by using gitlab-ci-local. If that all passes, I don't mind fixing environment specific issues on my end.

By the way, the Windows build environment automatically configures OpenSSL to be statically linked via the OPENSSL_STATIC=1 flag. I've tested the Windows binary on a fresh system and it's working fine. If you get a chance, can you confirm that your changes have the same effect as the OpenSSL specific one, and if not, add it to the CI/CD environment? I'd prefer to keep all the configuration in one place.

DecDuck
DecDuck previously requested changes Oct 8, 2024
@DecDuck DecDuck dismissed their stale review October 9, 2024 02:10

It's not strictly necessary

@DecDuck
Copy link
Contributor

DecDuck commented Oct 9, 2024

@alessiodam
Copy link
Contributor Author

I will be testing it later today and update this comment with an update ;) thanks!

@quexeky
Copy link
Contributor

quexeky commented Oct 21, 2024

@alessiodam any update?

@alessiodam
Copy link
Contributor Author

Nope, I still have no idea why it didn't work for him.
I switched to Ubuntu 24.04 desktop and I'm more than happy.

@quexeky
Copy link
Contributor

quexeky commented Oct 21, 2024

I'll take a look in about an hour. I'll give you an update then and see if I can merge and close this

@DecDuck
Copy link
Contributor

DecDuck commented Oct 21, 2024

As per my above comment, OpenSSL is already statically linked. I don't think this does anything?

@quexeky
Copy link
Contributor

quexeky commented Oct 21, 2024

Just taking a look at it, I don't think that we'd be able to do this in any case. Apparently this is a missing feature in rust that specifically isn't being supported in the current roadmap for the language (Rust Issue 83481). I'll include the release optimisations though because those are good points

@quexeky
Copy link
Contributor

quexeky commented Oct 21, 2024

Merged. Closing this now because I don't see a way to get this to work.

@quexeky quexeky closed this Oct 21, 2024
DecDuck pushed a commit that referenced this pull request Oct 31, 2024
#1). Needs tests when actual functions are implemented
DecDuck pushed a commit that referenced this pull request Oct 31, 2024
DecDuck pushed a commit that referenced this pull request Oct 31, 2024
… in gameID, GameVersion, and maxThreads from FE (#1)
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.

3 participants