ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.84k stars 2.02k forks source link

Shaders fail to compile when SDKBINDIR has quotes #450

Open Mine228 opened 6 years ago

Mine228 commented 6 years ago

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_dx920b -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?

joeangry commented 6 years ago

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

Mine228 commented 6 years ago

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

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

Mine228 commented 6 years ago

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

joeangry commented 6 years ago

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


From: Mince228 notifications@github.com 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 commented 6 years ago

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

Mine228 commented 6 years ago

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 commented 6 years ago

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.

joeangry commented 6 years ago

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
Mine228 commented 6 years ago

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.