Closed Jack121298 closed 2 years ago
I don't have a French speaking account environment, nor do I have a windows environment that I can test on. You can add the -vD
parameter and provide the full logs
Generating HLSL shaders... 'Lastname' is not recognized as an internal or external command, operable program or batch file
I think this is a DirectXTK issue and has nothing to do with xmake. Its CompileShaders.cmd may not handle space paths very well.
if (NOT USE_PREBUILT_SHADERS)
add_custom_command(
OUTPUT "${COMPILED_SHADERS}/SpriteEffect_SpriteVertexShader.inc"
MAIN_DEPENDENCY "${PROJECT_SOURCE_DIR}/Src/Shaders/CompileShaders.cmd"
DEPENDS ${SHADER_SOURCES}
COMMENT "Generating HLSL shaders..."
COMMAND ${CMAKE_COMMAND} -E env CompileShadersOutput="${COMPILED_SHADERS}" CompileShaders.cmd > "${COMPILED_SHADERS}/compileshaders.log"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/Src/Shaders"
USES_TERMINAL)
endif()
https://github.com/microsoft/DirectXTK/blob/main/Src/Shaders/CompileShaders.cmd
:CompileShaderHLSL
set fxc=%PCFXC% %1.hlsl %FXCOPTS% /T%2_4_0_level_9_1 /E%3 "/Fh%CompileShadersOutput%\%1_%3.inc" "/Fd%CompileShadersOutput%\%1_%3.pdb" /Vn%1_%3
it should use quote to wrap %1.hlsl
I fixed this package, you can try it again.
$ xrepo update-repo
$ xmake f -c
$ xmake
Xmake Version
2.6.9
Operating System Version and Architecture
Windows 10 Education 20H2
Describe Bug
Using Xmake to build an open source project here fails due to my user account containing 'firstName + whitespace + lastName'. Build fails when trying to install https://github.com/microsoft/DirectXTK
Expected Behavior
Building to work which it does on a fresh user account with a single word with no whitespace
Project Configuration
set_xmakever("2.6.5")
-- If newer version of xmake, remove ccache until it actually works if set_policy ~= nil then set_policy("build.ccache", false) end
-- c code will use c99, set_languages("c99", "cxx20")
if is_plat("windows") then add_cxflags("/bigobj") add_syslinks("kernel32") set_arch("x64") end
if is_plat("linux") then add_cxflags("-fPIC") end
set_warnings("all") add_vectorexts("sse", "sse2", "sse3", "ssse3") add_vectorexts("neon")
-- build configurations add_rules("mode.debug", "mode.releasedbg")
if has_config("unitybuild") then add_rules("c.unity_build") add_rules("c++.unity_build", {batchsize = 12}) end
add_requires( "entt", "recastnavigation", "tiltedcore", "cryptopp", "spdlog", "cpp-httplib", "gtest", "mem", "glm", "sentry-native", "zlib")
add_requireconfs("cpp-httplib", {configs = {ssl = true}}) add_requireconfs("sentry-native", { configs = { backend = "crashpad" } }) add_requireconfs("magnum", { configs = { sdl2 = true }}) add_requireconfs("magnum-integration", { configs = { imgui = true }}) add_requireconfs("magnum-integration.magnum", { configs = { sdl2 = true }}) add_requireconfs("magnum-integration.imgui", { override = true })
if is_plat("windows") then add_requires( "discord", "imgui", "magnum", "magnum-integration") end
before_build(function (target) import("modules.version") local branch, commitHash = version() bool_to_number={ [true]=1, [false]=0 } local contents = string.format([[
pragma once
end)
if is_mode("debug") then add_defines("DEBUG") end
if is_plat("windows") then add_defines("NOMINMAX") end
-- add projects includes("Libraries") includes("Code")
task("upload-symbols") on_run(function () import("core.base.option")
Additional Information and Error Logs
Generating HLSL shaders... 'Lastname' is not recognized as an internal or external command, operable program or batch file