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

Support building with MSVC #19

Merged
merged 1 commit into from
Jan 2, 2023
Merged

Support building with MSVC #19

merged 1 commit into from
Jan 2, 2023

Conversation

DomClark
Copy link
Member

@DomClark DomClark commented Nov 4, 2022

See also LMMS/lmms#6561.

This pull request mostly consists of routine transformations from POSIX APIs to the C++ standard library, along with _alloca alternatives for variable-length stack arrays. In order to keep things easy to review, and maybe pull in other upstream changes, I haven't tried to improve the code by using things such as RAII lock guards (except where required, i.e. in conjunction with a condition variable). As an exception, I took the opportunity to support Unicode paths in a few places by using wide character functions on Windows.

@JohannesLorenz
Copy link
Contributor

👍

Many parts of this PR might not be applied to current zyn's master (e.g. some variables do not occur there, and we meanwhile also have the STACKALLOC macro for stack allocation), but a few could (e.g. the mkdir changes). Are you going to push those parts that can be applied to zyn's master, too?

@DomClark
Copy link
Member Author

DomClark commented Nov 5, 2022

Are you going to push those parts that can be applied to zyn's master, too?

This is something I definitely plan to do eventually, especially since we plan on updating our Zyn version and presumably still want to be able to build everything with MSVC. Right now, this is mostly for personal convenience as I'm working on our remote plugin IPC interface and want to be able to test my changes with Zyn more easily.

@PhysSong PhysSong self-requested a review November 11, 2022 01:35
@PhysSong
Copy link
Member

In a second look, I noticed that ThreadShims.h is outside this repository. Is it safe to do such a thing?

@PhysSong
Copy link
Member

Oh, We already do that for IoHelper.h.

@DomClark
Copy link
Member Author

Yeah, it's not ideal, but I needed it in the LMMS repository too, and didn't want to duplicate it. As you say, we already do the same for IoHelper.h, and hopefully we can get rid of it soon once we can use a MinGW version with built-in support.

@DomClark DomClark merged commit 551e816 into LMMS:master Jan 2, 2023
@DomClark DomClark deleted the msvc branch January 2, 2023 23:14
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