Changeset 227
- Timestamp:
- 03/18/08 12:47:38 (4 months ago)
- Files:
-
- GtkRadiant/branches/ZeroRadiant/libs/missing.h (modified) (4 diffs)
- GtkRadiant/branches/ZeroRadiant/plugins/image/bmp.h (modified) (2 diffs)
- GtkRadiant/branches/ZeroRadiant/plugins/image/image.vcproj (modified) (2 diffs)
- GtkRadiant/branches/ZeroRadiant/plugins/image/jpeg.cpp (modified) (1 diff)
- GtkRadiant/branches/ZeroRadiant/radiant/missing.cpp (modified) (4 diffs)
- GtkRadiant/branches/ZeroRadiant/radiant/preferences.cpp (modified) (1 diff)
- GtkRadiant/branches/ZeroRadiant/radiant/radiant.vcproj (modified) (2 diffs)
- GtkRadiant/branches/ZeroRadiant/tools/quake3/common/imagelib.h (modified) (1 diff)
- GtkRadiant/branches/ZeroRadiant/tools/quake3/q3map2/q3map2.vcproj (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/branches/ZeroRadiant/libs/missing.h
r197 r227 35 35 // this goes along with str.h and provides various utility classes 36 36 // and portability defines 37 // the file name is a legecy issue, it would be better to clean that up37 // the file name (missing.h) is a legacy issue, it would be better to clean that up 38 38 // in a central 'portability' lib 39 39 … … 42 42 43 43 #ifdef _WIN32 44 45 #include <windows.h> 44 46 #include <direct.h> 45 47 #include <io.h> 46 47 #define MyCopyFile(a,b) CopyFile(a,b,FALSE) 48 49 #define S_ISDIR(mode) (mode & _S_IFDIR) 48 #include <sys/types.h> 49 #include <sys/stat.h> 50 50 51 #define R_OK 04 51 #define mymkdir(a,b) _mkdir(a) 52 53 #else 54 55 #define MyCopyFile CopyFile 56 #define mymkdir(a,b) mkdir(a,b) 57 58 #endif 59 60 #ifndef _WIN32 52 53 #else // !_WIN32 61 54 62 55 // LZ: very ugly hacks 63 inline int GetLastError () { return 0; };56 inline int GetLastError() { return 0; }; 64 57 65 58 // temp stuff … … 67 60 #define VERIFY(a) a; 68 61 int GetFullPathName(const char *lpFileName, int nBufferLength, char *lpBuffer, char **lpFilePart); 69 bool CopyFile(const char *lpExistingFileName, const char *lpNewFileName);70 bool CopyTree( const char* source, const char* dest );71 62 72 63 #ifndef APIENTRY … … 211 202 }; 212 203 204 class FindFiles { 205 public: 206 FindFiles( const char *directory ); 207 ~FindFiles(); 208 209 const char* NextFile(); 210 private: 211 #ifdef _WIN32 212 Str directory; 213 HANDLE findHandle; 214 WIN32_FIND_DATA findFileData; 215 #else 216 #endif 217 }; 218 219 bool CopyTree( const char* source, const char* dest ); 220 221 typedef enum { 222 PATH_FAIL, // stat call failed (does not exist is likely) 223 PATH_DIRECTORY, 224 PATH_FILE 225 } EPathCheck; 226 227 // check a path for existence, return directory / file 228 EPathCheck CheckFile( const char *path ); 229 230 bool radCreateDirectory( const char *directory ); 231 bool radCopyFile( const char *lpExistingFileName, const char *lpNewFileName ); 232 213 233 #endif // _MISSING_H_ GtkRadiant/branches/ZeroRadiant/plugins/image/bmp.h
r183 r227 30 30 #define BMP_SIGNATURE_WORD 0x4d42 31 31 32 #pragma pack(push) 32 33 #pragma pack(1) 33 34 35 34 36 35 typedef struct { … … 97 96 void NewBMP(int width, int height, int bpp, bitmap_t *bit); 98 97 99 98 #pragma pack(pop) 100 99 101 100 #endif GtkRadiant/branches/ZeroRadiant/plugins/image/image.vcproj
r177 r227 1 <?xml version="1.0" ?><VisualStudioProject Name="image" ProjectGUID="{1F9977F6-216F-4AE1-9928-59B72CF31C46}" ProjectType="Visual C++" RootNamespace="image" Version="8.00"> 1 <?xml version="1.0" encoding="Windows-1252"?> 2 <VisualStudioProject 3 ProjectType="Visual C++" 4 Version="8.00" 5 Name="image" 6 ProjectGUID="{1F9977F6-216F-4AE1-9928-59B72CF31C46}" 7 RootNamespace="image" 8 > 2 9 <Platforms> 3 <Platform Name="Win32"/> 10 <Platform 11 Name="Win32" 12 /> 4 13 </Platforms> 5 14 <ToolFiles> 6 15 </ToolFiles> 7 16 <Configurations> 8 <Configuration CharacterSet="2" ConfigurationType="2" IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)" Name="Debug|Win32" OutputDirectory="$(SolutionDir)\build\$(ConfigurationName)\modules"> 9 <Tool Name="VCPreBuildEventTool"/> 10 <Tool Name="VCCustomBuildTool"/> 11 <Tool Name="VCXMLDataGeneratorTool"/> 12 <Tool Name="VCWebServiceProxyGeneratorTool"/> 13 <Tool Name="VCMIDLTool"/> 14 <Tool AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2\include"" BasicRuntimeChecks="3" DebugInformationFormat="4" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" MinimalRebuild="true" Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="3" WarningLevel="3"/> 15 <Tool Name="VCManagedResourceCompilerTool"/> 16 <Tool Name="VCResourceCompilerTool"/> 17 <Tool Name="VCPreLinkEventTool"/> 18 <Tool AdditionalDependencies="jpeg6.lib synapse.lib libxml2.lib glib-2.0.lib gobject-2.0.lib" AdditionalLibraryDirectories=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs"" GenerateDebugInformation="true" ModuleDefinitionFile="image.def" Name="VCLinkerTool" TargetMachine="1"/> 19 <Tool Name="VCALinkTool"/> 20 <Tool Name="VCManifestTool"/> 21 <Tool Name="VCXDCMakeTool"/> 22 <Tool Name="VCBscMakeTool"/> 23 <Tool Name="VCFxCopTool"/> 24 <Tool Name="VCAppVerifierTool"/> 25 <Tool Name="VCWebDeploymentTool"/> 26 <Tool Name="VCPostBuildEventTool"/> 17 <Configuration 18 Name="Debug|Win32" 19 OutputDirectory="$(SolutionDir)\build\$(ConfigurationName)\modules" 20 IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)" 21 ConfigurationType="2" 22 CharacterSet="2" 23 > 24 <Tool 25 Name="VCPreBuildEventTool" 26 /> 27 <Tool 28 Name="VCCustomBuildTool" 29 /> 30 <Tool 31 Name="VCXMLDataGeneratorTool" 32 /> 33 <Tool 34 Name="VCWebServiceProxyGeneratorTool" 35 /> 36 <Tool 37 Name="VCMIDLTool" 38 /> 39 <Tool 40 Name="VCCLCompilerTool" 41 Optimization="0" 42 AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2\include"" 43 PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" 44 MinimalRebuild="true" 45 BasicRuntimeChecks="3" 46 RuntimeLibrary="3" 47 WarningLevel="3" 48 Detect64BitPortabilityProblems="true" 49 DebugInformationFormat="4" 50 DisableSpecificWarnings="4996;4244;4267" 51 /> 52 <Tool 53 Name="VCManagedResourceCompilerTool" 54 /> 55 <Tool 56 Name="VCResourceCompilerTool" 57 /> 58 <Tool 59 Name="VCPreLinkEventTool" 60 /> 61 <Tool 62 Name="VCLinkerTool" 63 AdditionalDependencies=" synapse.lib libxml2.lib glib-2.0.lib gobject-2.0.lib libjpeg.lib" 64 AdditionalLibraryDirectories=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs";"$(SolutionDir)\..\jpeg-6b"" 65 ModuleDefinitionFile="image.def" 66 GenerateDebugInformation="true" 67 TargetMachine="1" 68 /> 69 <Tool 70 Name="VCALinkTool" 71 /> 72 <Tool 73 Name="VCManifestTool" 74 /> 75 <Tool 76 Name="VCXDCMakeTool" 77 /> 78 <Tool 79 Name="VCBscMakeTool" 80 /> 81 <Tool 82 Name="VCFxCopTool" 83 /> 84 <Tool 85 Name="VCAppVerifierTool" 86 /> 87 <Tool 88 Name="VCWebDeploymentTool" 89 /> 90 <Tool 91 Name="VCPostBuildEventTool" 92 /> 27 93 </Configuration> 28 <Configuration CharacterSet="2" ConfigurationType="2" IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)" Name="Release|Win32" OutputDirectory="$(SolutionDir)\build\$(ConfigurationName)\modules" WholeProgramOptimization="1"> 29 <Tool Name="VCPreBuildEventTool"/> 30 <Tool Name="VCCustomBuildTool"/> 31 <Tool Name="VCXMLDataGeneratorTool"/> 32 <Tool Name="VCWebServiceProxyGeneratorTool"/> 33 <Tool Name="VCMIDLTool"/> 34 <Tool AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2\include"" DebugInformationFormat="3" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" Name="VCCLCompilerTool" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="2" WarningLevel="3"/> 35 <Tool Name="VCManagedResourceCompilerTool"/> 36 <Tool Name="VCResourceCompilerTool"/> 37 <Tool Name="VCPreLinkEventTool"/> 38 <Tool AdditionalDependencies="jpeg6.lib synapse.lib libxml2.lib glib-2.0.lib gobject-2.0.lib" AdditionalLibraryDirectories=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs"" EnableCOMDATFolding="2" GenerateDebugInformation="true" ModuleDefinitionFile="image.def" Name="VCLinkerTool" OptimizeReferences="2" TargetMachine="1"/> 39 <Tool Name="VCALinkTool"/> 40 <Tool Name="VCManifestTool"/> 41 <Tool Name="VCXDCMakeTool"/> 42 <Tool Name="VCBscMakeTool"/> 43 <Tool Name="VCFxCopTool"/> 44 <Tool Name="VCAppVerifierTool"/> 45 <Tool Name="VCWebDeploymentTool"/> 46 <Tool Name="VCPostBuildEventTool"/> 94 <Configuration 95 Name="Release|Win32" 96 OutputDirectory="$(SolutionDir)\build\$(ConfigurationName)\modules" 97 IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)" 98 ConfigurationType="2" 99 CharacterSet="2" 100 WholeProgramOptimization="1" 101 > 102 <Tool 103 Name="VCPreBuildEventTool" 104 /> 105 <Tool 106 Name="VCCustomBuildTool" 107 /> 108 <Tool 109 Name="VCXMLDataGeneratorTool" 110 /> 111 <Tool 112 Name="VCWebServiceProxyGeneratorTool" 113 /> 114 <Tool 115 Name="VCMIDLTool" 116 /> 117 <Tool 118 Name="VCCLCompilerTool" 119 AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2\include"" 120 PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" 121 RuntimeLibrary="2" 122 WarningLevel="3" 123 Detect64BitPortabilityProblems="true" 124 DebugInformationFormat="3" 125 DisableSpecificWarnings="4996;4244;4267" 126 /> 127 <Tool 128 Name="VCManagedResourceCompilerTool" 129 /> 130 <Tool 131 Name="VCResourceCompilerTool" 132 /> 133 <Tool 134 Name="VCPreLinkEventTool" 135 /> 136 <Tool 137 Name="VCLinkerTool" 138 AdditionalDependencies="synapse.lib libxml2.lib glib-2.0.lib gobject-2.0.lib libjpeg.lib" 139 AdditionalLibraryDirectories=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs";"$(SolutionDir)\..\jpeg-6b"" 140 ModuleDefinitionFile="image.def" 141 GenerateDebugInformation="true" 142 OptimizeReferences="2" 143 EnableCOMDATFolding="2" 144 TargetMachine="1" 145 /> 146 <Tool 147 Name="VCALinkTool" 148 /> 149 <Tool 150 Name="VCManifestTool" 151 /> 152 <Tool 153 Name="VCXDCMakeTool" 154 /> 155 <Tool 156 Name="VCBscMakeTool" 157 /> 158 <Tool 159 Name="VCFxCopTool" 160 /> 161 <Tool 162 Name="VCAppVerifierTool" 163 /> 164 <Tool 165 Name="VCWebDeploymentTool" 166 /> 167 <Tool 168 Name="VCPostBuildEventTool" 169 /> 47 170 </Configuration> 48 171 </Configurations> … … 50 173 </References> 51 174 <Files> 52 <Filter Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;f90;for;f;fpp" Name="Source Files"> 53 <File RelativePath=".\bmp.cpp"> 54 </File> 55 <File RelativePath=".\image.cpp"> 56 </File> 57 <File RelativePath=".\image.def"> 58 </File> 59 <File RelativePath=".\jpeg.cpp"> 60 </File> 61 <File RelativePath=".\lbmlib.cpp"> 175 <Filter 176 Name="Source Files" 177 Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;f90;for;f;fpp" 178 > 179 <File 180 RelativePath=".\bmp.cpp" 181 > 182 </File> 183 <File 184 RelativePath=".\image.cpp" 185 > 186 </File> 187 <File 188 RelativePath=".\image.def" 189 > 190 </File> 191 <File 192 RelativePath=".\jpeg.cpp" 193 > 194 <FileConfiguration 195 Name="Debug|Win32" 196 > 197 <Tool 198 Name="VCCLCompilerTool" 199 AdditionalIncludeDirectories=""$(SolutionDir)\..\jpeg-6b"" 200 /> 201 </FileConfiguration> 202 <FileConfiguration 203 Name="Release|Win32" 204 > 205 <Tool 206 Name="VCCLCompilerTool" 207 AdditionalIncludeDirectories=""$(SolutionDir)\..\jpeg-6b"" 208 /> 209 </FileConfiguration> 210 </File> 211 <File 212 RelativePath=".\lbmlib.cpp" 213 > 62 214 </File> 63 215 </Filter> 64 <Filter Filter="h;hpp;hxx;hm;inl;fi;fd" Name="Header Files"> 65 <File RelativePath=".\bmp.h"> 66 </File> 67 <File RelativePath=".\image.h"> 68 </File> 69 <File RelativePath="..\..\libs\jpeglib.h"> 70 </File> 71 <File RelativePath=".\lbmlib.h"> 216 <Filter 217 Name="Header Files" 218 Filter="h;hpp;hxx;hm;inl;fi;fd" 219 > 220 <File 221 RelativePath=".\bmp.h" 222 > 223 </File> 224 <File 225 RelativePath=".\image.h" 226 > 227 </File> 228 <File 229 RelativePath="..\..\libs\jpeglib.h" 230 > 231 </File> 232 <File 233 RelativePath=".\lbmlib.h" 234 > 72 235 </File> 73 236 </Filter> 74 <Filter Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" Name="Resource Files"> 237 <Filter 238 Name="Resource Files" 239 Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 240 > 75 241 </Filter> 76 242 </Files> GtkRadiant/branches/ZeroRadiant/plugins/image/jpeg.cpp
r193 r227 35 35 // 36 36 37 #include <stdio.h> 37 38 #include <setjmp.h> 38 39 #include <stdlib.h> 39 #include <stdio.h>40 40 #include <string.h> 41 41 #include <glib.h> 42 42 43 extern "C" { 43 44 #include <jpeglib.h> 44 45 #include <jerror.h> 46 } 45 47 46 48 #include "image.h" GtkRadiant/branches/ZeroRadiant/radiant/missing.cpp
r198 r227 35 35 // 36 36 37 // FIXME: compile on Windows as well 37 #include "missing.h" 38 #include "qsysprintf.h" 39 38 40 #if defined (__linux__) || defined (__APPLE__) 39 41 … … 45 47 #include <stdlib.h> 46 48 #include <dirent.h> 47 #include "missing.h" 48 #include "qsysprintf.h" 49 50 bool CopyFile(const char *lpExistingFileName, const char *lpNewFileName) 49 50 bool radCopyFile(const char *lpExistingFileName, const char *lpNewFileName) 51 51 { 52 52 FILE *src, *dst; … … 86 86 } 87 87 88 bool CreateDirectory( const char *directory ) {88 bool radCreateDirectory( const char *directory ) { 89 89 if ( mkdir( directory, 0777 ) == -1 ) { 90 90 Sys_Printf( "mkdir %s failed\n", directory ); 91 91 return false; 92 }93 return true;94 }95 96 bool CopyTree( const char *source, const char *dest ) {97 DIR *dir;98 struct dirent *dirlist;99 struct stat sbuf;100 Str srcEntry;101 Str dstEntry;102 103 dir = opendir( source );104 if ( dir != NULL ) {105 while ( ( dirlist = readdir( dir ) ) != NULL ) {106 if ( strcmp( dirlist->d_name, "." ) == 0 || strcmp( dirlist->d_name, ".." ) == 0 ) {107 continue;108 }109 if ( strcmp( dirlist->d_name, ".svn" ) == 0 ) {110 continue;111 }112 srcEntry = source;113 srcEntry += "/";114 srcEntry += dirlist->d_name;115 dstEntry = dest;116 dstEntry += "/";117 dstEntry += dirlist->d_name;118 if ( stat( srcEntry.GetBuffer(), &sbuf ) == -1 ) {119 Sys_Printf( "stat %s failed\n", srcEntry.GetBuffer() );120 }121 if ( S_ISDIR( sbuf.st_mode ) ) {122 bool ret;123 if ( stat( dstEntry.GetBuffer(), &sbuf ) == -1 ) {124 ret = CreateDirectory( dstEntry.GetBuffer() );125 }126 ret = CopyTree( srcEntry.GetBuffer(), dstEntry.GetBuffer() );127 if ( !ret ) {128 return false;129 }130 } else {131 Sys_Printf( "copy %s -> %s\n", srcEntry.GetBuffer(), dstEntry.GetBuffer() );132 bool ret = CopyFile( srcEntry.GetBuffer(), dstEntry.GetBuffer() );133 if ( !ret ) {134 return false;135 }136 }137 }138 closedir( dir );139 92 } 140 93 return true; … … 179 132 } 180 133 134 EPathCheck CheckFile( const char *path ) { 135 struct stat sbuf; 136 if ( stat( path, &sbuf ) == -1 ) { 137 return PATH_FAIL; 138 } 139 if ( S_ISDIR( sbuf.st_mode ) ) { 140 return PATH_DIRECTORY; 141 } 142 return PATH_FILE; 143 } 144 145 #else 146 147 FindFiles::FindFiles( const char *_directory ) { 148 directory = _directory; 149 findHandle = INVALID_HANDLE_VALUE; 150 } 151 152 FindFiles::~FindFiles() { 153 if ( findHandle != NULL ) { 154 FindClose( findHandle ); 155 } 156 } 157 158 const char* FindFiles::NextFile() { 159 if ( findHandle == INVALID_HANDLE_VALUE ) { 160 findHandle = FindFirstFile( directory.GetBuffer(), &findFileData ); 161 if ( findHandle == INVALID_HANDLE_VALUE ) { 162 return NULL; 163 } 164 return findFileData.cFileName; 165 } 166 if ( FindNextFile( findHandle, &findFileData ) == 0 ) { 167 FindClose( findHandle ); 168 return NULL; 169 } 170 return findFileData.cFileName; 171 } 172 173 EPathCheck CheckFile( const char *path ) { 174 struct _stat sbuf; 175 if ( _stat( path, &sbuf ) == -1 ) { 176 return PATH_FAIL; 177 } 178 if ( ( sbuf.st_mode & _S_IFDIR ) != 0 ) { 179 return PATH_DIRECTORY; 180 } 181 return PATH_FILE; 182 } 183 184 bool radCreateDirectory( const char *directory ) { 185 return CreateDirectory( directory, NULL ); 186 } 187 188 bool radCopyFile( const char *lpExistingFileName, const char *lpNewFileName ) { 189 return CopyFile( lpExistingFileName, lpNewFileName, FALSE ); 190 } 191 181 192 #endif 193 194 bool CopyTree( const char *source, const char *dest ) { 195 Str srcEntry; 196 Str dstEntry; 197 const char *dirname; 198 FindFiles fileScan( source ); 199 200 while ( ( dirname = fileScan.NextFile() ) != NULL ) { 201 if ( strcmp( dirname, "." ) == 0 || strcmp( dirname, ".." ) == 0 ) { 202 continue; 203 } 204 if ( strcmp( dirname, ".svn" ) == 0 ) { 205 continue; 206 } 207 srcEntry = source; 208 srcEntry += "/"; 209 srcEntry += dirname; 210 dstEntry = dest; 211 dstEntry += "/"; 212 dstEntry += dirname; 213 switch ( CheckFile( srcEntry.GetBuffer() ) ) { 214 case PATH_DIRECTORY: { 215 if ( CheckFile( dstEntry.GetBuffer() ) == PATH_FAIL ) { 216 radCreateDirectory( dstEntry.GetBuffer() ); 217 } 218 bool ret; 219 ret = CopyTree( srcEntry.GetBuffer(), dstEntry.GetBuffer() ); 220 if ( !ret ) { 221 return false; 222 } 223 break; 224 } 225 case PATH_FILE: { 226 Sys_Printf( "copy %s -> %s\n", srcEntry.GetBuffer(), dstEntry.GetBuffer() ); 227 bool ret = radCopyFile( srcEntry.GetBuffer(), dstEntry.GetBuffer() ); 228 if ( !ret ) { 229 return false; 230 } 231 break; 232 } 233 } 234 } 235 return true; 236 } GtkRadiant/branches/ZeroRadiant/radiant/preferences.cpp
r224 r227 3283 3283 void CGameInstall::ScanGames() { 3284 3284 Str pakPaths = g_strAppPath.GetBuffer(); 3285 DIR *dir;3286 struct dirent *dirlist;3287 3285 int iGame = 0; 3286 const char *dirname; 3288 3287 3289 3288 pakPaths += "installs/"; 3290 dir = opendir( pakPaths.GetBuffer() ); 3291 if ( dir != NULL ) { 3292 while ( ( dirlist = readdir( dir ) ) != NULL ) { 3293 if ( stricmp( dirlist->d_name, Q3_PACK ) == 0 ) { 3294 m_availGames[ iGame++ ] = GAME_Q3; 3295 } 3296 if ( stricmp( dirlist->d_name, URT_PACK ) == 0 ) { 3297 m_availGames[ iGame++ ] = GAME_URT; 3298 } 3299 if ( stricmp( dirlist->d_name, UFOAI_PACK ) == 0 ) { 3300 m_availGames[ iGame++ ] = GAME_UFOAI; 3301 } 3289 FindFiles fileScan( pakPaths.GetBuffer() ); 3290 while ( ( dirname = fileScan.NextFile() ) != NULL ) { 3291 if ( stricmp( dirname, Q3_PACK ) == 0 ) { 3292 m_availGames[ iGame++ ] = GAME_Q3; 3302 3293 } 3303 closedir( dir ); 3294 if ( stricmp( dirname, URT_PACK ) == 0 ) { 3295 m_availGames[ iGame++ ] = GAME_URT; 3296 } 3304 3297 } 3305 3298 } 3299 GtkRadiant/branches/ZeroRadiant/radiant/radiant.vcproj
r179 r227 1 <?xml version="1.0" ?><VisualStudioProject Name="radiant" ProjectGUID="{65D02375-63EE-4A8A-9F8E-504B1D5A1D02}" ProjectType="Visual C++" RootNamespace="radiant" Version="8.00"> 1 <?xml version="1.0" encoding="Windows-1252"?> 2 <VisualStudioProject 3 ProjectType="Visual C++" 4 Version="8.00" 5 Name="radiant" 6 ProjectGUID="{65D02375-63EE-4A8A-9F8E-504B1D5A1D02}" 7 RootNamespace="radiant" 8 > 2 9 <Platforms> 3 <Platform Name="Win32"/> 10 <Platform 11 Name="Win32" 12 /> 4 13 </Platforms> 5 14 <ToolFiles> 6 15 </ToolFiles> 7 16 <Configurations> 8 <Configuration CharacterSet="2" ConfigurationType="1" IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)" Name="Debug|Win32" OutputDirectory="$(SolutionDir)\build\$(ConfigurationName)"> 9 <Tool Name="VCPreBuildEventTool"/> 10 <Tool Name="VCCustomBuildTool"/> 11 <Tool Name="VCXMLDataGeneratorTool"/> 12 <Tool Name="VCWebServiceProxyGeneratorTool"/> 13 <Tool Name="VCMIDLTool"/> 14 <Tool AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtk-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include";"$(SolutionDir)\..\gtk2\include\gtk-2.0";"$(SolutionDir)\..\gtk2\include\cairo";"$(SolutionDir)\..\gtk2\include\pango-1.0";"$(SolutionDir)\..\gtk2\include\atk-1.0";"$(SolutionDir)\..\gtk2\include\gtkglext-1.0";"$(SolutionDir)\..\libxml2\include"" BasicRuntimeChecks="3" DebugInformationFormat="4" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" MinimalRebuild="true" Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="3" WarningLevel="3"/> 15 <Tool Name="VCManagedResourceCompilerTool"/> 16 <Tool Name="VCResourceCompilerTool"/> 17 <Tool Name="VCPreLinkEventTool"/> 18 <Tool AdditionalDependencies="l_net.lib cmdlib.lib mathlib.lib Wsock32.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.0.lib pango-1.0.lib" AdditionalLibraryDirectories=""$(SolutionDir)\..\libxml2\lib";"$(SolutionDir)\..\gtk2\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs"" GenerateDebugInformation="true" Name="VCLinkerTool" TargetMachine="1"/> 19 <Tool Name="VCALinkTool"/> 20 <Tool Name="VCManifestTool"/> 21 <Tool Name="VCXDCMakeTool"/> 22 <Tool Name="VCBscMakeTool"/> 23 <Tool Name="VCFxCopTool"/> 24 <Tool Name="VCAppVerifierTool"/> 25 <Tool Name="VCWebDeploymentTool"/> 26 <Tool Name="VCPostBuildEventTool"/> 17 <Configuration 18 Name="Debug|Win32" 19 OutputDirectory="$(SolutionDir)\build\$(ConfigurationName)" 20 IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)" 21 ConfigurationType="1" 22 CharacterSet="2" 23 > 24 <Tool 25 Name="VCPreBuildEventTool" 26 /> 27 <Tool 28 Name="VCCustomBuildTool" 29 /> 30 <Tool 31 Name="VCXMLDataGeneratorTool" 32 /> 33 <Tool 34 Name="VCWebServiceProxyGeneratorTool" 35 /> 36 <Tool 37 Name="VCMIDLTool" 38 /> 39 <Tool 40 Name="VCCLCompilerTool" 41 Optimization="0" 42 AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtk-2.0\include";"$(SolutionDir)\..\gtk2\lib\gtkglext-1.0\include";"$(SolutionDir)\..\gtk2\include\gtk-2.0";"$(SolutionDir)\..\gtk2\include\cairo";"$(SolutionDir)\..\gtk2\include\pango-1.0";"$(SolutionDir)\..\gtk2\include\atk-1.0";"$(SolutionDir)\..\gtk2\include\gtkglext-1.0";"$(SolutionDir)\..\libxml2\include"" 43 PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" 44 MinimalRebuild="true" 45 BasicRuntimeChecks="3" 46 RuntimeLibrary="3" 47 WarningLevel="3" 48 Detect64BitPortabilityProblems="true" 49 DebugInformationFormat="4" 50 DisableSpecificWarnings="4996;4244;4267" 51 /> 52 <Tool 53 Name="VCManagedResourceCompilerTool" 54 /> 55 <Tool 56 Name="VCResourceCompilerTool" 57 /> 58 <Tool 59 Name="VCPreLinkEventTool" 60 /> 61 <Tool 62 Name="VCLinkerTool" 63 AdditionalDependencies="l_net.lib cmdlib.lib mathlib.lib Wsock32.lib libxml2.lib glib-2.0.lib gobject-2.0.lib gdk-win32-2.0.lib gtk-win32-2.0.lib gtkglext-win32-1.0.lib gdkglext-win32-1.
