Commit Graph

75 Commits

Author SHA1 Message Date
Ray Molenkamp
3eb9b4dfbc Windows: make.bat change python detection order
Given we are officially on 3.10 now, look
for that version first, followed by any future
version before falling back to 3.9
2022-04-29 10:13:01 -06:00
Brecht Van Lommel
f130d4f211 Cleanup: fix various typos
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D14203
2022-03-07 17:28:39 +01:00
Ray Molenkamp
1edf520439 Windows: Retire MSVC 2017 support
The lower bar for building blender
is now MSVC 2019 16.9.16.
2022-01-26 17:56:38 -07:00
Ray Molenkamp
f26c36c96b make.bat: unify python detection
Several sub commands tried on their own
to locate python, given I wanted to look
in several locations for a broader libdir
compatibility this is best done in a
central location.

Python 3.9 is still preferred, but if
3.10-3.12 are available that be accepted
as well.

note: this is about the python version
make.bat uses to run various python helper
scripts, this change has no influence on
the python version blender itself uses.
2022-01-25 09:19:03 -07:00
Ray Molenkamp
99a2a73706 win/make.bat: Add svnfix convenience target
SVN seems to die randomly *a lot* during
large updates for some users, and I'm no
closer to finding out why that keeps happening.

"The internet" seems to imply some AV vendors
may be at fault here but nothing conclusive.

The solution however is repeatedly running
`svn cleanup`and `svn update` in the library
folder to repair the corruption and finish the
update.

This change adds a small convenience helper
to automate the repair.

This is done inside the make.bat code rather
than the shared python based update code, since
python lives in the library folder and may
or may not exist when this corruption occurs.
2021-10-26 17:48:16 -06:00
Ray Molenkamp
fd560ef2af Windows: Fix finding python for build helpers
It was still looking for the 3.7 folder
rather than 3.9
2021-10-21 07:36:21 -06:00
Antonio Vazquez
bd79d6067c make.bat: Fix missing quotes in python detection 2021-09-06 17:58:38 +02:00
Aaron Carlisle
d245782b80 Windows: Add support to compile python api docs from make file
This adds support to compile the html python api docs from the command line by running `make doc_py` matching support between windows and unix.

This patch also makes it so the compiler is not needed if you set the `blender_bin` variable, this affects icon generation as well.

In the future, I want to move away from generating the build output in the build directory but that can come in a later change.

Reviewed By: LazyDodo

Differential Revision: https://developer.blender.org/D12144
2021-08-06 13:55:14 -04:00
Ray Molenkamp
1def985d78 Windows: Add icons and icons_geom to make.bat
This adds support for building the icons from make.bat
unlike bash there is no passing environment variables
on the command line.

The scripts go out of their way to locate both blender
and inkscape however if they are not found, the user is
given a helpful error message telling them how to set
the variables.

Although some extra help can be given there, if your
normal build is a 2019 full build running

`make 2019 full icons`

will help it find the blender executable as well.

finally if you know the name of your build folder
running

`make builddir build_windows_Lite_x64_vc16_Release icons`

will also work, if all fails you can point directly to
the blender executable by running

`set BLENDER_BIN=c:\where\blender\lives\blender.exe`

before running `make icons` or `make icons_geom`

The python scripts needed some small modifications since
without the PATHEXT, SystemRoot and SystemDrive
environment variables python will not initialize properly
on windows. (Not blender related, even mainline python
won't start without those)
2021-08-04 19:32:24 -06:00
Ray Molenkamp
d5e91ae883 make.bat: Update detection order of MSVC
VS2019 is the preferred version to use these
days, look for it before looking for 2017
and 2022.
2021-07-09 15:17:05 -06:00
Ray Molenkamp
d443dcc733 Build/Windows: Preliminary VS 2022 support.
This adds preliminary VS 2022 support, since
there currently is no CMake version that
supports the VS2022 IDE only ninja support
was tested.

IDE support should work without any additional
changes as soon as an updated CMake becomes
available.

As VS2022 appears to keep binary compatibility
with earlier MSVC versions, the current SVN
libraries will work for this version.
2021-06-21 18:11:30 -06:00
Ray Molenkamp
f9eaf93d37 MSVC: ASAN support for VS 16.9
This enables ASAN support when used with VS 16.9
enable as usual in cmake with the WITH_COMPILER_ASAN
option, or when using make.bat just tag on `asan'
to the invocation, ie: `make lite 2019 asan`

MSVC: Asan support for 16.9

This enables ASAN support when used with VS 16.9
enable as usual in cmake with the WITH_COMPILER_ASAN
option, or when using make.bat just tag on `asan'
to the invocation, ie: `make lite 2019 asan`

Differential Revision: https://developer.blender.org/D7794
Reviewed By: brecht, sergey
2021-03-29 19:11:17 -06:00
Ray Molenkamp
83c872085d Windows/Ninja: allow parameters for rebuild.cmd
The windows build leaves a convenience helper script
in the build folder called, rebuild.cmd. This change
passes any parameters you give rebuild.cmd to ninja
so you can easily pass it additional parameters without
having to edit the batch file manually.
2020-11-30 08:22:50 -07:00
Ray Molenkamp
55a2682348 Windows: Add sccache support.
sccache [1] is one of the few ccache like solutions that will
work on windows.

sccache support can be enabled with the `WITH_WINDOWS_SCCACHE`
cmake option however it will only will work with ninja as the
build system, msbuild is not supported currently.

Advanced option, developes are expected to obtain and configure
sccache on their own.

```
Full build no cache 1428.90s (100.00%)
Full build cached    434.34s ( 30.40%)
```

[1] https://github.com/mozilla/sccache

Reviewed By: nicholas_rishel, Brecht

Differential Revision: https://developer.blender.org/D7466
2020-04-20 12:51:43 -06:00
Ray Molenkamp
0062813c73 make.bat: Improve messaging when not detecting MSVC
Inspired by @mrwhite in D7295
2020-03-31 13:14:16 -06:00
Ray Molenkamp
8e8fdf875d Windows/Cleanup: Remove VS2015 support from make.bat
VS2015 has not been supported for a while now but make.bat
still had some support for it.
2020-03-24 14:48:23 -06:00
Brecht Van Lommel
2be14e0ec4 Fix typo in make.bat help for build directory 2020-03-19 15:31:21 +01:00
Ray Molenkamp
a9b184bbc4 windows: Add some more verbose logging to make.bat 2020-02-20 10:34:15 -07:00
Ray Molenkamp
94c8bbec9c Windows: Improve rebuild.cmd
Previously the MSVC environment was setup every time using vcvarsall.bat
when you ran you ran rebuild.cmd, Generally not an issue but after many
rebuilds on the same console, it grows the path environment variable
beyond what is supported and building breaks.

This patch adds a check to see if the environment is setup already
and skips the call to vcvarsall.bat

Also cleans up the double build in the msbuild's version of rebuild.cmd
install.vcxproj will build all that is needed, so no need to do a regular
build first.
2020-02-08 17:14:47 -07:00
Ray Molenkamp
a67aa11b12 Windows: Switch to the dynamic C runtime
This change switches windows to the dynamic C runtime
avoiding issues coming from mixing the static and dynamic
runtime like the ones outlined in [1]

[1] https://developer.blender.org/D5387#122165

Differential Revision: https://developer.blender.org/D6175

Reviewed by: @Sergey
2019-11-08 09:01:00 -07:00
Ray Molenkamp
3c32c5c2dd make.bat: Warn user about missing svn.exe 2019-10-31 09:45:56 -06:00
Ray Molenkamp
34bd23dbb7 MSVC: Support Building clang+ninja+VS2019
1) Clang was given the wrong VS version to emulate when used in
combination with VS2019 causing build issues.

2) The erroneous supplied parameter `-std::c++11`caused CMake to
fail running its compiler detection scripts.
2019-10-01 12:36:11 -06:00
Ray Molenkamp
7d09c943f6 make.bat: Fix rebuilds with custom build directory.
When calling make.bat multiple times to rebuild blender
make.bat failed to rebuild if a custom build dir was set.

reported and fixed on chat by @dgsantana
2019-09-25 07:17:06 -06:00
6472662d66 Build: add "make test" command for Windows, output log file
Differential Revision: https://developer.blender.org/D5715
2019-09-12 20:23:03 +02:00
4f92725283 Fix buildbot unsuccessfully trying to update Blender repository for branches 2019-09-03 18:01:57 +02:00
e218d8c24b Build: integrate make_update.py into Windows make.bat 2019-08-30 17:57:18 +02:00
Lazydodo
fc0f47e349 make.bat: Support running python from lib folder for make format
We are no longer depended on a system python being installed.
2019-08-13 17:03:09 -06:00
Lazydodo
64b092974c Cleanup/windows: Remove 32 bit support from make.bat helper script
This change removes 32 bit support from the helper make.bat scripts
as we are dropping official 32 bit support, you can still build for
32 bit by configuring your build yourself using cmake and pointing
the LIBDIR cmake variable to your own 32 bit library folder.
2019-08-05 10:31:51 -06:00
2d60a54649 Build: add config for developers
This has faster builds, error checks and tests. The number of cmake options
for this type of thing has grown over the years and it's convenient to be
able to point new developers to a single target.

Previously the combination of all these options did not work correctly, now
all tests should pass.

The easiest way to use this is with the make wrapper, for example:
make full developer debug

Or set it manually with CMake:
cmake -C ../blender/build_files/cmake/config/blender_developer.cmake .

Differential Revision: https://developer.blender.org/D5149
2019-08-05 15:25:36 +02:00
Lazydodo
9198ff4306 Cleanup/Win: Fix build folder name if no target is set
When you call make.bat without a target the build folder name would
have a double underscore in it which looked odd.
2019-08-02 08:25:18 -06:00
Lazydodo
8936479f76 Cleanup/Win: Remove unused game engine variables in build helper scripts 2019-08-02 08:19:04 -06:00
Ray Molenkamp
fb4ec706cd make.bat: Support optional paths for make format
make.bat now supports optional parameters to restrict
the formatting to a specific folder. Multiple paths
may be given

example:
make.bat format source/blender/blenkernel source/blender/gpu
2019-06-05 07:30:45 -06:00
Ray Molenkamp
079c7f918c Cleanup: make.bat remove noge option from help
The noge option has been removed but was still
shown in the help text.
2019-06-01 16:51:31 -06:00
Ray Molenkamp
893467a8e2 make.bat: Add convenience option to disable buildinfo
Optional parameter nobuildinfo turns WITH_BUILDINFO Off
which is helpful when doing development.
2019-06-01 16:49:21 -06:00
Ray Molenkamp
db3f3d4d23 make.bat: Add option to only update sources from git.
SVN takes a long time to sync even if there are no updates,
the `code_update` parameter gives the option opt out of the
SVN updates.

This is a developer option, people just wanting to build
blender and not do any development are highly recommended
to keep using the `update` method.
2019-05-18 10:34:33 -06:00
Ray Molenkamp
164fafdcb0 make.bat: add option for enabling the OpenGL based tests. 2019-05-13 14:08:27 -06:00
Ray Molenkamp
33df4b78d0 make.bat: remove --expand-tabs from "make format" on windows.
following the change on linux.
2019-04-20 13:10:30 -06:00
Sergey Sharybin
2a891842af Clang-format: Speed up detection of clang-format
Don't construct the full build environment, following
feedback from Ray.
2019-04-16 17:10:02 +02:00
Campbell Barton
65aebd0c11 GNUmakefile: move clang format utility
Makes more sense to place in 'utils_maintenance'.
2019-04-16 16:49:32 +02:00
Sergey Sharybin
fc32f98bbc Initial support of make format for Windows
There are couple of caviats currently:

- The script requires system-wide Python 3 available in the current
  search PATH as python.exe.

  This will get addressed soon by distributing unpacked Python binary
  in our libraries.

- Since the libraries folder is to be known, this requires to have
  MSVC detected. Not too bad, since formatting is still way slower
  than detection, but still doesn't feel ideal.
2019-04-16 15:41:32 +02:00
Ray Molenkamp
1d2fc413c8 make.bat: Preliminary Visual Studio 2019 support.
VS2019 is binary compatible with the existing vc14 libraries and no
new libraries libs are required in svn.

VS2019 support requires cmake 3.14.

VS2019 is still in pre-release state, you are required to explicitly
select the pre-release version by using:

make full 2019pre
2019-02-22 20:54:27 -07:00
Ray Molenkamp
633b77b0ee Make.bat: Fix sub-module detection 2019-02-22 20:53:29 -07:00
c5f13ecbc0 Merge branch 'blender2.7' 2019-02-17 15:57:34 +01:00
Ray Molenkamp
b428929319 Windows: Fix building with llvm/clang 7.0.1
For llvm 6 the visual studio integration was 'not great' and we had
our own, which broke when llvm 7.0.1 came out. llvm now has properly
supported integration available on the VS market place hence we can
retire our custom support.
2019-02-16 11:36:19 -07:00
Ray Molenkamp
e1efaa6f74 make.bat: remove stray quote in msvc2017 detection.
Shouldn't cause issues, but better safe than sorry.
2019-01-24 15:21:31 -07:00
c9df453ce7 Update for moving blender2.8 to master. 2018-12-21 12:15:21 +01:00
e72f989cf4 Update for moving master to blender2.7 branch. 2018-12-21 12:01:05 +01:00
Ray Molenkamp
ca30930e36 Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-30 17:39:20 -06:00
Ray Molenkamp
5490708c39 make.bat: fix unquoted variables.
causing build issues for some users.
2018-10-30 17:36:36 -06:00
Ray Molenkamp
2dbddaf3be Fix "make update" on Windows not updating addons to the blender2.8 branch.
based on rB8e183a83b7aa3bbdefcdea6a86ca2c0dbd00417f
2018-10-30 07:55:45 -06:00