Move Windows dep build from MinGW/GCC to msys/MSVC #105502

Merged
Ray molenkamp merged 27 commits from Anthony-Roberts/blender:move-to-msys2 into main 2023-06-10 23:05:55 +02:00

Currently, Windows dependencies are built with MinGW/GCC - this commit removes that, in favour of building them with MSVC, via msys2.

This unifies the Windows build to use MSVC entirely for dependencies.

Done as part of the foundational work for Windows ARM64 platforms.

A note: You may notive the xvid build was removed on Windows - it doesn't even appear to be selectable as a codec in normal release builds (pic attached), and was causing a headache for modern MSVC, so I removed it.

image

Currently, Windows dependencies are built with MinGW/GCC - this commit removes that, in favour of building them with MSVC, via msys2. This unifies the Windows build to use MSVC entirely for dependencies. Done as part of the foundational work for Windows ARM64 platforms. A note: You may notive the xvid build was removed on Windows - it doesn't even appear to be selectable as a codec in normal release builds (pic attached), and was causing a headache for modern MSVC, so I removed it. ![image](/attachments/5dd3685c-45d4-4f30-abbc-9ea2df3d9cd5)
Anthony Roberts added 1 commit 2023-03-06 18:01:29 +01:00
5f4ffc7710 Move Windows dep build from MinGW/GCC to msys/MSVC
Currently, Windows dependencies are built with MinGW/GCC - this commit
removes that, in favour of building them with MSVC, via msys2. This
unifies the Windows build to use MSVC entirely for dependencies.

Done as part of the foundational work for Windows ARM64 platforms.
Anthony Roberts requested review from Ray molenkamp 2023-03-06 18:02:06 +01:00
Ray molenkamp requested changes 2023-03-06 21:03:25 +01:00
Ray molenkamp left a comment
Member

initital pass/lowhanging fruit only, haven't been able to build just yet.

initital pass/lowhanging fruit only, haven't been able to build just yet.
@ -8,3 +4,1 @@
# building with mingw, it'll have an unhappy time with that and
# we need to clear them out.
set(AOM_CMAKE_FLAGS )
set(AOM_GENERATOR "Visual Studio 17 2022")
Member

you can't hardcode 2022 here, we still support 2019 and you can't link libraries build with 2022 with older compilers, compat only works in one direction there. build in 2019 -> linked with 2022 is fine.. the otherway around is not.

the default generator is already Visual studio (win) and Makefiles (mac+lin), we only had the generator stuff here because we forcibly wanted to use ninja on windows, if you want to stick with visual studio, the custom generator bits can/need to be be removed.

you can't hardcode 2022 here, we still support 2019 and you can't link libraries build with 2022 with older compilers, compat only works in one direction there. build in 2019 -> linked with 2022 is fine.. the otherway around is not. the default generator is already Visual studio (win) and Makefiles (mac+lin), we only had the generator stuff here because we forcibly wanted to use ninja on windows, if you want to stick with visual studio, the custom generator bits can/need to be be removed.
Author
Member

This is another leftover from the ARM64 stuff (which adds support for VS2022 also) - missed it - will remove in next commit.

This is another leftover from the ARM64 stuff (which adds support for VS2022 also) - missed it - will remove in next commit.
Anthony-Roberts marked this conversation as resolved
@ -3,2 +4,3 @@
if(WIN32)
set(temp_LIBDIR ${mingw_LIBDIR})
set(LIBDIR_PREFIX "L")
Member

Took me a bit to realize what this did, 'L'? what's 'L'? only when you scroll down you realize it's a flag, I'd prefer LIBDIR_FLAG and just add the - here as well so it's even clearer that it is indeed a flag.

Took me a bit to realize what this did, 'L'? what's 'L'? only when you scroll down you realize it's a flag, I'd prefer `LIBDIR_FLAG` and just add the `-` here as well so it's even clearer that it is indeed a flag.
Author
Member

ACK, will fix next commit.

ACK, will fix next commit.
Anthony-Roberts marked this conversation as resolved
@ -6,2 +6,2 @@
# Shared for windows because static libs will drag in a libgcc dependency.
set(GMP_OPTIONS --disable-static --enable-shared --enable-fat --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
# Borrow a reasonably up-to-date ar-lib from webp to enable MSVC
cmake_to_msys_path("${BUILD_DIR}/webp/src/external_webp/ar-lib" arlib_path)
Member

This gives me the Heebie-jeebies, i'd rather see this as a patch for gmp or put the script straight up in build_files\build_environment\patches\

the dep between gmp and webp just doesn't sit right with me.

This gives me the Heebie-jeebies, i'd rather see this as a patch for gmp or put the script straight up in `build_files\build_environment\patches\` the dep between gmp and webp just doesn't sit right with me.
Author
Member

The file in itself is ~270 lines - would you rather it be on it's own ir in a patch file? Can do either.

File: https://github.com/gcc-mirror/gcc/blob/master/ar-lib

The file in itself is ~270 lines - would you rather it be on it's own ir in a patch file? Can do either. File: https://github.com/gcc-mirror/gcc/blob/master/ar-lib
Member

If its a fixed URI, we could just grab it in setup_msys2.cmake and place it in a convenient location (ie somewhere the msys2 tree) for all deps to use if they need it.

If its a fixed URI, we could just grab it in `setup_msys2.cmake` and place it in a convenient location (ie somewhere the msys2 tree) for all deps to use if they need it.
Author
Member

Sure, will grap a specific version like I do with gas-preprocessor

Sure, will grap a specific version like I do with gas-preprocessor
Anthony-Roberts marked this conversation as resolved
@ -2,17 +2,15 @@
set(LAME_EXTRA_ARGS)
if(MSVC)
Member

not super obvious in the online diff viewer, but this produces

set(LAME_EXTRA_ARGS)
if(MSVC)
  set(LAME_ARCH Win64)
  endif()
  set (LAME_CONFIGURE echo .)
  set (LAME_BUILD cd ${BUILD_DIR}/lame/src/external_lame/ && nmake /F MakeFile.msvc MSVCVER=${LAME_ARCH} all)
  set (LAME_INSTALL cd ${BUILD_DIR}/lame/src/external_lame/ &&
                      ${CMAKE_COMMAND} -E copy include/lame.h ${LIBDIR}/lame/include/lame/lame.h &&
                      ${CMAKE_COMMAND} -E copy output/libmp3lame-static.lib ${LIBDIR}/lame/lib/mp3lame.lib )
else()

which leads to:

CMake Error at cmake/lame.cmake:12 (else):
  Flow control statements are not properly nested.
Call Stack (most recent call first):
  CMakeLists.txt:141 (include)
not super obvious in the online diff viewer, but this produces ``` set(LAME_EXTRA_ARGS) if(MSVC) set(LAME_ARCH Win64) endif() set (LAME_CONFIGURE echo .) set (LAME_BUILD cd ${BUILD_DIR}/lame/src/external_lame/ && nmake /F MakeFile.msvc MSVCVER=${LAME_ARCH} all) set (LAME_INSTALL cd ${BUILD_DIR}/lame/src/external_lame/ && ${CMAKE_COMMAND} -E copy include/lame.h ${LIBDIR}/lame/include/lame/lame.h && ${CMAKE_COMMAND} -E copy output/libmp3lame-static.lib ${LIBDIR}/lame/lib/mp3lame.lib ) else() ``` which leads to: ``` CMake Error at cmake/lame.cmake:12 (else): Flow control statements are not properly nested. Call Stack (most recent call first): CMakeLists.txt:141 (include) ```
Author
Member

ACK, that's a leftover from where I removed ARM64 code from this and missed it, will fix next commit

ACK, that's a leftover from where I removed ARM64 code from this and missed it, will fix next commit
Anthony-Roberts marked this conversation as resolved
@ -0,0 +58,4 @@
endif()
# Refresh pacman and upgrade all packages
# Note: We do this regardless of installation status, to get latest packages - pacman works on *rolling releases*
Member

That's problematic, i need to be able to rebuild LTS releases for 2 years without getting all kinds of unrelated updates, the old system grabbed the packages once, and for the important ones like compiler versions they were pinned versions so there's no surprise GCC 10->11 update with all kinds of new adventures in it.

That's problematic, i need to be able to rebuild LTS releases for 2 years without getting all kinds of unrelated updates, the old system grabbed the packages once, and for the important ones like compiler versions they were pinned versions so there's no surprise GCC 10->11 update with all kinds of new adventures in it.
Author
Member

So the packages in this case are nothing critical in that way - they are on line 70, patch m4 coreutils nasm pkgconf make diffutils autoconf-wrapper - the one thing that could be an issue (perl), is on a fixed version.

The only one I could see being an issue is NASM, which it may be possible to download a specific version of from elsewhere.

So the packages in this case are nothing critical in that way - they are on line 70, `patch m4 coreutils nasm pkgconf make diffutils autoconf-wrapper` - the one thing that could be an issue (perl), is on a fixed version. The only one I could see being an issue is NASM, which it may be possible to download a specific version of from elsewhere.
Member

If it's not critical, there is no need to update them no?

You can probably nick the nasm install from the old mingw code.

If it's not critical, there is no need to update them no? You can probably nick the nasm install from the old mingw code.
Author
Member

I mean sure, but rebuilding deps from scratch would get the newest version anyway, as msys2/pacman has no concept of version pinning - I can remove it if you would like though.

ACK on 2nd line, I'll look into using the nasm code from the old release.

I mean sure, but rebuilding deps from scratch would get the newest version anyway, as msys2/pacman has no concept of version pinning - I can remove it if you would like though. ACK on 2nd line, I'll look into using the nasm code from the old release.
Anthony-Roberts marked this conversation as resolved
Ray molenkamp requested changes 2023-03-06 21:10:10 +01:00
Ray molenkamp left a comment
Member

one more, after fixing lame manually

CMake Error at cmake/ffmpeg.cmake:202 (add_dependencies):
  The dependency target "external_openjpeg" of target "external_ffmpeg" does
  not exist.
Call Stack (most recent call first):
  CMakeLists.txt:149 (include)
one more, after fixing lame manually ``` CMake Error at cmake/ffmpeg.cmake:202 (add_dependencies): The dependency target "external_openjpeg" of target "external_ffmpeg" does not exist. Call Stack (most recent call first): CMakeLists.txt:149 (include) ```
Author
Member

one more, after fixing lame manually

CMake Error at cmake/ffmpeg.cmake:202 (add_dependencies):
  The dependency target "external_openjpeg" of target "external_ffmpeg" does
  not exist.
Call Stack (most recent call first):
  CMakeLists.txt:149 (include)

Ah, I forgot to stage a file I updated locally - will fix next commit.

> one more, after fixing lame manually > > ``` > CMake Error at cmake/ffmpeg.cmake:202 (add_dependencies): > The dependency target "external_openjpeg" of target "external_ffmpeg" does > not exist. > Call Stack (most recent call first): > CMakeLists.txt:149 (include) > ``` > > Ah, I forgot to stage a file I updated locally - will fix next commit.
Anthony Roberts added 1 commit 2023-03-07 15:31:24 +01:00
Anthony Roberts added 1 commit 2023-03-07 17:22:19 +01:00
Member

missing endif()

CMake Error at cmake/setup_msys2.cmake:97 (if):
  Flow control statements are not properly nested.
Call Stack (most recent call first):
  CMakeLists.txt:43 (include)


-- Configuring incomplete, errors occurred!

I manually added it and looks like things will be building for a while, will let you know if anything else pops up.

missing `endif()` ``` CMake Error at cmake/setup_msys2.cmake:97 (if): Flow control statements are not properly nested. Call Stack (most recent call first): CMakeLists.txt:43 (include) -- Configuring incomplete, errors occurred! ``` I manually added it and looks like things will be building for a while, will let you know if anything else pops up.
Ray molenkamp reviewed 2023-03-07 19:29:41 +01:00
@ -932,2 +927,2 @@
DEBUG
)
if(WITH_GMP)
Member

missed one :)

missed one :)
Anthony-Roberts marked this conversation as resolved
Ray molenkamp reviewed 2023-03-07 19:30:11 +01:00
@ -992,3 +983,1 @@
${LIBDIR}/materialx/bin/MaterialXGenShader_d.dll
DEBUG
)
if(WITH_MATERIALX)
Member

and one more

and one more
Anthony-Roberts marked this conversation as resolved
Anthony Roberts added 3 commits 2023-03-08 11:26:03 +01:00
Anthony Roberts requested review from Ray molenkamp 2023-03-08 14:53:29 +01:00
Member
  • pacman still does a whole bunch of stuff every time I build , once installed i want to see no more pacman shennenigans
Checking for msys2 base
Refreshing pacman
:: Synchronizing package databases...
 clangarm64 downloading...
 mingw32 downloading...
 mingw64 downloading...
 ucrt64 downloading...
 clang32 downloading...
 clang64 downloading...
 msys downloading...
?[H?[2J?[3JInstalling required packages
warning: resolving dependencies...
patch-2.7.6-2 is up to date -- reinstalling
warning: m4-1.4.19-2 is up to date -- reinstalling
warning: coreutils-8.32-5 is up to date -- reinstalling
warning: pkgconf-1.9.4-1 is up to date -- reinstalling
warning: make-4.4.1-1 is up to date -- reinstalling
warning: diffutils-3.8-4 is up to date -- reinstalling
warning: autoconf-wrapper-20221207-1 is up to date -- reinstalling
looking for conflicting packages...

Packages (7) autoconf-wrapper-20221207-1  coreutils-8.32-5  diffutils-3.8-4  m4-1.4.19-2  make-4.4.1-1  patch-2.7.6-2  pkgconf-1.9.4-1

Total Installed Size:  29.74 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
warning: could not get file information for usr/bin/link.exe
:: Processing package changes...
reinstalling patch...
reinstalling m4...
reinstalling coreutils...
reinstalling pkgconf...
reinstalling make...
reinstalling diffutils...
reinstalling autoconf-wrapper...
:: Running post-transaction hooks...
  • lame has /machine:i386 set causing lib/linker errors
  • vpx VPX_INCLUDE_PATH is set to vpx-vp8-vp9-nopost-x86_64md-vs16-v1.11.0 directory is actually called vpx-vp8-vp9-nodocs-x86_64-win64md-vs16-v1.11.0
  • ffmpeg doesn't build CUSTOMBUILD : error : aom >= 1.0.0 not found using pkg-config [c:\db\build\S\VS1564R\external_ffmpeg.vcxproj]
- pacman still does a whole bunch of stuff every time I build , once installed i want to see no more pacman shennenigans ``` Checking for msys2 base Refreshing pacman :: Synchronizing package databases... clangarm64 downloading... mingw32 downloading... mingw64 downloading... ucrt64 downloading... clang32 downloading... clang64 downloading... msys downloading... ?[H?[2J?[3JInstalling required packages warning: resolving dependencies... patch-2.7.6-2 is up to date -- reinstalling warning: m4-1.4.19-2 is up to date -- reinstalling warning: coreutils-8.32-5 is up to date -- reinstalling warning: pkgconf-1.9.4-1 is up to date -- reinstalling warning: make-4.4.1-1 is up to date -- reinstalling warning: diffutils-3.8-4 is up to date -- reinstalling warning: autoconf-wrapper-20221207-1 is up to date -- reinstalling looking for conflicting packages... Packages (7) autoconf-wrapper-20221207-1 coreutils-8.32-5 diffutils-3.8-4 m4-1.4.19-2 make-4.4.1-1 patch-2.7.6-2 pkgconf-1.9.4-1 Total Installed Size: 29.74 MiB Net Upgrade Size: 0.00 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... checking available disk space... warning: could not get file information for usr/bin/link.exe :: Processing package changes... reinstalling patch... reinstalling m4... reinstalling coreutils... reinstalling pkgconf... reinstalling make... reinstalling diffutils... reinstalling autoconf-wrapper... :: Running post-transaction hooks... ``` - lame has `/machine:i386` set causing lib/linker errors - vpx `VPX_INCLUDE_PATH` is set to `vpx-vp8-vp9-nopost-x86_64md-vs16-v1.11.0` directory is actually called `vpx-vp8-vp9-nodocs-x86_64-win64md-vs16-v1.11.0` - ffmpeg doesn't build `CUSTOMBUILD : error : aom >= 1.0.0 not found using pkg-config [c:\db\build\S\VS1564R\external_ffmpeg.vcxproj]`
Anthony Roberts added 2 commits 2023-03-13 11:10:12 +01:00
Author
Member

My bad on ffmpeg and LAME, I forgot to omit the diffs, I was overzealous in removing ARM64 stuff from this locally.

FFMpeg may well need 2 patches (as this one may cause linux issues?), with a seperate one for windows.

My bad on ffmpeg and LAME, I forgot to omit the diffs, I was overzealous in removing ARM64 stuff from this locally. FFMpeg may well need 2 patches (as this one may cause linux issues?), with a seperate one for windows.
Anthony Roberts added 1 commit 2023-03-13 11:26:35 +01:00
Ray molenkamp reviewed 2023-03-14 01:15:13 +01:00
@ -3,2 +4,3 @@
if(WIN32)
set(temp_LIBDIR ${mingw_LIBDIR})
set(LIBDIR_FLAG "-L")
Member

-Lblahblah doesn't work, and emits an "unknown flag" warn

set(LIBDIR_FLAG "/LIBPATH:") does the trick

`-Lblahblah` doesn't work, and emits an "unknown flag" warn `set(LIBDIR_FLAG "/LIBPATH:")` does the trick
Anthony-Roberts marked this conversation as resolved
Ray molenkamp reviewed 2023-03-14 01:15:49 +01:00
@ -35,0 +44,4 @@
set(FFMPEG_LDFLAGS "\
${FFMPEG_LDFLAGS} \
-L${temp_LIBDIR}/openjpeg_msvc/lib \
Member

use ${LIBDIR_FLAG} rather than -L

use `${LIBDIR_FLAG}` rather than `-L`
Anthony-Roberts marked this conversation as resolved
Anthony Roberts added 1 commit 2023-03-15 11:57:56 +01:00
Member

Finally had some time for another round of (windows) testing on this couple of things stuck out

  • ZLib had been moved from static to dynamic, while I'm not opposed to that in principle, it does sit at the very bottom of the dependency tree causing a rebuild for virtually all deps which is going to cause more work than I have availability for right now. With zlib in its original configuration (static) the only deps that really need to be rebuild for this to land are sndfile and ffmpeg which is much easier to deal with.

  • A bunch of the dll/lib filenames changed, that's fair and to be expected, that does however imply that landing this diff and a new set of libraries needs to be done within minutes/seconds from each other, which is a bit tricky. For major changes like this I generally offer an easy upgrade path where I check if the new files exist, if so use those, if not assume the old file names. I generally leave this in place for a version ie 3.5 can build against both an 3.5 and 3.4 lib folder. I'd prefer if this was done here as well, "i have a build error"....."get new libs" gets very old very quickly if you have to tell people multiple times a day.

  • the ffmpeg_codecs test has 2 failing tests

36: [ RUN      ] ffmpeg.libopenjpeg_AV_PIX_FMT_YUV420P
36: K:\BlenderGit\blender\intern\ffmpeg\tests\ffmpeg_codecs.cc(157): error: Value of: test_codec_video_by_name(str(libopenjpeg), AV_PIX_FMT_YUV420P)
36:   Actual: false
36: Expected: true
36: [  FAILED  ] ffmpeg.libopenjpeg_AV_PIX_FMT_YUV420P (1 ms)
36: [ RUN      ] ffmpeg.libxvid_AV_PIX_FMT_YUV420P
36: K:\BlenderGit\blender\intern\ffmpeg\tests\ffmpeg_codecs.cc(158): error: Value of: test_codec_video_by_name(str(libxvid), AV_PIX_FMT_YUV420P)
36:   Actual: false
36: Expected: true

The xvid one is to be expected and you can leave for now until the VFX team figures out what to do with xvid, the openjpeg one should be fixed.

Finally had some time for another round of (windows) testing on this couple of things stuck out - ZLib had been moved from static to dynamic, while I'm not opposed to that in principle, it does sit at the very bottom of the dependency tree causing a rebuild for virtually all deps which is going to cause more work than I have availability for right now. With zlib in its original configuration (static) the only deps that really need to be rebuild for this to land are sndfile and ffmpeg which is much easier to deal with. - A bunch of the dll/lib filenames changed, that's fair and to be expected, that does however imply that landing this diff and a new set of libraries needs to be done within minutes/seconds from each other, which is a bit tricky. For major changes like this I generally offer an easy upgrade path where I check if the new files exist, if so use those, if not assume the old file names. I generally leave this in place for a version ie 3.5 can build against both an 3.5 and 3.4 lib folder. I'd prefer if this was done here as well, "i have a build error"....."get new libs" gets very old very quickly if you have to tell people multiple times a day. - the `ffmpeg_codecs` test has 2 failing tests ``` 36: [ RUN ] ffmpeg.libopenjpeg_AV_PIX_FMT_YUV420P 36: K:\BlenderGit\blender\intern\ffmpeg\tests\ffmpeg_codecs.cc(157): error: Value of: test_codec_video_by_name(str(libopenjpeg), AV_PIX_FMT_YUV420P) 36: Actual: false 36: Expected: true 36: [ FAILED ] ffmpeg.libopenjpeg_AV_PIX_FMT_YUV420P (1 ms) 36: [ RUN ] ffmpeg.libxvid_AV_PIX_FMT_YUV420P 36: K:\BlenderGit\blender\intern\ffmpeg\tests\ffmpeg_codecs.cc(158): error: Value of: test_codec_video_by_name(str(libxvid), AV_PIX_FMT_YUV420P) 36: Actual: false 36: Expected: true ``` The xvid one is to be expected and you can leave for now until the VFX team figures out what to do with xvid, the openjpeg one should be fixed.
Anthony Roberts added 1 commit 2023-03-24 17:36:54 +01:00
Anthony Roberts added 1 commit 2023-04-20 18:46:36 +02:00
Anthony Roberts added 1 commit 2023-04-21 13:22:50 +02:00
Member

Just to give an update why i'm stalling a bit, the change is a little too intrusive to fold in an LTS release we have to maintain for another 2 years, I'm still very interested in landing this but I'd like to target 4.0 as the landing spot.

Just to give an update why i'm stalling a bit, the change is a little too intrusive to fold in an LTS release we have to maintain for another 2 years, I'm still very interested in landing this but I'd like to target 4.0 as the landing spot.
Author
Member

Just to give an update why i'm stalling a bit, the change is a little too intrusive to fold in an LTS release we have to maintain for another 2 years, I'm still very interested in landing this but I'd like to target 4.0 as the landing spot.

Do you have a rough date for that? I can try and land the Windows ARM64 patch for then also (which depends on this one)

> Just to give an update why i'm stalling a bit, the change is a little too intrusive to fold in an LTS release we have to maintain for another 2 years, I'm still very interested in landing this but I'd like to target 4.0 as the landing spot. Do you have a rough date for that? I can try and land the Windows ARM64 patch for then also (which depends on this one)
Member

I do! The 4.0 merge window should open up may 17 could shift a few days depending on what is happening in 3.6 at the time.

I do! The 4.0 merge window should open up [may 17](https://projects.blender.org/blender/blender/milestone/7) could shift a few days depending on what is happening in 3.6 at the time.
Anthony Roberts added 1 commit 2023-04-26 16:17:49 +02:00
Anthony Roberts added 1 commit 2023-04-26 16:52:52 +02:00
Anthony Roberts added 1 commit 2023-04-27 11:58:15 +02:00
Author
Member

Thanks! As far as I am concerned, this is ready to go, unless you have further comments - is there any news on xvid from the relevant team?

Thanks! As far as I am concerned, this is ready to go, unless you have further comments - is there any news on xvid from the relevant team?
Anthony Roberts added 86 commits 2023-05-26 11:12:57 +02:00
b3597b1128 Add Asset Browser as own editor
This is part of a (tentative) plan to split off the Asset Browser from
the File Browser, while adding a new grid-view API that generalizes most
of the UI. Both editors can use this and only have to implement their
case-specific logic. This then allows us to add a proper asset system,
that's not tied to the file browser backend anymore.
b8b7b0af70 Add basic asset library loading, general cleanups
Adds an asset library selector and prints the list of assets when drawing the
Asset Browser main window.
3df2e4e888 Display a basic list of assets, set up scrolling and notifier listening
* Display a non-interactive list of assets, updates as assets get
  loaded.
* Notifier listening happens via the view, so the grid-view supports
  listening to notifiers. This is what triggers regular redraws as
  assets get loaded.
* Scrolling may need more fine tuning, so that scroll-bars are
  hidden if they don't apply (e.g. don't show horizontal scroll-bar for
  the vertically expanding grid-view layout).
925b82efb0 Basic grid layout with big preview tiles
Draws the asset previews in a grid layout, similar to the "old" Asset
Browser. No interactivity is supported yet.
The layout is managed through the grid-view.
39e3580065 Enforce a fixed column number for the grid layout
Avoid stretching items to fit the layout, they should always have a
fixed size.
ee013f44b5 Show asset catalog tree-view in navigation sidebar
Selecting catalogs doesn't work yet.
Includes some temporary changes needed to avoid conflicts between old
File/Asset Browser and new Asset Browser code.
eab2a8479a Move asset catalog filtering to editors/assets
Such general asset-view functionality can go to the general editors
level, I think that makes the most sense.
29fdd43605 Get changes in catalog tree to update the UI correctly
The catalog tree-view now sends appropriate notifiers and messages when
changing data. Either itself or other UIs (like the main asset browser
region) can then listen to these and update.
I try to design this in a way that the views become independent on the
editor displaying them, so the views can be reused in multiple places.
400d7235c3 Mouse hover highlight for grid items
Like the tree-view rows, grid items use an overlapping layout to draw
the background and a custom layout on top. There is a new dedicated
button type for the grid view items.
Adds some related bits needed for persistent view-item state storage.
Also a bunch of code for the grid item button type can be shared with
the tree-row one, but I prefer doing that separately.
2011d1f6d0 Various GUI tweaks
- Tweak tile size to match previous Asset Browser better
- Reduce margins between preview tiles (grid view was ignoring `align`
  parameter).
- Improve placement of text below previews (allowing previews to be
  slightly bigger).
- Tweak margins of main asset browser layout.
9530fb60ad Fix crash when loading files with asset browser open
Some fun with static memory. When loading a file, the asset-library
service was destructed since some while ago. For the old asset browser
that wasn't a problem, since its storage was recreated from scratch. But
the new asset browser accesses the global asset library storage of the
asset system which is static and thus stays alive if a different file is
loaded.

For now just destruct the global asset library storage when loading
a new file.
5fcf6822dd Reduce brightness of grid item highlight
Also show theme settings for the view item in the Theme Preferences.
Called it "Data-View Item" for now, to be evaluated.
ff213c802c Fix failing assert when splitting new asset browser in 2
This is an issue in master already, but for many layouts it just isn't
triggered. Pretty sure the assert just shouldn't be executed in extreme
cases, where there is no width for the layout and max-sizes become < 0.
f29fa9895f Bring back editor pulldown menus, get operators to work, T for nav-bar
- Adds the View, Edit & Select pulldown menus
- Makes asset operators work (e.g. catalog management)
- Correct notifiers (fixing missing redraws)
- Add T shortcut to toggle toolbar
18f8749fb7 Only add items to layout that are visible on screen
Basically we skip adding buttons for items that aren't visible, but
scrolled out of view. This already makes scrolling in very large
libraries smoother. However this also prepares the next step, where we
only load previews for items that are currently in view, which should
make the experience with large asset libraries better.
c9c332f422 Fix failed assert with small region size
If there's not enough space to draw at least one item per row, there would be a
failed assert in the code to skip drawing items scrolled out of view.
696295f849 Support active item
Makes activating assets in the Asset Browser work. The active item is only
stored at the UI level now, so it's not stored in files, not accessible via
context and is lost when changing editors. The Asset Browser itself will have
to get a way to store that.
ef58467594 Store active item, asset metadata sidebar
Also:
- Fix double-free bug when closing Blender
- Fix issues with identifying assets with the same name.
- Add functions to store asset handle as pointer in the asset list storage,
  asset browser exposes it via context.
39eab45c8e Let UI do lazy-loading of previews, rather than file-list cache
This is an important step to decouple the asset-views from the file browser
backend. One downside is that the UI preview loading is much slower than the
file browser one, however, I'm pretty sure I know how to address this.
eafd98c920 Remove preview-caching from asset-list API
This isn't needed anymore, see previous commit.
2ce7f02a06 Fix missing (re)load when changing asset libraries
Logic to compare asset library references was incorrect.
731c1be92a Speedup preview icon loading
Significantly speeds up loading of previews, not just for assets but also
Python loaded custom previews. Patch will be submitted for master.
9ae2259db5 Solve redraw performance issue in huge asset libraries
In a big asset library (>3000 assets in the one I'm testing with), the asset
browser would get a notable redraw lag due to the O(n^2) complexity of the tree
item matching (to recognize items over multiple redraws and keep state like
selection, highlights, renaming, ...).
a34ac195ac Fix now unnecessary FIXME comment
This C++ incompatibility is solved in the main branch now.
73d7bde25c Increase size of catalog navigation bar
Use same size as File Browser, this is a bit too tight.
c90dfcc52d Add selection state support & "Select All" operator
No mouse select possible yet, since this is a bit more involved.
buildbot/vexp-code-patch-coordinator Build done. Details
331d685ef6
Fix new asset browser not updating as assets get loaded
Anthony Roberts changed title from WIP: Move Windows dep build from MinGW/GCC to msys/MSVC to Move Windows dep build from MinGW/GCC to msys/MSVC 2023-05-30 14:53:31 +02:00
Author
Member

@LazyDodo Ping for another pass at this please!

@LazyDodo Ping for another pass at this please!
Member

It's been building for a few hours already, given it was a full clean build, it'll "be a bit"

It's been building for a few hours already, given it was a full clean build, it'll "be a bit"
Ray molenkamp requested changes 2023-05-31 22:25:35 +02:00
Ray molenkamp left a comment
Member

Just some minor issues at this point

  • This diff contains a whole ton of changes that shouldn't be in here, ie the scripts folder.
  • ffmpeg test is still failing, this can be fixed by removing the xvid check
  • fftw filenames can just stay as the build outputs them no need to rename stuff.

still had some build issues with USD due to things beyond your control, i'll fix those my self, no need to stall this diff on.

Just some minor issues at this point - This diff contains a whole ton of changes that shouldn't be in here, ie the scripts folder. - ffmpeg test is still failing, this can be fixed by removing the xvid check - fftw filenames can just stay as the build outputs them no need to rename stuff. still had some build issues with USD due to things beyond your control, i'll fix those my self, no need to stall this diff on.
@ -33,3 +40,2 @@
ExternalProject_Add_Step(external_fftw3_double after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/fftw3.lib ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
Member

Just keep the file names as they are being output by the build, in the past we tried to bend the build system to get it to generate the "old" names, but after a couple of years of that you tend to end up in a situation where you go "but why does it have such a weird name?" and no-one knows. I've been trying to clean up these instances as I update deps.

Just keep the file names as they are being output by the build, in the past we tried to bend the build system to get it to generate the "old" names, but after a couple of years of that you tend to end up in a situation where you go "but why does it have such a weird name?" and no-one knows. I've been trying to clean up these instances as I update deps.
Author
Member

Done!

Done!
Anthony-Roberts marked this conversation as resolved
Author
Member

ACK, it appears my git client decided a random feature branch was main rather than thr actual main - I'll fix that

ACK, it appears my git client decided a random feature branch was main rather than thr actual main - I'll fix that
Anthony Roberts force-pushed move-to-msys2 from ee9106469c to 1cbc7cdd64 2023-06-01 11:48:30 +02:00 Compare
Anthony Roberts requested review from Ray molenkamp 2023-06-01 11:50:55 +02:00
Anthony Roberts added 1 commit 2023-06-01 11:51:56 +02:00
Anthony Roberts added 1 commit 2023-06-01 12:13:10 +02:00
Ray molenkamp requested changes 2023-06-01 20:54:41 +02:00
Ray molenkamp left a comment
Member

libxvid could be removed under the condition that ffmpeg's internal codepath would be used for this, removing xvid completely from the UI is not what was agreed upon. It would need to stay working

libxvid could be removed under the condition that ffmpeg's internal codepath would be used for this, removing xvid completely from the UI is not what was agreed upon. It would need to stay working
Anthony Roberts added 2 commits 2023-06-02 10:22:00 +02:00
Anthony Roberts requested review from Ray molenkamp 2023-06-06 17:43:22 +02:00
Anthony Roberts added 1 commit 2023-06-06 17:46:36 +02:00
Member

@brecht / @ideasman42 this seems to be getting close to landing, due to the large nature of this diff, can you guys give a whirl on your respective platforms to make sure nothing broke there?

@brecht / @ideasman42 this seems to be getting close to landing, due to the large nature of this diff, can you guys give a whirl on your respective platforms to make sure nothing broke there?
Brecht Van Lommel requested changes 2023-06-06 20:14:20 +02:00
@ -166,18 +207,21 @@ add_dependencies(
external_vorbis
external_ogg
external_lame
external_aom

Don't remove aom here? It seems needed still.

Don't remove aom here? It seems needed still.
Anthony-Roberts marked this conversation as resolved
@ -97,3 +141,2 @@
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE_COMMAND} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}

Don't remove ${FFMPEG_ENV}, still needed for Linux and macOS.

Don't remove `${FFMPEG_ENV}`, still needed for Linux and macOS.
Anthony-Roberts marked this conversation as resolved
@ -5,2 +5,3 @@
if(NOT WIN32)
set(LIBDIR_FLAG "-L")
else()
set(temp_LIBDIR ${LIBDIR})

This should not have been removed, it still needs to be set to LIBDIR on Linux and macOS, where msys2_LIBDIR is not available.

This should not have been removed, it still needs to be set to `LIBDIR` on Linux and macOS, where `msys2_LIBDIR` is not available.
Anthony-Roberts marked this conversation as resolved
@ -6,3 +17,2 @@
enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
-enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
- { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+ { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version "-DOPJ_STATIC $pthreads_extralibs $libm_extralibs" && add_cppflags "-DOPJ_STATIC $pthreads_extralibs $libm_extralibs"; } }

These openjpeg related changes are still needed, should not be removed for Linux and macOS. You could make a separate diff for Windows and leave the existing one unchanged.

These openjpeg related changes are still needed, should not be removed for Linux and macOS. You could make a separate diff for Windows and leave the existing one unchanged.
Anthony-Roberts marked this conversation as resolved

I ran into a cmake error that was already in main, and committed a fix in e562a8891f.

I ran into a cmake error that was already in main, and committed a fix in e562a8891ff13d79bf872059ce4ad39390f24e97.
Campbell Barton requested changes 2023-06-07 16:30:24 +02:00
Campbell Barton left a comment
Owner

Mostly ran into the same issues as Brecht, noted one extra inline (related to finding libaom).

Mostly ran into the same issues as Brecht, noted one extra inline (related to finding libaom).
@ -4,0 +5,4 @@
enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
enabled ladspa && require_headers "ladspa.h dlfcn.h"
enabled lcms2 && require_pkg_config lcms2 "lcms2 >= 2.13" lcms2.h cmsCreateContext
-enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version

This change prevents ffmpeg finding libaom.a on Linux which currently depends on pkgconfig.

This change prevents ffmpeg finding `libaom.a` on Linux which currently depends on pkgconfig.
Anthony-Roberts marked this conversation as resolved
Anthony Roberts added 1 commit 2023-06-08 10:19:50 +02:00
Anthony Roberts added 1 commit 2023-06-08 10:22:10 +02:00
Anthony Roberts requested review from Brecht Van Lommel 2023-06-08 10:22:20 +02:00
Anthony Roberts requested review from Campbell Barton 2023-06-08 10:22:25 +02:00
Author
Member

Thanks for the comments guys, these should all be addressed now! I also merged master to include the mentioned cmake fix in USD

Thanks for the comments guys, these should all be addressed now! I also merged master to include the mentioned cmake fix in USD

Linux packages now build without problems.

Linux packages now build without problems.
Campbell Barton approved these changes 2023-06-08 11:24:26 +02:00
Brecht Van Lommel approved these changes 2023-06-08 12:11:32 +02:00
Ray molenkamp approved these changes 2023-06-10 22:49:30 +02:00
Ray molenkamp left a comment
Member

finished final testing, this can land, will land the changed libs on monday

finished final testing, this can land, will land the changed libs on monday
Ray molenkamp added 1 commit 2023-06-10 22:50:17 +02:00
Ray molenkamp merged commit 451751380c into main 2023-06-10 23:05:55 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#105502
No description provided.