Skip to content

Added ability to use system zlib#2355

Merged
samsinsane merged 1 commit intopremake:masterfrom
LORgames:ssurtees/zlibOptions
Dec 6, 2024
Merged

Added ability to use system zlib#2355
samsinsane merged 1 commit intopremake:masterfrom
LORgames:ssurtees/zlibOptions

Conversation

@samsinsane
Copy link
Member

What does this PR do?

This PR introduces the --zlib-src option which deprecates --no-zlib (for backwards compatibility), this new option allows users to pick between:

  • none, replaces --no-zlib
  • contrib, default and what is currently used
  • system, the system library

How does this PR change Premake's behavior?

Users can still build with --no-zlib but it will warn and prompt users to migrate to --zlib-src=none.

The core focus of this PR was to allow users to build Premake with their system zlib instead.

Anything else we should know?

Due to spaces in PREMAKE_OPTS some minor changes to Bootstrap.sh were needed to avoid errors.

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

end
filter { "options:zlib-src=system" }
links { "zip", "z" }
filter {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
filter {}

There is another filter just after.

Copy link
Member

Choose a reason for hiding this comment

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

(Maybe?) Hot take: I like having filters closed after, before opening up another.

Copy link
Contributor

Choose a reason for hiding this comment

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

Consistency with other
either

filter A
-- ..
filter {}
filter B
-- ..
filter {}
filter C
-- ..
filter {}
filter D
-- ..
filter{}

or

filter A
-- ..
filter B
-- ..
filter C
-- ..
filter D
-- ..
filter{}

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, let's get it consistent first :)

Copy link
Member Author

Choose a reason for hiding this comment

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

FWIW, I went for consistency with the block below which required the filter{}. My goal for both blocks was to reduce the changes as much as possible. I was intending to follow up all these changes with another PR to cleanup this up and the premake5.lua scripts in general (if there's anything else to clean up).

I can fix it now if you guys would prefer?

Copy link
Member

Choose a reason for hiding this comment

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

If we go for a cleanup PR after, I'm happy either way.

@samsinsane samsinsane force-pushed the ssurtees/zlibOptions branch from e8a898d to 33f231a Compare December 6, 2024 02:04
@samsinsane samsinsane merged commit 9d22801 into premake:master Dec 6, 2024
@samsinsane samsinsane deleted the ssurtees/zlibOptions branch December 6, 2024 02:58
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.

4 participants