summaryrefslogtreecommitdiff
path: root/utils/build_res_list
diff options
context:
space:
mode:
Diffstat (limited to 'utils/build_res_list')
-rw-r--r--utils/build_res_list/StdAfx.cpp9
-rw-r--r--utils/build_res_list/StdAfx.h23
-rw-r--r--utils/build_res_list/build_res_list.cpp73
-rw-r--r--utils/build_res_list/build_res_list.dsp133
4 files changed, 238 insertions, 0 deletions
diff --git a/utils/build_res_list/StdAfx.cpp b/utils/build_res_list/StdAfx.cpp
new file mode 100644
index 0000000..3c4b26b
--- /dev/null
+++ b/utils/build_res_list/StdAfx.cpp
@@ -0,0 +1,9 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+// stdafx.cpp : source file that includes just the standard includes
+// build_res_list.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/utils/build_res_list/StdAfx.h b/utils/build_res_list/StdAfx.h
new file mode 100644
index 0000000..83262d7
--- /dev/null
+++ b/utils/build_res_list/StdAfx.h
@@ -0,0 +1,23 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__0BBD59F6_3493_4BAA_8F0F_5B599107F0EF__INCLUDED_)
+#define AFX_STDAFX_H__0BBD59F6_3493_4BAA_8F0F_5B599107F0EF__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+#include <stdio.h>
+
+// TODO: reference additional headers your program requires here
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__0BBD59F6_3493_4BAA_8F0F_5B599107F0EF__INCLUDED_)
diff --git a/utils/build_res_list/build_res_list.cpp b/utils/build_res_list/build_res_list.cpp
new file mode 100644
index 0000000..7a1ba5b
--- /dev/null
+++ b/utils/build_res_list/build_res_list.cpp
@@ -0,0 +1,73 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+// build_res_list.cpp : Defines the entry point for the console application.
+//
+
+#include "stdafx.h"
+#include <stdio.h>
+#include <io.h>
+#include <string.h>
+
+
+int PrintUsage()
+{
+ printf( "build_res_list <source directory> <output filename>\n" );
+ return 1;
+}
+
+
+void ScanDirectories_R( const char *pFullDir, const char *pRelDir, FILE *fp )
+{
+ char spec[512];
+ _snprintf( spec, sizeof( spec ), "%s\\*.*", pFullDir );
+
+ printf( "\"%s\"\n", pFullDir );
+
+ _finddata_t findInfo;
+ long handle = _findfirst( spec, &findInfo );
+ if ( handle != -1 )
+ {
+ do
+ {
+ if ( !stricmp( findInfo.name, "." ) || !stricmp( findInfo.name, ".." ) )
+ continue;
+
+ char fullName[512], relName[512];
+ _snprintf( fullName, sizeof( fullName ), "%s\\%s", pFullDir, findInfo.name );
+ _snprintf( relName, sizeof( relName ), "%s%s%s", pRelDir, (pRelDir[0] == 0) ? "" : "\\", findInfo.name );
+
+ if ( findInfo.attrib & _A_SUBDIR )
+ {
+ ScanDirectories_R( fullName, relName, fp );
+ }
+ else
+ {
+ fprintf( fp, "\"%s\"\n", relName );
+ }
+ } while ( !_findnext( handle, &findInfo ) );
+
+ _findclose( handle );
+ }
+}
+
+
+int main(int argc, char* argv[])
+{
+ if ( argc < 3 )
+ return PrintUsage();
+
+ const char *pSourceDir = argv[1];
+ const char *pOutputFilename = argv[2];
+
+ FILE *fp = fopen( pOutputFilename, "wt" );
+ if ( !fp )
+ {
+ printf( "Can't open %s for writing.\n", pOutputFilename );
+ return PrintUsage();
+ }
+
+ ScanDirectories_R( pSourceDir, "", fp );
+
+ fclose( fp );
+ return 0;
+}
+
diff --git a/utils/build_res_list/build_res_list.dsp b/utils/build_res_list/build_res_list.dsp
new file mode 100644
index 0000000..b09cfcb
--- /dev/null
+++ b/utils/build_res_list/build_res_list.dsp
@@ -0,0 +1,133 @@
+# Microsoft Developer Studio Project File - Name="build_res_list" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=build_res_list - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "build_res_list.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "build_res_list.mak" CFG="build_res_list - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "build_res_list - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "build_res_list - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "build_res_list - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# Begin Custom Build
+TargetPath=.\Release\build_res_list.exe
+InputPath=.\Release\build_res_list.exe
+SOURCE="$(InputPath)"
+
+"..\..\..\game\bin\build_res_list.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ if exist ..\..\..\game\bin\build_res_list.exe del /f ..\..\..\game\bin\build_res_list.exe
+ copy $(TargetPath) ..\..\..\game\bin
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "build_res_list - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# Begin Custom Build
+TargetPath=.\Debug\build_res_list.exe
+InputPath=.\Debug\build_res_list.exe
+SOURCE="$(InputPath)"
+
+"..\..\..\game\bin\build_res_list.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ if exist ..\..\..\game\bin\build_res_list.exe del /f ..\..\..\game\bin\build_res_list.exe
+ copy $(TargetPath) ..\..\..\game\bin
+
+# End Custom Build
+
+!ENDIF
+
+# Begin Target
+
+# Name "build_res_list - Win32 Release"
+# Name "build_res_list - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\build_res_list.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project