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

MSVC build environment. #2085

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9567b29
Fixes MSVC build environment
kdschlosser Jan 17, 2022
d4041c3
Adds additional bash.exe source.
kdschlosser Jan 17, 2022
16d65de
Adds dependency link for comtypes.
kdschlosser Jan 18, 2022
fb47e01
Fixes issue with BSTR not being the proper size on x86
kdschlosser Jan 18, 2022
6151ae0
moves comtypes install to devel.txt
kdschlosser Jan 18, 2022
72bd325
Trying to solve issue with BSTR
kdschlosser Jan 18, 2022
1933e23
fixes exception catching for GetDisplayName
kdschlosser Jan 18, 2022
4fa55bb
fixes GetDescription and GetDisplayName
kdschlosser Jan 18, 2022
087c2d4
Removes dependence on comtypes
kdschlosser Jan 25, 2022
cb7eb70
Fixes some environment settings
kdschlosser Jan 25, 2022
8c637d8
adds debugging output for msvc environment
kdschlosser Jan 26, 2022
938cc84
fixes path in msvc environment
kdschlosser Jan 26, 2022
868f158
Speeds up Windows build
kdschlosser Jan 26, 2022
dc6edc1
fixes msvc environment path so the already stet path is added to the …
kdschlosser Jan 26, 2022
e88f175
See if this fixes the missing include folder.
kdschlosser Jan 26, 2022
c4c805b
sets the msvc environment into a global so it doesn't get run more th…
kdschlosser Jan 26, 2022
519196e
Hopefully I have it fixed now!!
kdschlosser Jan 26, 2022
ad4aa60
Fixes formatting error
kdschlosser Jan 26, 2022
a61ef61
Fixes Windows ninja compilation
kdschlosser Jan 29, 2022
0be5301
Fixes issue with WSL and removes use of CMAKE and Ninja
kdschlosser Aug 1, 2022
af5ecbe
adds doing a complete build in setup.py
kdschlosser Aug 1, 2022
a5e4390
adds pyproject.toml
kdschlosser Aug 1, 2022
cfe21f9
removes msvc from buildtools and grabs pyMSVC from pypi
kdschlosser Aug 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions buildtools/build_wxwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,24 @@ def main(wxDir, args):
"CPPFLAGS=/I%s" %
os.path.join(os.environ.get("CAIRO_ROOT", ""), 'include\\cairo'))

if options.jom:
nmakeCommand = 'jom.exe'

if options.no_dpi_aware:
args.append("USE_DPI_AWARE_MANIFEST=0")

if options.jom:
nmakeCommand = 'jom.exe'
else:
from . import msvc
environment = msvc.setup_environment(minimum_c_version=14.2)

if (
environment.visual_c.has_cmake and
environment.visual_c.has_ninja
):
args.pop(0)
for i, arg in enumerate(args[:]):
args[i] = '-D' + arg
buildDir = wxRootDir
nmakeCommand = 'cmake.exe'

wxBuilder = builder.MSVCBuilder(commandName=nmakeCommand)

Expand Down Expand Up @@ -511,10 +523,18 @@ def main(wxDir, args):
if options.extra_make:
args.append(options.extra_make)

if not sys.platform.startswith("win"):
if sys.platform.startswith("win"):
if nmakeCommand.startswith('cmake'):
Copy link
Contributor

Choose a reason for hiding this comment

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

can do:

if sys.platform.startswith("win") and nmakeCommand.startswith('cmake'):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I cannot.

    if sys.platform.startswith("win"):
        if nmakeCommand.startswith('cmake'):
            args.insert(0, '-GNinja')
    else:
        args.append("--jobs=" + options.jobs)

because if cmake or ninja is not available then cmake.exe doesn't get set to the nmake command so if the platform is windows we do not want to ad a --jobs to the nmake.exe command bcause it doesn't support this switch.

args.insert(0, '-GNinja')
else:
args.append("--jobs=" + options.jobs)

exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building")

if sys.platform.startswith("win") and nmakeCommand.startswith('cmake'):
wxBuilder = builder.MSVCBuilder(commandName='ninja.exe')
exitIfError(wxBuilder.build(dir=buildDir, options=['-j ' + options.jobs]), "Error building")

if options.install:
extra=None
if installDir:
Expand Down