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

[windows] compile dependencies (except target for x64) from source #16850

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3a2dcab
[cmake] include CheckFunctionExists module before using it
Rechi Nov 4, 2021
40b077c
[cmake] convert DOWNLOAD_DIR to a cmake path
Rechi Nov 4, 2021
f525d5b
[cmake] support multiple lines in flags.txt
Rechi Nov 4, 2021
c455046
[cmake] add base url for dependencies
Rechi Nov 4, 2021
5390fcf
[windows] add native depends
Rechi Nov 4, 2021
23188e1
[windows][depends] add flatbuffers
Rechi Nov 4, 2021
bcfcd6b
[windows][depends] add JsonSchemaBuilder
Rechi Nov 4, 2021
1c767f1
[windows][depends] add swig
Rechi Nov 4, 2021
d1d1e25
[windows][depends] add giflib
Rechi Nov 4, 2021
f169633
[windows][depends] add jpeg-turbo
Rechi Nov 4, 2021
b82e1c4
[windows][depends] add lzo2
Rechi Nov 4, 2021
b33d299
[windows][depends] add zlib
Rechi Nov 4, 2021
f621d5d
[windows][depends] add png
Rechi Nov 4, 2021
a8ad99c
[windows][depends] add TexturePacker
Rechi Nov 4, 2021
fafa63e
[windows] compile native dependencies from source
Rechi Nov 4, 2021
d287a54
[windows] refactor buildsteps
Rechi Nov 4, 2021
1f944da
[windows] add target depends
Rechi Nov 4, 2021
a9a4beb
[windows][depends] add freetype
Rechi Nov 4, 2021
8beba93
[windows][depends] add fribidi
Rechi Nov 4, 2021
a4d8d01
[windows][depends] add iconv
Rechi Nov 4, 2021
03e3fae
[windows][depends] add ass
Rechi Nov 4, 2021
4f5ca14
[windows][depends] add cdio
Rechi Nov 4, 2021
134b72d
[windows][depends] add crossguid
Rechi Nov 4, 2021
0562600
[windows][depends] add zlib
Rechi Nov 4, 2021
8a87bc7
[windows][depends] add openssl
Rechi Nov 4, 2021
751afe4
[windows][depends] add curl
Rechi Nov 4, 2021
841ebf7
[windows][depends] add msys2
Rechi Nov 4, 2021
e7dcb5c
[windows][depends] add python
Rechi Nov 4, 2021
be629fc
[windows][depends] add yasm
Rechi Nov 4, 2021
770bcd9
[windows][depends] add ffmpeg
Rechi Nov 4, 2021
47a5835
[windows][depends] add flatbuffers
Rechi Nov 4, 2021
3630cf8
[windows][depends] add fmt
Rechi Nov 4, 2021
3536566
[windows][depends] add fstrcmp
Rechi Nov 4, 2021
d54cb13
[windows][depends] add harfbuzz
Rechi Nov 4, 2021
aae92a6
[windows][depends] add lzo2
Rechi Nov 4, 2021
7d33f7d
[windows][depends] add pcre
Rechi Nov 4, 2021
3807f9e
[windows][depends] add rapidjson
Rechi Nov 4, 2021
d083554
[windows][depends] add spdlog
Rechi Nov 4, 2021
7406f1f
[windows][depends] add sqlite3
Rechi Nov 4, 2021
72e7dcb
[windows][depends] add taglib
Rechi Nov 4, 2021
61eb9ca
[windows][depends] add tinyxml
Rechi Nov 4, 2021
b076b24
[cmake] make dependencies of optional XSLT optional
Rechi Nov 4, 2021
77288f5
[windows] remove detours hacks
Rechi Nov 4, 2021
ea210fc
[windows] remove pragma lib
Rechi Nov 4, 2021
3c5dbef
[windows] fix building for uwp-arm
Rechi Nov 4, 2021
dd25bcf
[windows] configure AppxManifest.xml in cmake
Rechi Nov 4, 2021
fcc760b
[windows] compile target dependencies (except for x64) from source
Rechi Nov 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions .gitignore
Expand Up @@ -217,15 +217,8 @@ cmake_install.cmake
/project/BuildDependencies/build
/project/BuildDependencies/scripts/tmp
/project/BuildDependencies/src
/project/BuildDependencies/bin/swig
/project/BuildDependencies/bin/doxygen
/project/BuildDependencies/bin/json-rpc
/project/BuildDependencies/mingwlibs
/project/BuildDependencies/x64
/project/BuildDependencies/win10-arm
/project/BuildDependencies/win10-x64
/project/BuildDependencies/win10-win32
/project/BuildDependencies/win32

# /system/players/VideoPlayer
/system/players/VideoPlayer/*
Expand Down
1 change: 0 additions & 1 deletion cmake/installdata/windowsstore/addons.txt
@@ -1,2 +1 @@
project/BuildDependencies/win10-${ARCH}/addons/*
system/addon-manifest-uwp.xml
1 change: 0 additions & 1 deletion cmake/installdata/windowsstore/dlls.txt

This file was deleted.

1 change: 0 additions & 1 deletion cmake/installdata/windowsstore/python.txt

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/modules/FindD3DX11Effects.cmake
Expand Up @@ -12,7 +12,7 @@ if(NOT CORE_SYSTEM_NAME STREQUAL windowsstore)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}"
"$ENV{WindowsSdkDir}Redist/d3d/${SDK_TARGET_ARCH}"
NO_DEFAULT_PATH)
NO_DEFAULT_PATH CMAKE_FIND_ROOT_PATH_BOTH)
if(NOT D3DCOMPILER_DLL)
message(WARNING "Could NOT find Direct3D Compiler")
endif()
Expand Down
1 change: 1 addition & 0 deletions cmake/modules/FindIconv.cmake
Expand Up @@ -17,6 +17,7 @@ find_path(ICONV_INCLUDE_DIR NAMES iconv.h)

find_library(ICONV_LIBRARY NAMES iconv libiconv c)

include(CheckFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
check_function_exists(iconv HAVE_ICONV_FUNCTION)
if(NOT HAVE_ICONV_FUNCTION)
Expand Down
26 changes: 13 additions & 13 deletions cmake/modules/FindJsonSchemaBuilder.cmake
Expand Up @@ -17,27 +17,27 @@ if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder)
find_program(JSONSCHEMABUILDER_EXECUTABLE NAMES "${APP_NAME_LC}-JsonSchemaBuilder" JsonSchemaBuilder
HINTS ${_jsbpath})

add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
IMPORTED_LOCATION "${JSONSCHEMABUILDER_EXECUTABLE}")
elseif(CORE_SYSTEM_NAME STREQUAL windowsstore)
get_filename_component(_jsbpath "${DEPENDENCIES_DIR}/bin/json-rpc" ABSOLUTE)
find_program(JSONSCHEMABUILDER_EXECUTABLE NAMES "${APP_NAME_LC}-JsonSchemaBuilder" JsonSchemaBuilder
HINTS ${_jsbpath})

add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
IMPORTED_LOCATION "${JSONSCHEMABUILDER_EXECUTABLE}")
else()
if(WITH_JSONSCHEMABUILDER)
get_filename_component(_jsbpath ${WITH_JSONSCHEMABUILDER} ABSOLUTE)
get_filename_component(_jsbpath ${_jsbpath} DIRECTORY)
if(WITH_JSONSCHEMABUILDER OR WIN32)
if(WITH_JSONSCHEMABUILDER)
get_filename_component(_jsbpath ${WITH_JSONSCHEMABUILDER} ABSOLUTE)
get_filename_component(_jsbpath ${_jsbpath} DIRECTORY)
else()
get_filename_component(_jsbpath "${DEPENDENCIES_DIR}/bin/json-rpc" ABSOLUTE)
endif()
find_program(JSONSCHEMABUILDER_EXECUTABLE NAMES "${APP_NAME_LC}-JsonSchemaBuilder" JsonSchemaBuilder
HINTS ${_jsbpath})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JsonSchemaBuilder "Could not find '${APP_NAME_LC}-JsonSchemaBuilder' or 'JsonSchemaBuilder' executable in ${_jsbpath} supplied by -DWITH_JSONSCHEMABUILDER. Make sure the executable file name matches these names!"
JSONSCHEMABUILDER_EXECUTABLE)
if(WITH_JSONSCHEMABUILDER)
find_package_handle_standard_args(JsonSchemaBuilder "Could not find '${APP_NAME_LC}-JsonSchemaBuilder' or 'JsonSchemaBuilder' executable in ${_jsbpath} supplied by -DWITH_JSONSCHEMABUILDER. Make sure the executable file name matches these names!"
JSONSCHEMABUILDER_EXECUTABLE)
else()
find_package_handle_standard_args(JsonSchemaBuilder DEFAULT_MSG JSONSCHEMABUILDER_EXECUTABLE)
endif()
if(JSONSCHEMABUILDER_FOUND)
add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
Expand Down
26 changes: 13 additions & 13 deletions cmake/modules/FindTexturePacker.cmake
Expand Up @@ -17,27 +17,27 @@ if(NOT TARGET TexturePacker::TexturePacker)
find_program(TEXTUREPACKER_EXECUTABLE NAMES "${APP_NAME_LC}-TexturePacker" TexturePacker
HINTS ${_tppath})

add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL)
set_target_properties(TexturePacker::TexturePacker PROPERTIES
IMPORTED_LOCATION "${TEXTUREPACKER_EXECUTABLE}")
elseif(WIN32)
get_filename_component(_tppath "${DEPENDENCIES_DIR}/tools/TexturePacker" ABSOLUTE)
find_program(TEXTUREPACKER_EXECUTABLE NAMES "${APP_NAME_LC}-TexturePacker.exe" TexturePacker.exe
HINTS ${_tppath})

add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL)
set_target_properties(TexturePacker::TexturePacker PROPERTIES
IMPORTED_LOCATION "${TEXTUREPACKER_EXECUTABLE}")
else()
if(WITH_TEXTUREPACKER)
get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE)
get_filename_component(_tppath ${_tppath} DIRECTORY)
if(WITH_TEXTUREPACKER OR WIN32)
if(WITH_TEXTUREPACKER)
get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE)
get_filename_component(_tppath ${_tppath} DIRECTORY)
else()
get_filename_component(_tppath "${DEPENDENCIES_DIR}/tools/TexturePacker" ABSOLUTE)
endif()
find_program(TEXTUREPACKER_EXECUTABLE NAMES "${APP_NAME_LC}-TexturePacker" TexturePacker
HINTS ${_tppath})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TexturePacker "Could not find '${APP_NAME_LC}-TexturePacker' or 'TexturePacker' executable in ${_tppath} supplied by -DWITH_TEXTUREPACKER. Make sure the executable file name matches these names!"
TEXTUREPACKER_EXECUTABLE)
if(WITH_TEXTUREPACKER)
find_package_handle_standard_args(TexturePacker "Could not find '${APP_NAME_LC}-TexturePacker' or 'TexturePacker' executable in ${_tppath} supplied by -DWITH_TEXTUREPACKER. Make sure the executable file name matches these names!"
TEXTUREPACKER_EXECUTABLE)
else()
find_package_handle_standard_args(TexturePacker DEFAULT_MSG TEXTUREPACKER_EXECUTABLE)
endif()
if(TEXTUREPACKER_FOUND)
add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL)
set_target_properties(TexturePacker::TexturePacker PROPERTIES
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/FindXSLT.cmake
Expand Up @@ -14,7 +14,7 @@
#
# XSLT::XSLT - The XSLT library

find_package(LibXml2 REQUIRED)
find_package(LibXml2 QUIET)

if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_XSLT libxslt QUIET)
Expand All @@ -29,7 +29,7 @@ set(XSLT_VERSION ${PC_XSLT_VERSION})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(XSLT
REQUIRED_VARS XSLT_LIBRARY XSLT_INCLUDE_DIR
REQUIRED_VARS XSLT_LIBRARY XSLT_INCLUDE_DIR LIBXML2_FOUND
VERSION_VAR XSLT_VERSION)

if(XSLT_FOUND)
Expand Down
13 changes: 10 additions & 3 deletions cmake/scripts/common/HandleDepends.cmake
Expand Up @@ -47,14 +47,17 @@ function(add_addon_depends addon searchpath)
set(url "")
if(deflength GREATER 1)
list(GET def 1 url)
if(NOT url MATCHES "^https?://")
set(url "http://mirrors.kodi.tv/build-deps/sources/${url}")
endif()
message(STATUS "${id} url: ${url}")
endif()

# check if there are any library specific flags that need to be passed on
if(EXISTS ${dir}/flags.txt)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${dir}/flags.txt)
file(STRINGS ${dir}/flags.txt extraflags)
string(REPLACE " " ";" extraflags ${extraflags})
string(REPLACE " " ";" extraflags "${extraflags}")

message(STATUS "${id} extraflags: ${extraflags}")
endif()
Expand Down Expand Up @@ -90,6 +93,10 @@ function(add_addon_depends addon searchpath)
message(${BUILD_ARGS})
endif()

if(TARBALL_DIR)
list(APPEND BUILD_ARGS -DTARBALL_DIR=${TARBALL_DIR})
endif()

# used for addons where need special folders to store there content (if
# not set the addon define it byself).
# e.g. Google Chromium addon where his git bring:
Expand Down Expand Up @@ -231,13 +238,13 @@ function(add_addon_depends addon searchpath)
-DCMAKE_INCLUDE_PATH=${OUTPUT_DIR}/include)
endif()

set(DOWNLOAD_DIR ${BUILD_DIR}/download)
file(TO_CMAKE_PATH ${BUILD_DIR}/download DOWNLOAD_DIR)
if(EXISTS ${dir}/${id}.sha256)
file(STRINGS ${dir}/${id}.sha256 sha256sum)
list(GET sha256sum 0 sha256sum)
set(URL_HASH_COMMAND URL_HASH SHA256=${sha256sum})
if(TARBALL_DIR)
set(DOWNLOAD_DIR ${TARBALL_DIR})
file(TO_CMAKE_PATH ${TARBALL_DIR} DOWNLOAD_DIR)
endif()
else()
unset(URL_HASH_COMMAND)
Expand Down
4 changes: 2 additions & 2 deletions cmake/scripts/windows/ArchSetup.cmake
Expand Up @@ -33,10 +33,10 @@ set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH})
set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH})

# mingw libs
list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
list(INSERT CMAKE_PREFIX_PATH 0 ${MINGW_LIBS_DIR})
list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
# dependencies
list(PREPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
list(INSERT CMAKE_PREFIX_PATH 1 ${DEPENDENCIES_DIR})

# -------- Compiler options ---------

Expand Down
1 change: 1 addition & 0 deletions cmake/scripts/windows/Install.cmake
@@ -0,0 +1 @@
configure_file(project/Win32BuildSetup/AppxManifest.xml.in AppxManifest.xml)
18 changes: 1 addition & 17 deletions cmake/scripts/windowsstore/ArchSetup.cmake
Expand Up @@ -43,16 +43,6 @@ set(CMAKE_SYSTEM_NAME WindowsStore)
set(CORE_SYSTEM_NAME "windowsstore")
set(PACKAGE_GUID "281d668b-5739-4abd-b3c2-ed1cda572ed2")
set(APP_MANIFEST_NAME package.appxmanifest)
set(DEPS_FOLDER_RELATIVE project/BuildDependencies)

set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/win10-${ARCH})
set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/win10-${ARCH})

# mingw libs
list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
# dependencies
list(PREPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})


# -------- Compiler options ---------
Expand All @@ -67,11 +57,10 @@ if(NOT SDK_TARGET_ARCH STREQUAL arm)
list(APPEND ARCH_DEFINES -D__SSE__ -D__SSE2__)
endif()
set(SYSTEM_DEFINES -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DHAS_DX -D__STDC_CONSTANT_MACROS
-DTAGLIB_STATIC -DNPT_CONFIG_ENABLE_LOGGING
-DNPT_CONFIG_ENABLE_LOGGING
-DPLT_HTTP_DEFAULT_USER_AGENT="UPnP/1.0 DLNADOC/1.50 Kodi"
-DPLT_HTTP_DEFAULT_SERVER="UPnP/1.0 DLNADOC/1.50 Kodi"
-DUNICODE -D_UNICODE
-DFRIBIDI_STATIC
$<$<CONFIG:Debug>:-DD3D_DEBUG_INFO>)

# Additional SYSTEM_DEFINES
Expand All @@ -86,11 +75,6 @@ set(gtest_force_shared_crt ON CACHE STRING "" FORCE)

# -------- Linker options ---------

# For #pragma comment(lib X)
# TODO: It would certainly be better to handle these libraries via CMake modules.
link_directories(${MINGW_LIBS_DIR}/lib
${DEPENDENCIES_DIR}/lib)

list(APPEND DEPLIBS bcrypt.lib d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib WindowsApp.lib)

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WINMD:NO")
Expand Down
18 changes: 0 additions & 18 deletions cmake/scripts/windowsstore/Macros.cmake
Expand Up @@ -111,22 +111,6 @@ macro(add_deployment_content_group path link match exclude)
endmacro()

macro(winstore_append_props target)
# exclude debug dlls from packaging
set(DEBUG_DLLS zlibd.dll)
foreach(_dll ${DEBUG_DLLS})
if (DEBUG_DLLS_EXCLUDE)
list(APPEND DEBUG_DLLS_EXCLUDE "\;$(BuildRootPath)/dlls/${_dll}")
else()
list(APPEND DEBUG_DLLS_EXCLUDE "$(BuildRootPath)/dlls/${_dll}")
endif()
string(CONCAT DEBUG_DLLS_LINKAGE_PROPS "${DEBUG_DLLS_LINKAGE_PROPS}"
" <ItemGroup Label=\"Binaries\">\n"
" <None Include=\"$(BinPath)\\${_dll}\" Condition=\"'$(Configuration)'=='Debug'\">\n"
" <DeploymentContent>true</DeploymentContent>\n"
" </None>\n"
" </ItemGroup>\n")
endforeach(_dll DEBUG_DLLS)

add_deployment_content_group($(BuildRootPath)/dlls "" *.dll "${DEBUG_DLLS_EXCLUDE}")
add_deployment_content_group($(BuildRootPath)/system system **/* "$(BuildRootPath)/**/shaders/**")
add_deployment_content_group($(BuildRootPath)/system/shaders system/shaders **/*.fx "")
Expand All @@ -148,7 +132,6 @@ macro(winstore_append_props target)
endforeach()

set(VCPROJECT_PROPS_FILE "${CMAKE_CURRENT_BINARY_DIR}/${target}.props")
file(TO_NATIVE_PATH ${DEPENDENCIES_DIR} DEPENDENCIES_DIR_NATIVE)
file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR} CMAKE_CURRENT_BINARY_DIR_NATIVE)
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/project/Win32BuildSetup/BUILD_WIN32/addons BINARY_ADDONS_DIR_NATIVE)

Expand All @@ -157,7 +140,6 @@ macro(winstore_append_props target)
"<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
" <ImportGroup Label=\"PropertySheets\" />\n"
" <PropertyGroup Label=\"APP_DLLS\">\n"
" <BinPath>${DEPENDENCIES_DIR_NATIVE}\\bin</BinPath>\n"
" <BuildRootPath>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</BuildRootPath>\n"
" <BinaryAddonsPath>${BINARY_ADDONS_DIR_NATIVE}</BinaryAddonsPath>\n"
" </PropertyGroup>\n"
Expand Down
25 changes: 20 additions & 5 deletions docs/README.Windows.md
Expand Up @@ -47,9 +47,11 @@ Several different strategies are used to draw your attention to certain pieces o
## 2. Prerequisites
To build Kodi:
* **[CMake](https://cmake.org/download/)** (version 3.15 or greater is required)
* **[Doxygen](www.doxygen.org/download.html)** (Only needed if you want to generate the documentation)
* **[Git for Windows](https://gitforwindows.org/)**
* **[Java Runtime Environment (JRE)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)**
* **[Nullsoft scriptable install system (NSIS)](http://nsis.sourceforge.net/Download)** (Only needed if you want to generate an installer file)
* **[Perl](https://www.perl.org/get.html)**
* **[Visual Studio 2019](https://visualstudio.microsoft.com/downloads/)** or **[Visual Studio 2017](https://visualstudio.microsoft.com/vs/older-downloads/)** (Community Edition is fine)

To run Kodi you need a relatively recent CPU with integrated GPU or discrete GPU with up-to-date graphics device-drivers installed from the manufacturer's website.
Expand Down Expand Up @@ -135,6 +137,12 @@ Kodi can be built as either a normal 32bit or 64bit program, UWP 32bit and 64bit

**TIP:** Look for comments starting with `Or ...` and only execute the command(s) you need.

Build native dependencies:
```
cd %userprofile%\kodi\tools\buildsteps\windows
make-native-depends.bat
```

Change to the 64bit build directory (**recommended**):
```
cd %userprofile%\kodi\tools\buildsteps\windows\x64
Expand All @@ -160,6 +168,7 @@ Or change to the UWP ARM 32bit build directory:
cd %userprofile%\kodi\tools\buildsteps\windows\arm-uwp
```

### Prepare dependencies for 64bit
Download dependencies:
```
download-dependencies.bat
Expand All @@ -176,6 +185,12 @@ Build FFmpeg:
make-mingwlibs.bat
```

### Prepare dependencies for everything else
Build target dependencies:
```
make-target-depends.bat
```

**[back to top](#table-of-contents)** | **[back to section top](#4-set-up-the-build-environment)**

## 5. Build Kodi automagically
Expand Down Expand Up @@ -224,27 +239,27 @@ cd kodi-build

Configure build for 64bit (**recommended**):
```
cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 %userprofile%\kodi
cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 -DCMAKE_PREFIX_PATH=%userprofile%\kodi\tools\depends\xbmc-depends\x86_64-windows-native %userprofile%\kodi
```

Or configure build for 32bit:
```
cmake -G "Visual Studio 16 2019" -A Win32 -T host=x64 %userprofile%\kodi
cmake -G "Visual Studio 16 2019" -A Win32 -T host=x64 -DCMAKE_TOOLCHAIN_FILE=%userprofile%\kodi\tools\depends\xbmc-depends\x86-windows-Debug\Toolchain.cmake %userprofile%\kodi
```

Or configure build for UWP 64bit:
```
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -T host=x64 %userprofile%\kodi
cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 -DCMAKE_TOOLCHAIN_FILE=%userprofile%\kodi\tools\depends\xbmc-depends\x86_64-windowsstore-Debug\Toolchain.cmake %userprofile%\kodi
```

Or configure build for UWP 32bit:
```
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -T host=x64 %userprofile%\kodi
cmake -G "Visual Studio 16 2019" -A Win32 -T host=x64 -DCMAKE_TOOLCHAIN_FILE=%userprofile%\kodi\tools\depends\xbmc-depends\x86-windowsstore-Debug\Toolchain.cmake %userprofile%\kodi
```

Or configure build for UWP ARM 32bit:
```
cmake -G "Visual Studio 16 2019" -A ARM -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -T host=x64 %userprofile%\kodi
cmake -G "Visual Studio 16 2019" -A ARM -T host=x64 -DCMAKE_TOOLCHAIN_FILE=%userprofile%\kodi\tools\depends\xbmc-depends\arm-windowsstore-Debug\Toolchain.cmake %userprofile%\kodi
```

**Visual Studio 2017:**
Expand Down
14 changes: 0 additions & 14 deletions project/BuildDependencies/scripts/0_package.native-win32.list

This file was deleted.