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

Added VS2022 project files. #732

Closed
wants to merge 3 commits into from
Closed

Conversation

AraHaan
Copy link
Contributor

@AraHaan AraHaan commented Oct 24, 2022

Also replaced Itanium with ARM and ARM64 configurations. Itanium can be added back by those who do have it's build tools fully installed for it (or copied back from the vc14 directory manually).

cc: @madler

contrib/vstudio/readme.txt Outdated Show resolved Hide resolved
Also replaced Itanium with ARM and ARM64 configurations. Itanium can be added back by those who do have it's build tools fully installed for it (or copied back from the vc14 directory manually).
@AraHaan
Copy link
Contributor Author

AraHaan commented Oct 25, 2022

~~Also this might be a little delayed, I plan to also add a separate workflow to github actions meant to build zlib in windows, linux, and macos (cross compile for every OS) in just 3 jobs, store the results in artifacts, then a last job that then downloads the artifacts and generates a nuget package to zlib (officially) on every tag added to the repository so that way people using .NET can simply reference the nuget package and get the binaries for all of the major OS's they use. Completed.
Because for me on my code depending on someone to install zlib1g might give them the wrong version, likewise, running brew install zlib might give them the wrong version as well with no way to go back (because they scrub the version from the formulae). That is not the end of the problem when it comes to Windows users as well because there is no package manager and prebuilt libraries are too old (1.2.3 and not 1.2.13). As such I feel a nuget package for those using .NET Core is more practical.

note: the nuget packaging step would be as simple as:
dotnet pack -c Release ./contrib/nuget/nuget.sln and will generate: madler.zlib.redist.<version>.nupkg

@AraHaan
Copy link
Contributor Author

AraHaan commented Oct 25, 2022

It works on building nuget a nuget package for Windows at the moment.

@AraHaan
Copy link
Contributor Author

AraHaan commented Oct 26, 2022

It seems that I cant get ./configure to work on WSL to allow me to cross compile zlib on x64 to x86, x64, arm, and arm64.

@AraHaan
Copy link
Contributor Author

AraHaan commented Oct 26, 2022

image
image

@AraHaan
Copy link
Contributor Author

AraHaan commented Oct 26, 2022

I can test it on my mac when and if I get a chance to recharge it.

DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
Copy link
Contributor Author

@AraHaan AraHaan Oct 27, 2022

Choose a reason for hiding this comment

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

This will require that @madler or the other contributor (owner) to create a nuget.org account (if one does not already exist) and an api key and add it to their github secrets that github actions can then read.

@AraHaan
Copy link
Contributor Author

AraHaan commented Oct 27, 2022

Alright I think this should be ready to merge.

@Neustradamus
Copy link

To follow :)

@AraHaan
Copy link
Contributor Author

AraHaan commented Oct 27, 2022

image
And for MacOS I fixed the compile on (tested it on my macbook pro 2015)

@AraHaan
Copy link
Contributor Author

AraHaan commented Oct 27, 2022

image
The packages work on Windows, linux, and osx without issues.

@AraHaan
Copy link
Contributor Author

AraHaan commented Jun 23, 2023

So far, I see the changes in this pull request still works when I use them in my experimental zlib implementation that calls into the native library without issues. Infact, I think I have improved code that would normally use .NET System.IO.Compression in a way that allows the developer more control over what they want zlib to do (e.g. create deflate/zlib/gzip streams and any of the compression levels they want to use (because with my code they have access to them all unlike .NET's implementation)).

@AraHaan
Copy link
Contributor Author

AraHaan commented Aug 18, 2023

@madler mind reviewing this?

@madler madler changed the base branch from master to develop August 18, 2023 19:21
@madler
Copy link
Owner

madler commented Aug 18, 2023

I tried applying this before the 1.3 release earlier today, but it ran into a conflict. (Despite the "no conflicts" note below.) I think there was an issue with carriage returns.

@madler
Copy link
Owner

madler commented Aug 18, 2023

I checked, and it's only on the changes to contrib/vstudio/readme.txt. That file does consistently have carriage returns, so it seems like it should work, but it does not. Perhaps for now separate out the changes to that file to a different pull request, and I can retry what remains.

@madler
Copy link
Owner

madler commented Aug 18, 2023

Perhaps I should purge the carriage returns from all of the contrib/vstudio files. Does Visual Studio need them?

@AraHaan
Copy link
Contributor Author

AraHaan commented Aug 19, 2023

Perhaps I should purge the carriage returns from all of the contrib/vstudio files. Does Visual Studio need them?

Visual Studio has a habit of mixing newlines yes, perhaps the best option would be to mark those files specifically as CRLF.

@madler
Copy link
Owner

madler commented Aug 19, 2023

My question is: if I remove all of the carriage returns from any Visual Studio files that have them, will they still work ok?

@AraHaan
Copy link
Contributor Author

AraHaan commented Aug 19, 2023

My question is: if I remove all of the carriage returns from any Visual Studio files that have them, will they still work ok?

I think so, it's just that when edited when they become CRLF again.

@madler
Copy link
Owner

madler commented Aug 19, 2023

Ok. I removed the carriage returns from readme.txt, as well as from the patch, and I was able to apply it.

@madler madler closed this Aug 19, 2023
@AraHaan AraHaan deleted the vs2022-projects branch August 19, 2023 20:53
@AraHaan
Copy link
Contributor Author

AraHaan commented Aug 19, 2023

@madler You might want to carefully look at the version numbers in the vc17 folder and also change the vc143 references in the nuget.csproj to vc17 as well so nuget packaging would work.

hint: it says v1.2.13 on those files.

@madler
Copy link
Owner

madler commented Aug 20, 2023

Corrected. Thanks.

@yumetodo
Copy link

@Neustradamus
I couldn't catch the reason I was mentioned in this PR. What can I do for this PR which is already closed?

@Neustradamus
Copy link

@yumetodo: VS2022 has been added and VS2017/VS2019 are not yet added.
Previously, you have participated in this repository about VS2017 here: #243 :)

@AraHaan
Copy link
Contributor Author

AraHaan commented Aug 20, 2023

There will need to be some changes to the vc14 files I think to match the arch changes from here as some cleanup.

@AraHaan
Copy link
Contributor Author

AraHaan commented Aug 20, 2023

Also the contrib/nuget files is another place where version of zlib is stored and would need updates too, along with there is a missing .github/workflows/nuget.yml file (probably because of missing nuget api key?)

@madler
Copy link
Owner

madler commented Aug 20, 2023

Fixed version and date. I elected to not include the new workflow.

@Mr-Clam
Copy link

Mr-Clam commented Aug 21, 2023

Regarding the line endings: can you configure git to handle this for you? If you add the specific files to a .gitattibutes file in the root folder with their text type and EOL handling, git on Windows will convert the endings to CRLF on checkout and back to LF when committing. There's even an example for *.vcproj files in the documentation: https://www.git-scm.com/docs/gitattributes

@Neustradamus
Copy link

Neustradamus commented Jan 19, 2024

Merged commit:

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