diff --git a/pcsx2/Linux/pcsx2-codeblocks.workspace b/pcsx2/Linux/pcsx2-codeblocks.workspace
index 7552db082f..fba05a9687 100644
--- a/pcsx2/Linux/pcsx2-codeblocks.workspace
+++ b/pcsx2/Linux/pcsx2-codeblocks.workspace
@@ -1,10 +1,11 @@
-
+
+
@@ -17,6 +18,7 @@
-
+
+
diff --git a/pcsx2/Linux/pcsx2.cbp b/pcsx2/Linux/pcsx2.cbp
index d0301f0096..b8891ee35f 100644
--- a/pcsx2/Linux/pcsx2.cbp
+++ b/pcsx2/Linux/pcsx2.cbp
@@ -12,6 +12,7 @@
+
@@ -299,13 +300,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -314,7 +360,6 @@
-
diff --git a/pcsx2/gui/Resources/rebuild.cmd b/pcsx2/gui/Resources/rebuild.cmd
index 044e4dc1e7..a26f0690fe 100644
--- a/pcsx2/gui/Resources/rebuild.cmd
+++ b/pcsx2/gui/Resources/rebuild.cmd
@@ -1,9 +1,9 @@
-..\..\..\tools\bin\bin2cpp BackgroundLogo.png BackgroundLogo png_BackgroundLogo
-..\..\..\tools\bin\bin2cpp AppIcon.png AppIcon png_AppIcon
+..\..\..\tools\bin\bin2cpp BackgroundLogo.png
+..\..\..\tools\bin\bin2cpp AppIcon.png
-..\..\..\tools\bin\bin2cpp ConfigIcon_Cpu.png ConfigIcon_Cpu png_ConfigIcon_Cpu
-..\..\..\tools\bin\bin2cpp ConfigIcon_Paths.png ConfigIcon_Paths png_ConfigIcon_Paths
-..\..\..\tools\bin\bin2cpp ConfigIcon_Plugins.png ConfigIcon_Plugins png_ConfigIcon_Plugins
-..\..\..\tools\bin\bin2cpp ConfigIcon_Speedhacks.png ConfigIcon_Speedhacks png_ConfigIcon_Speedhacks
-..\..\..\tools\bin\bin2cpp ConfigIcon_Gamefixes.png ConfigIcon_Gamefixes png_ConfigIcon_Gamefixes
-..\..\..\tools\bin\bin2cpp ConfigIcon_Video.png ConfigIcon_Video png_ConfigIcon_Video
\ No newline at end of file
+..\..\..\tools\bin\bin2cpp ConfigIcon_Cpu.png
+..\..\..\tools\bin\bin2cpp ConfigIcon_Paths.png
+..\..\..\tools\bin\bin2cpp ConfigIcon_Plugins.png
+..\..\..\tools\bin\bin2cpp ConfigIcon_Speedhacks.png
+..\..\..\tools\bin\bin2cpp ConfigIcon_Gamefixes.png
+..\..\..\tools\bin\bin2cpp ConfigIcon_Video.png
diff --git a/pcsx2/gui/Resources/rebuild.sh b/pcsx2/gui/Resources/rebuild.sh
index 9bb9b22432..48c4a0417b 100755
--- a/pcsx2/gui/Resources/rebuild.sh
+++ b/pcsx2/gui/Resources/rebuild.sh
@@ -1,12 +1,12 @@
#!/bin/sh
-../../../Tools/bin2cpp/bin2cpp BackgroundLogo.png BackgroundLogo res_BackgroundLogo
-../../../Tools/bin2cpp/bin2cpp AppIcon.png AppIcon res_AppIcon
+../../../tools/bin/bin2cpp BackgroundLogo.png
+../../../tools/bin/bin2cpp AppIcon.png
-../../../Tools/bin2cpp/bin2cpp ConfigIcon_Cpu.png ConfigIcon_Cpu res_ConfigIcon_Cpu
-../../../Tools/bin2cpp/bin2cpp ConfigIcon_Paths.png ConfigIcon_Paths res_ConfigIcon_Paths
-../../../Tools/bin2cpp/bin2cpp ConfigIcon_Plugins.png ConfigIcon_Plugins res_ConfigIcon_Plugins
-../../../Tools/bin2cpp/bin2cpp ConfigIcon_Speedhacks.png ConfigIcon_Speedhacks res_ConfigIcon_Speedhacks
-../../../Tools/bin2cpp/bin2cpp ConfigIcon_Gamefixes.png ConfigIcon_Gamefixes res_ConfigIcon_Gamefixes
-../../../Tools/bin2cpp/bin2cpp ConfigIcon_Video.png ConfigIcon_Video res_ConfigIcon_Video
-../../../Tools/bin2cpp/bin2cpp Dualshock.png Dualshock res_Dualshock
\ No newline at end of file
+../../../tools/bin/bin2cpp ConfigIcon_Cpu.png
+../../../tools/bin/bin2cpp ConfigIcon_Paths.png
+../../../tools/bin/bin2cpp ConfigIcon_Plugins.png
+../../../tools/bin/bin2cpp ConfigIcon_Speedhacks.png
+../../../tools/bin/bin2cpp ConfigIcon_Gamefixes.png
+../../../tools/bin/bin2cpp ConfigIcon_Video.png
+../../../tools/bin/bin2cpp Dualshock.png
diff --git a/plugins/GSnull/Linux/GSnull.layout b/plugins/GSnull/Linux/GSnull.layout
index 2c138ec151..2d25a373ad 100644
--- a/plugins/GSnull/Linux/GSnull.layout
+++ b/plugins/GSnull/Linux/GSnull.layout
@@ -8,6 +8,6 @@
-
+
diff --git a/plugins/SPU2null/Linux/SPU2null.layout b/plugins/SPU2null/Linux/SPU2null.layout
index b31f24fea8..02b0e4bf02 100644
--- a/plugins/SPU2null/Linux/SPU2null.layout
+++ b/plugins/SPU2null/Linux/SPU2null.layout
@@ -1,7 +1,7 @@
-
+
diff --git a/pcsx2/gui/Resources/bin2app.sh b/tools/bin2app.sh
similarity index 87%
rename from pcsx2/gui/Resources/bin2app.sh
rename to tools/bin2app.sh
index 3829442b18..6c1c0a20ce 100755
--- a/pcsx2/gui/Resources/bin2app.sh
+++ b/tools/bin2app.sh
@@ -9,4 +9,4 @@
# SrcImage - Complete filename with extension.
#
-../../../Tools/bin2cpp/bin2cpp %1
\ No newline at end of file
+$1/tools/bin/bin2cpp $2
diff --git a/tools/bin2cpp/bin2cpp b/tools/bin2cpp/bin2cpp
deleted file mode 100755
index d86c610766..0000000000
Binary files a/tools/bin2cpp/bin2cpp and /dev/null differ
diff --git a/tools/bin2cpp/bin2cpp.cbp b/tools/bin2cpp/bin2cpp.cbp
new file mode 100644
index 0000000000..7f215c772a
--- /dev/null
+++ b/tools/bin2cpp/bin2cpp.cbp
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/bin2cpp/bin2cpp.cpp b/tools/bin2cpp/bin2cpp.cpp
index 37cb704411..8aa2f5b5f4 100644
--- a/tools/bin2cpp/bin2cpp.cpp
+++ b/tools/bin2cpp/bin2cpp.cpp
@@ -57,7 +57,7 @@ static const unsigned int LINE = 16;
long getfilesize( const char* filename )
{
struct stat result;
-
+
stat( filename, &result );
return result.st_size;
}
@@ -76,7 +76,6 @@ int main(int argc, char* argv[])
s8 Dummy[260];
s8 srcfile[260];
s8 classname[260];
- int c;
if ( (argc <= ARG_SRCFILE) )
{
@@ -122,7 +121,7 @@ int main(int argc, char* argv[])
printf( "ERROR : I can't find source file %s\n", srcfile );
return 20;
}
-
+
const int filesize( getfilesize( srcfile ) );
char wxImgTypeUpper[24];
@@ -143,7 +142,7 @@ int main(int argc, char* argv[])
// ----------------------------------------------------------------------------
// Determine Target Name, and Open Target File for Writing
// ----------------------------------------------------------------------------
-
+
strcpy( Dummy, argv[(argc <= ARG_DESTFILE) ? ARG_SRCFILE : ARG_DESTFILE] );
strcat( Dummy,".h" );
@@ -154,18 +153,33 @@ int main(int argc, char* argv[])
(void)fcloseall();
return 0L;
}
-
+
// ----------------------------------------------------------------------------
-
+
printf( "Bin2CPP Output > %s\n", Dummy );
-
+
+ const char* fnameonly = NULL;
if( argc <= ARG_CLASSNAME )
{
+ fnameonly = argv[(argc <= ARG_DESTFILE) ? ARG_SRCFILE : ARG_DESTFILE];
strcpy( classname, "res_" );
- strcat( classname, argv[(argc <= ARG_DESTFILE) ? ARG_SRCFILE : ARG_DESTFILE] );
}
else
- strcpy( classname, argv[ARG_CLASSNAME] );
+ {
+ fnameonly = argv[ARG_CLASSNAME];
+ classname[0] = 0;
+ }
+
+ {
+ int len = strlen(fnameonly);
+ const char* fnlast = &fnameonly[len];
+ while( --fnlast, --len, (len >= 0 && (*fnlast != '/')) );
+
+ fnameonly = fnlast+1;
+ }
+
+ strcpy( classname, "res_" );
+ strcat( classname, fnameonly );
/* It writes the header information */
@@ -193,10 +207,10 @@ int main(int argc, char* argv[])
do
{
fprintf(dest,"\t");
- for ( c=0; c <= LINE; ++c )
+ for ( unsigned int c=0; c <= LINE; ++c )
{
if( fread( buffer, 1, 1, source ) == 0 ) break;
-
+
if( c != 0 )
fprintf( dest, "," );
fprintf( dest,"0x%02x", *buffer );