From 205c7c1782f579de922b24adbfd0de72fac8c868 Mon Sep 17 00:00:00 2001 From: "avihal@gmail.com" Date: Sun, 27 Mar 2011 04:06:33 +0000 Subject: [PATCH] First time wizard (both portable and install modes): 1. Create inis and bios folder before then can be accessed (e.g. configure plugins, open the bios folder via "open in explorer"). 2. Small fix for the "open in explorer" error dialog if a folder doesn't exist (path text was sometimes cut off) 3. Default base directory (AppRoot() - used for plugins/themes/langs) is now the pcsx2.exe folder and not CWD (probably only affects developers, but still nicer). git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4496 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/AppConfig.cpp | 9 +++++++-- pcsx2/gui/Panels/BaseApplicableConfigPanel.cpp | 6 ++++++ pcsx2/gui/Panels/DirPickerPanel.cpp | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index 14cb8552c9..21f74a862f 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -93,17 +93,22 @@ namespace PathDefs // Specifies the root folder for the application install. // (currently it's the CWD, but in the future I intend to move all binaries to a "bin" - // sub folder, in which case the approot will become "..") + // sub folder, in which case the approot will become "..") [- Air?] + + //The installer installs the folders which are relative to AppRoot (that's plugins/themes/langs) + // relative to the exe folder, and not relative to cwd. So the exe should be default AppRoot. - avih const wxDirName& AppRoot() { AffinityAssert_AllowFrom_MainUI(); - +/* if (InstallationMode == InstallMode_Registered) { static const wxDirName cwdCache( (wxDirName)Path::Normalize(wxGetCwd()) ); return cwdCache; } else if (InstallationMode == InstallMode_Portable) +*/ + if (InstallationMode == InstallMode_Registered || InstallationMode == InstallMode_Portable) { static const wxDirName appCache( (wxDirName) wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath() ); diff --git a/pcsx2/gui/Panels/BaseApplicableConfigPanel.cpp b/pcsx2/gui/Panels/BaseApplicableConfigPanel.cpp index bf844f936e..d1665e6828 100644 --- a/pcsx2/gui/Panels/BaseApplicableConfigPanel.cpp +++ b/pcsx2/gui/Panels/BaseApplicableConfigPanel.cpp @@ -83,6 +83,12 @@ bool ApplyStateStruct::ApplyPage( int pageid ) // Note: apply first, then save -- in case the apply fails. + if( !PathDefs::GetSettings().Exists() ) + PathDefs::GetSettings().Mkdir();//create the inis folder such that the plugins can be configured at the first time wizard. + + if( !PathDefs::GetBios().Exists() ) + PathDefs::GetBios().Mkdir();//create the bios folder such that it can be opened at the first time wizard without an error message. + AppApplySettings( &confcopy ); } catch( Exception::CannotApplySettings& ex ) diff --git a/pcsx2/gui/Panels/DirPickerPanel.cpp b/pcsx2/gui/Panels/DirPickerPanel.cpp index 7b1581fa27..919bea59f8 100644 --- a/pcsx2/gui/Panels/DirPickerPanel.cpp +++ b/pcsx2/gui/Panels/DirPickerPanel.cpp @@ -64,7 +64,7 @@ void Panels::DirPickerPanel::Explore_Click( wxCommandEvent &evt ) wxDialogWithHelpers createPathDlg( NULL, _("Path does not exist") ); createPathDlg.SetMinWidth( 600 ); - createPathDlg += createPathDlg.Text( path.ToString() ) | StdCenter(); + createPathDlg += createPathDlg.Label( path.ToString() ) | StdCenter(); createPathDlg += createPathDlg.Heading( pxE( "!Notice:DirPicker:CreatePath", L"The specified path/directory does not exist. Would you like to create it?" )