mirror of https://github.com/PCSX2/pcsx2.git
Get bin2cpp to work on Linux. (Linux compilation is still broken.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1766 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
edd521182d
commit
6d25e55740
Binary file not shown.
|
@ -35,6 +35,19 @@
|
|||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if defined (__linux__) && !defined(__LINUX__) // some distributions are lower case
|
||||
#define __LINUX__
|
||||
#endif
|
||||
|
||||
#ifdef __LINUX__
|
||||
#define _stat stat
|
||||
#define _fcloseall fcloseall
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef char s8;
|
||||
|
||||
using namespace std;
|
||||
|
||||
static const unsigned int BUF_LEN = 1;
|
||||
|
@ -50,10 +63,6 @@ long getfilesize( const char* filename )
|
|||
return result.st_size;
|
||||
}
|
||||
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef char s8;
|
||||
|
||||
enum
|
||||
{
|
||||
ARG_SRCFILE = 1,
|
||||
|
@ -121,7 +130,12 @@ int main(int argc, char* argv[])
|
|||
char wxImgTypeLower[24];
|
||||
strcpy( wxImgTypeUpper, &srcfile[srcfn_len-3] );
|
||||
//strcpy( wxImgTypeLower, argv[ARG_IMGEXT] );
|
||||
#ifdef __LINUX__
|
||||
for (int i = 0; i < 24; i++)
|
||||
wxImgTypeUpper[i] = toupper(wxImgTypeUpper[i]);
|
||||
#else
|
||||
strupr( wxImgTypeUpper );
|
||||
#endif
|
||||
//strupr( wxImgTypeLower );
|
||||
|
||||
if( strcmp( wxImgTypeUpper, "JPG" ) == 0 )
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Probably self-explanatory: This batch file compiles a single souce image into a
|
||||
# CPP header file for use by pcsx2.
|
||||
#
|
||||
# bin2cpp.sh SrcImage
|
||||
#
|
||||
# Parameters
|
||||
# SrcImage - Complete filename with extension.
|
||||
#
|
||||
|
||||
../../../Tools/bin2cpp/bin2cpp %1
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
../../../Tools/bin2cpp/bin2cpp BackgroundLogo.png BackgroundLogo png_BackgroundLogo
|
||||
../../../Tools/bin2cpp/bin2cpp AppIcon.png AppIcon png_AppIcon
|
||||
|
||||
../../../Tools/bin2cpp/bin2cpp ConfigIcon_Cpu.png ConfigIcon_Cpu png_ConfigIcon_Cpu
|
||||
../../../Tools/bin2cpp/bin2cpp ConfigIcon_Paths.png ConfigIcon_Paths png_ConfigIcon_Paths
|
||||
../../../Tools/bin2cpp/bin2cpp ConfigIcon_Plugins.png ConfigIcon_Plugins png_ConfigIcon_Plugins
|
||||
../../../Tools/bin2cpp/bin2cpp ConfigIcon_Speedhacks.png ConfigIcon_Speedhacks png_ConfigIcon_Speedhacks
|
||||
../../../Tools/bin2cpp/bin2cpp ConfigIcon_Gamefixes.png ConfigIcon_Gamefixes png_ConfigIcon_Gamefixes
|
||||
../../../Tools/bin2cpp/bin2cpp ConfigIcon_Video.png ConfigIcon_Video png_ConfigIcon_Video
|
Loading…
Reference in New Issue