Remove all traces of local configuration support ("portable application") in non-Windows builds. Closes #856.
Originally committed to SVN as r3011.
This commit is contained in:
parent
4b986b5a53
commit
390fb2d03c
2 changed files with 12 additions and 3 deletions
|
@ -114,8 +114,8 @@ DialogOptions::DialogOptions(wxWindow *parent)
|
||||||
AddCheckBox(generalPage,genSizer4,_("Show Splash Screen"),_T("Show splash"));
|
AddCheckBox(generalPage,genSizer4,_("Show Splash Screen"),_T("Show splash"));
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
AddCheckBox(generalPage,genSizer4,_("Auto Check for Updates"),_T("Auto check for updates"));
|
AddCheckBox(generalPage,genSizer4,_("Auto Check for Updates"),_T("Auto check for updates"));
|
||||||
#endif
|
|
||||||
AddCheckBox(generalPage,genSizer4,_("Save config.dat locally"),_T("Local config"));
|
AddCheckBox(generalPage,genSizer4,_("Save config.dat locally"),_T("Local config"));
|
||||||
|
#endif
|
||||||
genSizer4->AddGrowableCol(0,1);
|
genSizer4->AddGrowableCol(0,1);
|
||||||
|
|
||||||
genSizer1->Add(genSizer4,1,wxEXPAND|wxALL,5);
|
genSizer1->Add(genSizer4,1,wxEXPAND|wxALL,5);
|
||||||
|
@ -904,11 +904,15 @@ void DialogOptions::WriteToOptions(bool justApply) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save options
|
// Save options
|
||||||
|
#ifdef __WXMSW__
|
||||||
if (Options.AsBool(_T("Local config"))) Options.SetFile(StandardPaths::DecodePath(_T("?data/config.dat")));
|
if (Options.AsBool(_T("Local config"))) Options.SetFile(StandardPaths::DecodePath(_T("?data/config.dat")));
|
||||||
else {
|
else {
|
||||||
|
#endif
|
||||||
Options.SetFile(StandardPaths::DecodePath(_T("?user/config.dat")));
|
Options.SetFile(StandardPaths::DecodePath(_T("?user/config.dat")));
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxRemoveFile(StandardPaths::DecodePath(_T("?data/config.dat")));
|
wxRemoveFile(StandardPaths::DecodePath(_T("?data/config.dat")));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
Options.Save();
|
Options.Save();
|
||||||
|
|
||||||
// Need restart?
|
// Need restart?
|
||||||
|
|
|
@ -153,13 +153,18 @@ bool AegisubApp::OnInit() {
|
||||||
|
|
||||||
// Set config file
|
// Set config file
|
||||||
StartupLog(_T("Load configuration"));
|
StartupLog(_T("Load configuration"));
|
||||||
Options.SetFile(StandardPaths::DecodePath(_T("?data/config.dat")));
|
|
||||||
Options.LoadDefaults();
|
Options.LoadDefaults();
|
||||||
|
#ifndef __WXMSW__
|
||||||
|
Options.SetFile(StandardPaths::DecodePath(_T("?data/config.dat")));
|
||||||
Options.Load();
|
Options.Load();
|
||||||
if (!Options.AsBool(_T("Local config"))) {
|
if (!Options.AsBool(_T("Local config")))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
Options.SetFile(StandardPaths::DecodePath(_T("?user/config.dat")));
|
Options.SetFile(StandardPaths::DecodePath(_T("?user/config.dat")));
|
||||||
Options.Load();
|
Options.Load();
|
||||||
|
#ifndef __WXMSW__
|
||||||
wxRemoveFile(StandardPaths::DecodePath(_T("?data/config.dat")));
|
wxRemoveFile(StandardPaths::DecodePath(_T("?data/config.dat")));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
StartupLog(_T("Store options back"));
|
StartupLog(_T("Store options back"));
|
||||||
Options.SetInt(_T("Last Version"),GetSVNRevision());
|
Options.SetInt(_T("Last Version"),GetSVNRevision());
|
||||||
|
|
Loading…
Reference in a new issue