source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Shaders fail to compile when SDKBINDIR has quotes

Open Mine228 opened this issue 7 years ago • 9 comments

So I followed the Source SDK 2013 Shader Authoring page and ran my build(modname)shaders.bat file and its giving me some errors:

Setting environment for using Microsoft Visual Studio 2010 x86 tools. 08:26 PM

==================== buildshaders stdshader_dx9_20b -game C:\Source_ Mods\SourceMod_01\src\materialsystem\stdshaders......\game\mod_hl2mp -source .... ================== 08:26 PM 'Files' is not recognized as an internal or external command, operable program or batch file. Building inc files, asm vcs files, and VMPI worklist for stdshader_dx9_20b... NMAKE : U1073: don't know how to make 'Pootis_Shader_ps2x.fxc' Stop. Publishing shader inc files to target... Generating action list... Running distributed shader compilation... shadercompile.exe -nompi -nop4 -game "C:\Source_Mods\SourceMod_01\src\materialsy stem\stdshaders......\game\mod_hl2mp" -shaderpath "C:\Source_Mods\SourceMod_0 1\src\materialsystem\stdshaders" -allowdebug Can't find "C:\Source_Mods\SourceMod_01\src\materialsystem\stdshaders"C:\Progra m Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\bin"\shade rcompile.exe " Can't find "C:\Source_Mods\SourceMod_01\src\materialsystem\stdshaders"C:\Progra m Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\bin"\shade rcompile_dll.dll " Can't find "C:\Source_Mods\SourceMod_01\src\materialsystem\stdshaders"C:\Progra m Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\bin"\tier0 .dll " Can't find "C:\Source_Mods\SourceMod_01\src\materialsystem\stdshaders"C:\Progra m Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\bin"\vstdl ib.dll " Compiling 567 commands in 14 static combos.

Can someone help me?

Mine228 avatar Mar 12 '18 18:03 Mine228

Seems like the spaces in your path is causing you problems.

joeangry avatar Mar 30 '18 19:03 joeangry

I tried the suggested vdc fix but it didn't work. It says:

\Steam\SteamApps\common\Source was unexpected at this time.

Mine228 avatar Apr 01 '18 18:04 Mine228

So, any thoughts on how to fix this? Anyone?

Mine228 avatar Apr 19 '18 19:04 Mine228

I might take a look at it tomorrow, or during the weekend.


From: Mince228 [email protected] Sent: Thursday, April 19, 2018 9:30:22 PM To: ValveSoftware/source-sdk-2013 Cc: scart; Comment Subject: Re: [ValveSoftware/source-sdk-2013] Problems Building Shaders (#450)

So, any thoughts on how to fix this? Anyone?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ValveSoftware/source-sdk-2013/issues/450#issuecomment-382854092, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEp_wMErAE-THy8ebjnnzhNFuO2kxCB8ks5tqOXOgaJpZM4SnKL3.

joeangry avatar Apr 19 '18 21:04 joeangry

Could you post your source code directory, mod directory and buildepisodicshaders.bat file?

joeangry avatar Apr 24 '18 22:04 joeangry

C:\Source_Mods\SourceMod_01\src

C:\Program Files (x86)\Steam\SteamApps\sourcemods\SourceMod_01

I followed the VDC toturial and made a custom bat file: buildSourceMod_01shaders.bat

`@echo off setlocal

rem ================================ rem ==== MOD PATH CONFIGURATIONS ===

rem == Set the absolute path to your mod's game directory here == set GAMEDIR= %cd%......\game\mod_hl2mp

rem == Set the relative or absolute path to Source SDK Base 2013 Singleplayer\bin == set SDKBINDIR="C:\Program Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer\bin" rem set SDKBINDIR="C:\SHADER_BIN"

rem == Set the Path to your mod's root source code == rem This should already be correct, accepts relative paths only! set SOURCEDIR=....

rem ==== MOD PATH CONFIGURATIONS END === rem ====================================

call buildsdkshaders.bat `

Mine228 avatar Apr 25 '18 08:04 Mine228

I think I managed to fix it. I had my SDKBINDIR path in quotations, after removing them it seems to compile the shaders. I'm not sure if everything will work now but I will test.

Mine228 avatar May 07 '18 22:05 Mine228

What if you set your GAMEDIR to an absolute path?

set GAMEDIR="C:\Program Files (x86)\Steam\SteamApps\sourcemods\SourceMod_01"

The setup I've got for our codebase looks like this, and works just fine:

@echo off
setlocal

rem == Setup path to nmake.exe, from vc 2005 common tools directory ==
call "%VS120COMNTOOLS%vsvars32.bat"

rem ================================
rem ==== MOD PATH CONFIGURATIONS ===

rem == Set the absolute path to your mod's game directory here ==
set GAMEDIR="E:\Steam\SteamApps\SourceMods\MissingInfo"
rem set GAMEDIR="E:\Steam\SteamApps\common\Missing Information\MissingInfo"

rem == Set the relative or absolute path to Source SDK Base 2013 Singleplayer\bin ==
set SDKBINDIR=E:\Steam\SteamApps\common\Source SDK Base 2013 Singleplayer\bin

rem ==  Set the Path to your mod's root source code ==
rem This should already be correct, accepts relative paths only!
set SOURCEDIR=..\..

rem ==== MOD PATH CONFIGURATIONS END ===
rem ====================================


call buildsdkshaders.bat

joeangry avatar May 07 '18 22:05 joeangry

Yeah I also set an absolute path for the GAMEDIR, just in case, and I've managed to get it working by removing the quotations from SDKBINDIR path. The test shader compiles and everything seems to work. Cheers.

Mine228 avatar May 08 '18 09:05 Mine228