mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Linux: I made Sconscript call wx-config inside of the main SConstruct, added a nowx argument, Made the filesystemviewer use the correct struct and fixed a silly scissor error that was made
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@589 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
66011849cd
commit
720efb825d
17
SConstruct
17
SConstruct
@ -1,4 +1,5 @@
|
|||||||
# -*- python -*-
|
# -*- python -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -82,6 +83,7 @@ vars.AddVariables(
|
|||||||
BoolVariable('verbose', 'Set for compilation line', False),
|
BoolVariable('verbose', 'Set for compilation line', False),
|
||||||
BoolVariable('debug', 'Set for debug build', False),
|
BoolVariable('debug', 'Set for debug build', False),
|
||||||
BoolVariable('lint', 'Set for lint build (extra warnings)', False),
|
BoolVariable('lint', 'Set for lint build (extra warnings)', False),
|
||||||
|
BoolVariable('nowx', 'Set For Building with no WX libs', False),
|
||||||
EnumVariable('flavor', 'Choose a build flavor', 'release',
|
EnumVariable('flavor', 'Choose a build flavor', 'release',
|
||||||
allowed_values=('release', 'devel', 'debug'),
|
allowed_values=('release', 'devel', 'debug'),
|
||||||
ignorecase=2)
|
ignorecase=2)
|
||||||
@ -104,6 +106,17 @@ if bool(lint):
|
|||||||
warnings.append('unreachable-code')
|
warnings.append('unreachable-code')
|
||||||
warnings.append('float-equal')
|
warnings.append('float-equal')
|
||||||
|
|
||||||
|
nowx = ARGUMENTS.get('nowx', 0)
|
||||||
|
if int(nowx):
|
||||||
|
WxCppFlags = ''
|
||||||
|
WxLibFlags = ''
|
||||||
|
else:
|
||||||
|
WxCppFlags = os.popen('wx-config --cppflags').read()
|
||||||
|
if WxCppFlags[-1] == "\n":
|
||||||
|
WxCppFlags = WxCppFlags[:-1]
|
||||||
|
WxLibFlags = os.popen('wx-config --libs').read()
|
||||||
|
if WxLibFlags[-1] == "\n":
|
||||||
|
WxLibFlags = WxLibFlags[:-1]
|
||||||
|
|
||||||
compileFlags += [ '-W' + warning for warning in warnings ]
|
compileFlags += [ '-W' + warning for warning in warnings ]
|
||||||
|
|
||||||
@ -115,7 +128,9 @@ env = Environment(
|
|||||||
CPPDEFINES = cppDefines,
|
CPPDEFINES = cppDefines,
|
||||||
CPPPATH = include_paths,
|
CPPPATH = include_paths,
|
||||||
LIBPATH = lib_paths,
|
LIBPATH = lib_paths,
|
||||||
variables = vars,
|
variables = vars,
|
||||||
|
WXCPPFLAGS = WxCppFlags,
|
||||||
|
WXLIBFLAGS = WxLibFlags,
|
||||||
ENV = {
|
ENV = {
|
||||||
'PATH' : os.environ['PATH'],
|
'PATH' : os.environ['PATH'],
|
||||||
'HOME' : os.environ['HOME']
|
'HOME' : os.environ['HOME']
|
||||||
|
@ -18,14 +18,14 @@ files = ["LogWindow.cpp",
|
|||||||
wxenv = env.Clone()
|
wxenv = env.Clone()
|
||||||
wxenv.Append(
|
wxenv.Append(
|
||||||
CXXFLAGS = ' ' + ' '.join([
|
CXXFLAGS = ' ' + ' '.join([
|
||||||
'`wx-config --cppflags`',
|
env['WXCPPFLAGS'],
|
||||||
'-DUSE_XPM_BITMAPS',
|
'-DUSE_XPM_BITMAPS',
|
||||||
'-DwxNEEDS_CHARPP'
|
'-DwxNEEDS_CHARPP'
|
||||||
]),
|
]),
|
||||||
LINKFLAGS = ' ' + ' '.join([
|
LINKFLAGS = ' ' + ' '.join([
|
||||||
'-L/usr/local/lib',
|
'-L/usr/local/lib',
|
||||||
'-pthread',
|
'-pthread',
|
||||||
'`wx-config --libs --debug`'
|
env['WXLIBFLAGS'],
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
wxenv.StaticLibrary("debwx", files, LIBS = [ "common" ])
|
wxenv.StaticLibrary("debwx", files, LIBS = [ "common" ])
|
||||||
|
@ -22,6 +22,16 @@
|
|||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
|
// file info of an FST entry
|
||||||
|
struct SFileInfo
|
||||||
|
{
|
||||||
|
u32 m_NameOffset;
|
||||||
|
u64 m_Offset;
|
||||||
|
u32 m_FileSize;
|
||||||
|
char m_FullPath[512];
|
||||||
|
|
||||||
|
bool IsDirectory() {return((m_NameOffset& 0xFF000000) != 0 ? true : false);}
|
||||||
|
};
|
||||||
class IFileSystem
|
class IFileSystem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -23,16 +23,6 @@
|
|||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|
||||||
// file info of an FST entry
|
|
||||||
struct SFileInfo
|
|
||||||
{
|
|
||||||
u32 m_NameOffset;
|
|
||||||
u64 m_Offset;
|
|
||||||
u32 m_FileSize;
|
|
||||||
char m_FullPath[512];
|
|
||||||
|
|
||||||
bool IsDirectory() {return((m_NameOffset& 0xFF000000) != 0 ? true : false);}
|
|
||||||
};
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
class IVolume
|
class IVolume
|
||||||
|
@ -41,7 +41,7 @@ CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* paren
|
|||||||
{
|
{
|
||||||
OpenIso = DiscIO::CreateVolumeFromFilename(fileName);
|
OpenIso = DiscIO::CreateVolumeFromFilename(fileName);
|
||||||
pFileSystem = DiscIO::CreateFileSystem(*OpenIso);
|
pFileSystem = DiscIO::CreateFileSystem(*OpenIso);
|
||||||
std::vector<SFileInfo> Our_Files;
|
std::vector<DiscIO::SFileInfo> Our_Files;
|
||||||
pFileSystem->GetFileList(&Our_Files);
|
pFileSystem->GetFileList(&Our_Files);
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ libs = [
|
|||||||
wxenv = env.Clone()
|
wxenv = env.Clone()
|
||||||
wxenv.Append(
|
wxenv.Append(
|
||||||
CXXFLAGS = ' ' + ' '.join([
|
CXXFLAGS = ' ' + ' '.join([
|
||||||
'`wx-config --cppflags`',
|
env['WXCPPFLAGS'],
|
||||||
'-DUSE_XPM_BITMAPS',
|
'-DUSE_XPM_BITMAPS',
|
||||||
'-DwxNEEDS_CHARPP',
|
'-DwxNEEDS_CHARPP',
|
||||||
'`sdl-config --cflags`',
|
'`sdl-config --cflags`',
|
||||||
@ -32,7 +32,7 @@ wxenv.Append(
|
|||||||
LINKFLAGS = ' ' + ' '.join([
|
LINKFLAGS = ' ' + ' '.join([
|
||||||
'-L/usr/local/lib',
|
'-L/usr/local/lib',
|
||||||
'-pthread',
|
'-pthread',
|
||||||
'`wx-config --libs`',
|
env['WXLIBFLAGS'],
|
||||||
'`sdl-config --libs`'
|
'`sdl-config --libs`'
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
@ -561,9 +561,9 @@ void SetColorMask()
|
|||||||
|
|
||||||
bool SetScissorRect()
|
bool SetScissorRect()
|
||||||
{
|
{
|
||||||
int xoff = bpmem.scissorOffset.x*2-342;
|
int xoff = bpmem.scissorOffset.x * 2 - 342;
|
||||||
int yoff = bpmem.scissorOffset.y*2-342;
|
int yoff = bpmem.scissorOffset.y * 2 - 342;
|
||||||
//printf("xoff: %d yoff: %d\n", xoff, yoff);
|
|
||||||
RECT rc;
|
RECT rc;
|
||||||
rc.left = bpmem.scissorTL.x + xoff - 342;
|
rc.left = bpmem.scissorTL.x + xoff - 342;
|
||||||
rc.left *= MValueX;
|
rc.left *= MValueX;
|
||||||
@ -572,10 +572,10 @@ bool SetScissorRect()
|
|||||||
rc.top *= MValueY;
|
rc.top *= MValueY;
|
||||||
if (rc.top < 0) rc.top = 0;
|
if (rc.top < 0) rc.top = 0;
|
||||||
|
|
||||||
rc.right = bpmem.scissorBR.x + xoff - 342 +1;
|
rc.right = bpmem.scissorBR.x + xoff - 342;
|
||||||
rc.right *= MValueX;
|
rc.right *= MValueX;
|
||||||
if (rc.right > 640 * MValueX) rc.right = 640 * MValueX;
|
if (rc.right > 640 * MValueX) rc.right = 640 * MValueX;
|
||||||
rc.bottom = bpmem.scissorBR.y + yoff - 342 +1;
|
rc.bottom = bpmem.scissorBR.y + yoff - 342;
|
||||||
rc.bottom *= MValueY;
|
rc.bottom *= MValueY;
|
||||||
if (rc.bottom > 480 * MValueY) rc.bottom = 480 * MValueY;
|
if (rc.bottom > 480 * MValueY) rc.bottom = 480 * MValueY;
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ files = [
|
|||||||
]
|
]
|
||||||
compileFlags = [
|
compileFlags = [
|
||||||
'-fPIC',
|
'-fPIC',
|
||||||
'`wx-config --cppflags`',
|
env['WXCPPFLAGS'],
|
||||||
]
|
]
|
||||||
linkFlags = [
|
linkFlags = [
|
||||||
'`wx-config --libs`',
|
env['WXLIBFLAGS'],
|
||||||
]
|
]
|
||||||
libs = [
|
libs = [
|
||||||
'videocommon', 'common', 'GLEW',
|
'videocommon', 'common', 'GLEW',
|
||||||
|
@ -13,10 +13,10 @@ files = [
|
|||||||
padenv = env.Clone()
|
padenv = env.Clone()
|
||||||
padenv.Append(
|
padenv.Append(
|
||||||
CXXFLAGS = ' ' + ' '.join([
|
CXXFLAGS = ' ' + ' '.join([
|
||||||
'-fPIC', '`wx-config --cppflags`', '`pkg-config --cflags sdl`'
|
'-fPIC', env['WXCPPFLAGS'], '`pkg-config --cflags sdl`'
|
||||||
]),
|
]),
|
||||||
LINKFLAGS = ' ' + ' '.join([
|
LINKFLAGS = ' ' + ' '.join([
|
||||||
'`wx-config --libs`', '`pkg-config --libs sdl`'
|
env['WXLIBFLAGS'], '`pkg-config --libs sdl`'
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
padenv.SharedLibrary(output, files, LIBS = [ "common" ])
|
padenv.SharedLibrary(output, files, LIBS = [ "common" ])
|
||||||
|
@ -144,7 +144,7 @@ extern "C" void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
|||||||
extern "C" void DllAbout(HWND _hParent)
|
extern "C" void DllAbout(HWND _hParent)
|
||||||
{
|
{
|
||||||
wxAboutDialogInfo info;
|
wxAboutDialogInfo info;
|
||||||
info.SetName("Wiimote test plugin");
|
info.SetName(_T("Wiimote test plugin"));
|
||||||
info.AddDeveloper(_T("masken (masken3@gmail.com)"));
|
info.AddDeveloper(_T("masken (masken3@gmail.com)"));
|
||||||
info.SetDescription(_T("Wiimote test plugin"));
|
info.SetDescription(_T("Wiimote test plugin"));
|
||||||
wxAboutBox(info);
|
wxAboutBox(info);
|
||||||
|
@ -15,10 +15,10 @@ files = [
|
|||||||
padenv = env.Clone()
|
padenv = env.Clone()
|
||||||
padenv.Append(
|
padenv.Append(
|
||||||
CXXFLAGS = ' ' + ' '.join([
|
CXXFLAGS = ' ' + ' '.join([
|
||||||
'-fPIC', '`wx-config --cppflags`', '`pkg-config --cflags sdl`'
|
'-fPIC', env['WXCPPFLAGS'], '`pkg-config --cflags sdl`'
|
||||||
]),
|
]),
|
||||||
LINKFLAGS = ' ' + ' '.join([
|
LINKFLAGS = ' ' + ' '.join([
|
||||||
'`wx-config --libs`', '`pkg-config --libs sdl`'
|
env['WXLIBFLAGS'], '`pkg-config --libs sdl`'
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
padenv.SharedLibrary(output, files, LIBS = [ "common" ])
|
padenv.SharedLibrary(output, files, LIBS = [ "common" ])
|
||||||
|
Loading…
Reference in New Issue
Block a user