How much disk space to build Kodi on Windows?
#1
I'd like to set up a Kodi dev environment in a VM and need to know how large to size the disk. I can estimate the size for the Windows and VS installation, but I don't know how much space Kodi will take up. I've looked through the readme's and forum but have come up empty on this question, so if someone could get a properties on their build folder and tell me the size for a completed Windows build, I'd really appreciate it.
Reply
#2
My kodi directory uses approximately 17 GB. It contains the git checkout and the cmake build for Windows x64 but no builds for binary add-ons. If you also want to run Kodi with some metadata the size will increase due to thumbnail caching etc.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
(2021-01-12, 10:07)Montellese Wrote: My kodi directory uses approximately 17 GB. It contains the git checkout and the cmake build for Windows x64 but no builds for binary add-ons. If you also want to run Kodi with some metadata the size will increase due to thumbnail caching etc.

Thanks, that's helpful. I had budgeted a max disk size of 150 GB for the VM, so it seems I should have room to spare, even if I build for Android as well as Windows, which I also want to do.
Reply
#4
After freshly installing Windows 10 x64 to a VMware Player VM and building Kodi debug and release builds (v19 RC1) for Windows x64, my VM disk size is 66 GB. I did not install the Visual Studio 2017 UWP feature, which the Kodi readme says would have required another 12 GB.

I ran into a series of hiccups I'm going to list below in case anyone has an experience like mine. Google was not helpful for all but the last one.

1. The README.Windows.md says to git Kodi to %userprofile%, which is normally going to be C:\Users\your_name. My user name is 4 characters long, which is probably no more than average length. The build went fine until it tried to build the installer, and it failed on this file:

C:\Users\xxxx\Kodi\project\Win32BuildSetup\BUILD_WIN32\addons\visualization.projectm\resources\projectM\presets\presets_tryptonaut\New Creation Sensation -  AdamFx,Flexi,Amandio c n Martin - Star to Another World ft Hexocollie  n Shadow Harlequin n Geiss B.milk

This filename is 261 characters long, which exceeds the Windows max length for the normal filename syntax, and NSIS couldn't handle it. I Googled "presets_tryptonaut\new creation sensation" but got only one unhelpful hit, so I decided to start over. To get rid of the directory, I used "robocopy empty_folder kodi /purge" because I know from getting rid of Plex that Windows Explorer chokes on long paths like this.

2. So I then tried installing the Kodi sources to "C:\k", which would have gotten the path under the max length, but building that failed for reasons I didn't keep in my frustration. I remember looking at the .bat files and noticed a lot of relative paths, so I reasoned that maybe the C:\users\xxxx depth was important. I nuked the failed C:\k installation and tried C:\0\1 as the base directory, which was still just under the max length. It worked! I was able to create a Release build with installer using BuildSetup.bat.

3. I went into Visual Studio 2017 to create the debug build, but this failed at the link step for kodi.exe because the 32-bit linker couldn't memory map the 2.4 GB libkodi.lib file. Visual Studio tried to start the 64-bit linker but loaded "C:\Program Files\Git\usr\bin\link.exe" which of course resulted in a bizarre error message and failure. Googling "LINK : restarting link with 64-bit linker" led me to the following page:

https://developercommunity.visualstudio....5-x64.html

Creating the environment variable PreferredToolArchitecture=x64 as recommended there fixed that problem.

Hope this helps somebody. Fortunately, I can now run and debug Kodi inside my VMware Player VM.
Reply
#5
First of all you don't need the UWP features if you don't want to build Kodi for UWP.

The easiest solution would be to modify Windows to support paths longer than 260 characters, see e.g. https://www.howtogeek.com/266621/how-to-...haracters/. There are no restrictions on the folder structure where the Kodi repository is cloned from Git. You also don't have to put it under C:\Users\xyz\. I'm not sure why the README mentions this.

And when running CMake you need to specify whether you want a 32-bit or 64-bit build using the -T host=x64 arguments so that it can properly detect the matching Visual Studio build tools.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
(2021-01-18, 08:06)Montellese Wrote: First of all you don't need the UWP features if you don't want to build Kodi for UWP.

Right, that's why I didn't install it. I mentioned it only to be clear that an installation that did include it would be substantially larger, per the readme, than the VM disk size I reported.
Quote:The easiest solution would be to modify Windows to support paths longer than 260 characters, see e.g. https://www.howtogeek.com/266621/how-to-...haracters/.

Never heard of that new Windows feature! It's still not activated by default, and I expect this is a common failure mode for new Windows developers.
Quote:There are no restrictions on the folder structure where the Kodi repository is cloned from Git. You also don't have to put it under
C:\Users\xyz\
. I'm not sure why the README mentions this

I remember now the C:\k failure was in one of the first patch steps when compiling ffmpeg. It mentioned a path that started with /xbmc, and that got me thinking it might be a relative path problem. Anyway, I was wrong about that. I just set C:\k up again, and it's working now. No idea what went wrong before. Maybe I didn't notice a prior download failure.
Quote:And when running CMake you need to specify whether you want a 32-bit or 64-bit build using the
-T host=x64
arguments so that it can properly detect the matching Visual Studio build tools.

I see that "-T host=x64" is in the readme, but I didn't use CMake. Like I said, I used BuildSetup.bat to build the 64 bit Release and then Visual Studio to build the Debug. Surely people are switching to Visual Studio once the solution file has been created? Anyway, I didn't continue with the readme past "5. Build Kodi automagically" because while (5) talks about getting a Debug build out of BuildSetup.bat, it doesn't say how to do it, and looking into the .bat file, it didn't seem to have an option for this. Instead, I'd have to edit it to change the buildconfig variable. I stopped reading "6. Build Kodi manually" when I got to the line, "Create an out-of-source build directory," because I didn't know why I'd want to do that. I just wanted the "stock" configuration, and it seemed to me that using Visual Studio was the way to get it. Indeed, building the "Kodi" project in VS got me the Debug directory alongside the Release directory in kodi-build mentioned in Step 5, and it's all working as expected now.

To summarize, as someone completely new to Kodi development, I would have found it helpful if the readme had mentioned the following.
 
  1. The Windows path length obstacle and fix.
  2. In "5. Build Kodi automagically", explain how you get it to make a Debug build.
  3. It would be good to explain why you would want to "Create an out-of-source build directory" in "6. Build Kodi manually" and describe the implications that has for working inside Visual Studio. If using CMake to create the Debug build in Step (6) obviates creating the "PreferredToolArchitecture=x64" environment variable so the linker can work for Debug builds, it would be good to mention you're supposed to use CMake instead of including it under a "Build manually" section, which I thought was optional.
  4. If the goal is to use the command line stuff to bootstrap working in Visual Studio, it could be more explicit about that and also include a section on how to use the generated solution file inside the IDE, e.g. which projects to select to do what.
  5. Is it possible to create an installer through Visual Studio? I haven't been able to figure out that. This ties into explaining how to use the solution file.
Reply
#7
Thanks for your input. Let's see if we can find someone who can incorporate this into the existing README. Maybe @h.udo?

AFAIK it currently isn't possible to create the installer from VS. That might actually be a good idea go move this logic from BuildSetup.bat to cmake. But it might be difficult to achieve because it also involves building binary add-ons etc. Personally during development I never use the installer and I never use BuildSetup.bat because I want to start Kodi from VS with the debugger.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
How much disk space to build Kodi on Windows?0