mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
Linux global build. At least the basic footwork is done here.
Basic usage: "sudo scons install=global install" Hopefully this doesn't break builds on Macs. I have tested this on linux and windows. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4994 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
|
||||
#include "VideoConfig.h"
|
||||
#include "../Globals.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
extern int g_Preset;
|
||||
|
||||
@ -65,7 +66,7 @@ void GFXDebuggerOGL::OnClose(wxCloseEvent& event)
|
||||
void GFXDebuggerOGL::SaveSettings() const
|
||||
{
|
||||
IniFile file;
|
||||
file.Load(DEBUGGER_CONFIG_FILE);
|
||||
file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
// TODO: make this work when we close the entire program too, currently on total close we get
|
||||
// weird values, perhaps because of some conflict with the rendering window
|
||||
@ -90,13 +91,13 @@ void GFXDebuggerOGL::SaveSettings() const
|
||||
|
||||
file.Set("VideoWindow", "ConfBits", g_Config.iLog);
|
||||
|
||||
file.Save(DEBUGGER_CONFIG_FILE);
|
||||
file.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
}
|
||||
|
||||
void GFXDebuggerOGL::LoadSettings()
|
||||
{
|
||||
IniFile file;
|
||||
file.Load(DEBUGGER_CONFIG_FILE);
|
||||
file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
int x = 100, y = 100, w = 100, h = 100;
|
||||
file.Get("VideoWindow", "x", &x, GetPosition().x);
|
||||
|
@ -292,10 +292,10 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||
m_ReloadShader = new wxButton(m_PageGeneral, ID_RELOADSHADER, wxT("&Reload"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_EditShader = new wxButton(m_PageGeneral, ID_EDITSHADER, wxT("&Edit"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
if (File::IsDirectory("User/Shaders"))
|
||||
if (File::IsDirectory(File::GetUserPath(D_SHADERS_IDX)))
|
||||
{
|
||||
File::FSTEntry entry;
|
||||
File::ScanDirectoryTree("User/Shaders", entry);
|
||||
File::ScanDirectoryTree(File::GetUserPath(D_SHADERS_IDX), entry);
|
||||
for (u32 i = 0; i < entry.children.size(); i++)
|
||||
{
|
||||
std::string name = entry.children[i].virtualName.c_str();
|
||||
@ -306,7 +306,7 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
||||
}
|
||||
else
|
||||
{
|
||||
File::CreateDir("User/Shaders");
|
||||
File::CreateDir(File::GetUserPath(D_SHADERS_IDX));
|
||||
}
|
||||
|
||||
wxString shader= wxString::FromAscii(g_Config.sPostProcessingShader.c_str());
|
||||
@ -547,7 +547,7 @@ void GFXConfigDialogOGL::EditShaderClick(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
if (m_PostShaderCB->GetStringSelection() == wxT("(off)"))
|
||||
return;
|
||||
wxString shader = wxT("User/Shaders/") + m_PostShaderCB->GetStringSelection() + _(".txt");
|
||||
wxString shader = wxString::FromAscii(File::GetUserPath(D_SHADERS_IDX)) + m_PostShaderCB->GetStringSelection() + _(".txt");
|
||||
if (wxFileExists(shader))
|
||||
{
|
||||
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("txt"));
|
||||
@ -737,7 +737,7 @@ void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
|
||||
void GFXConfigDialogOGL::CloseWindow()
|
||||
{
|
||||
// Save the config to INI
|
||||
g_Config.Save(FULL_CONFIG_DIR "gfx_opengl.ini");
|
||||
g_Config.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_opengl.ini").c_str());
|
||||
|
||||
EndModal(1);
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ void Show()
|
||||
/*
|
||||
bool bVideoWindow = false;
|
||||
IniFile ini;
|
||||
ini.Load(DEBUGGER_CONFIG_FILE);
|
||||
ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
ini.Get("ShowOnStart", "VideoWindow", &bVideoWindow, false);
|
||||
if(bVideoWindow) DoDllDebugger();
|
||||
*/
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "VertexShaderGen.h"
|
||||
#include "PixelShaderCache.h"
|
||||
#include "PixelShaderManager.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
static int s_nMaxPixelInstructions;
|
||||
static GLuint s_ColorMatrixProgram = 0;
|
||||
@ -204,7 +205,7 @@ FRAGMENTSHADER* PixelShaderCache::GetShader(bool dstAlphaEnable)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && code) {
|
||||
static int counter = 0;
|
||||
char szTemp[MAX_PATH];
|
||||
sprintf(szTemp, "%s/ps_%04i.txt", FULL_DUMP_DIR, counter++);
|
||||
sprintf(szTemp, "%sps_%04i.txt", File::GetUserPath(D_DUMP_IDX), counter++);
|
||||
|
||||
SaveData(szTemp, code);
|
||||
}
|
||||
|
@ -45,11 +45,11 @@ void ReloadShader()
|
||||
|
||||
bool ApplyShader()
|
||||
{
|
||||
if (s_currentShader != "User/Shaders/" + g_ActiveConfig.sPostProcessingShader + ".txt")
|
||||
if (s_currentShader != std::string(File::GetUserPath(D_SHADERS_IDX)) + g_ActiveConfig.sPostProcessingShader + ".txt")
|
||||
{
|
||||
// Set immediately to prevent endless recompiles on failure.
|
||||
if (!g_ActiveConfig.sPostProcessingShader.empty())
|
||||
s_currentShader = "User/Shaders/" + g_ActiveConfig.sPostProcessingShader + ".txt";
|
||||
s_currentShader = std::string(File::GetUserPath(D_SHADERS_IDX)) + g_ActiveConfig.sPostProcessingShader + ".txt";
|
||||
else
|
||||
s_currentShader.clear();
|
||||
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include <Cg/cg.h>
|
||||
#include <Cg/cgGL.h>
|
||||
|
||||
#include "FileUtil.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
@ -942,7 +944,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
else
|
||||
{
|
||||
OSD::AddMessage(StringFromFormat(
|
||||
"Dumping Frames to \"%s/framedump0.avi\" (%dx%d RGB24)", FULL_FRAMES_DIR, w, h).c_str(), 2000);
|
||||
"Dumping Frames to \"%sframedump0.avi\" (%dx%d RGB24)", File::GetUserPath(D_DUMPFRAMES_IDX), w, h).c_str(), 2000);
|
||||
}
|
||||
}
|
||||
if (s_bAVIDumping)
|
||||
@ -981,7 +983,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
glReadPixels(0, Renderer::GetTargetHeight() - h, w, h, GL_RGB, GL_UNSIGNED_BYTE, data);
|
||||
if (glGetError() == GL_NO_ERROR) {
|
||||
if (!s_bLastFrameDumped) {
|
||||
sprintf(movie_file_name, "%s/framedump.raw", FULL_FRAMES_DIR);
|
||||
sprintf(movie_file_name, "%sframedump.raw", File::GetUserPath(D_DUMPFRAMES_IDX));
|
||||
f_pFrameDump = fopen(movie_file_name, "wb");
|
||||
if (f_pFrameDump == NULL) {
|
||||
PanicAlert("Error opening framedump.raw for writing.");
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "ImageWrite.h"
|
||||
#include "Render.h"
|
||||
#include <math.h>
|
||||
#include "FileUtil.h"
|
||||
|
||||
namespace TextureConverter
|
||||
{
|
||||
@ -117,7 +118,7 @@ FRAGMENTSHADER &GetOrCreateEncodingShader(u32 format)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && shader) {
|
||||
static int counter = 0;
|
||||
char szTemp[MAX_PATH];
|
||||
sprintf(szTemp, "%s/enc_%04i.txt", FULL_DUMP_DIR, counter++);
|
||||
sprintf(szTemp, "%senc_%04i.txt", File::GetUserPath(D_DUMP_IDX), counter++);
|
||||
|
||||
SaveData(szTemp, shader);
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
||||
const char* uniqueId = globals->unique_id;
|
||||
bool bCheckedDumpDir = false;
|
||||
|
||||
sprintf(szDir,"%s/%s",FULL_DUMP_TEXTURES_DIR,uniqueId);
|
||||
sprintf(szDir,"%s%s",File::GetUserPath(D_DUMPTEXTURES_IDX), uniqueId);
|
||||
|
||||
if(!bCheckedDumpDir)
|
||||
{
|
||||
@ -728,7 +728,7 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool
|
||||
if (g_ActiveConfig.bDumpEFBTarget)
|
||||
{
|
||||
static int count = 0;
|
||||
SaveTexture(StringFromFormat("%s/efb_frame_%i.tga", FULL_DUMP_TEXTURES_DIR, count++).c_str(), GL_TEXTURE_RECTANGLE_ARB, entry.texture, entry.w, entry.h);
|
||||
SaveTexture(StringFromFormat("%sefb_frame_%i.tga", File::GetUserPath(D_DUMPTEXTURES_IDX), count++).c_str(), GL_TEXTURE_RECTANGLE_ARB, entry.texture, entry.w, entry.h);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "VertexManager.h"
|
||||
#include "IndexGenerator.h"
|
||||
#include "OpcodeDecoding.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
// internal state for loading vertices
|
||||
extern NativeVertexFormat *g_nativeVertexFmt;
|
||||
@ -278,7 +279,7 @@ void Flush()
|
||||
{
|
||||
// save the textures
|
||||
char strfile[255];
|
||||
sprintf(strfile, "%sframes/tex%.3d_%d.tga", FULL_DUMP_DIR, g_Config.iSaveTargetId, i);
|
||||
sprintf(strfile, "%stex%.3d_%d.tga", File::GetUserPath(D_DUMPFRAMES_IDX), g_Config.iSaveTargetId, i);
|
||||
SaveTexture(strfile, tentry->isRectangle?GL_TEXTURE_RECTANGLE_ARB:GL_TEXTURE_2D, tentry->texture, tentry->w, tentry->h);
|
||||
}
|
||||
}
|
||||
@ -332,10 +333,10 @@ void Flush()
|
||||
{
|
||||
// save the shaders
|
||||
char strfile[255];
|
||||
sprintf(strfile, "%sframes/ps%.3d.txt", FULL_DUMP_DIR, g_ActiveConfig.iSaveTargetId);
|
||||
sprintf(strfile, "%sps%.3d.txt", File::GetUserPath(D_DUMPFRAMES_IDX), g_ActiveConfig.iSaveTargetId);
|
||||
std::ofstream fps(strfile);
|
||||
fps << ps->strprog.c_str();
|
||||
sprintf(strfile, "%sframes/vs%.3d.txt", FULL_DUMP_DIR, g_ActiveConfig.iSaveTargetId);
|
||||
sprintf(strfile, "%svs%.3d.txt", File::GetUserPath(D_DUMPFRAMES_IDX), g_ActiveConfig.iSaveTargetId);
|
||||
std::ofstream fvs(strfile);
|
||||
fvs << vs->strprog.c_str();
|
||||
}
|
||||
@ -343,7 +344,7 @@ void Flush()
|
||||
if (g_ActiveConfig.iLog & CONF_SAVETARGETS)
|
||||
{
|
||||
char str[128];
|
||||
sprintf(str, "%sframes/targ%.3d.tga", FULL_DUMP_DIR, g_ActiveConfig.iSaveTargetId);
|
||||
sprintf(str, "%starg%.3d.tga", File::GetUserPath(D_DUMPFRAMES_IDX), g_ActiveConfig.iSaveTargetId);
|
||||
Renderer::SaveRenderTarget(str, Renderer::GetTargetWidth(), Renderer::GetTargetHeight());
|
||||
}
|
||||
#endif
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "VertexLoader.h"
|
||||
#include "XFMemory.h"
|
||||
#include "ImageWrite.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
VertexShaderCache::VSCache VertexShaderCache::vshaders;
|
||||
bool VertexShaderCache::s_displayCompileAlert;
|
||||
@ -169,7 +170,7 @@ VERTEXSHADER* VertexShaderCache::GetShader(u32 components)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && code) {
|
||||
static int counter = 0;
|
||||
char szTemp[MAX_PATH];
|
||||
sprintf(szTemp, "%s/vs_%04i.txt", FULL_DUMP_DIR, counter++);
|
||||
sprintf(szTemp, "%svs_%04i.txt", File::GetUserPath(D_DUMP_IDX), counter++);
|
||||
|
||||
SaveData(szTemp, code);
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ void CocaAddResolutions() {
|
||||
|
||||
void DllConfig(HWND _hParent)
|
||||
{
|
||||
g_Config.Load(FULL_CONFIG_DIR "gfx_opengl.ini");
|
||||
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_opengl.ini").c_str());
|
||||
g_Config.GameIniLoad(globals->game_ini);
|
||||
g_Config.UpdateProjectionHack();
|
||||
UpdateActiveConfig();
|
||||
@ -333,7 +333,7 @@ void Initialize(void *init)
|
||||
g_VideoInitialize = *(_pVideoInitialize);
|
||||
InitXFBConvTables();
|
||||
|
||||
g_Config.Load(FULL_CONFIG_DIR "gfx_opengl.ini");
|
||||
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_opengl.ini").c_str());
|
||||
g_Config.GameIniLoad(globals->game_ini);
|
||||
|
||||
g_Config.UpdateProjectionHack();
|
||||
|
Reference in New Issue
Block a user