Skip to content
Snippets Groups Projects
Commit c5f192b3 authored by rswindell's avatar rswindell
Browse files

Uses the new scfg.new_install flag to recognize a fresh install and to run the

configuration wizard with blank data.
parent 57f19428
No related branches found
No related tags found
No related merge requests found
......@@ -149,7 +149,7 @@ void __fastcall TConfigWizard::FormShow(TObject *Sender)
return;
}
if(MainForm->FirstRun) {
if(scfg.new_install) {
TIME_ZONE_INFORMATION tz;
memset(&tz,0,sizeof(tz));
GetTimeZoneInformation(&tz);
......@@ -314,13 +314,13 @@ void __fastcall TConfigWizard::NextButtonClick(TObject *Sender)
scfg.sys_misc&=~SM_USRVDELM;
}
scfg.new_install=FALSE;
if(!save_cfg(&scfg,5)) {
Application->MessageBox("Error saving configuration"
,"ERROR",MB_OK|MB_ICONEXCLAMATION);
} else
refresh_cfg(&scfg);
MainForm->FirstRun=false;
Close();
return;
}
......
......@@ -597,7 +597,6 @@ __fastcall TMainForm::TMainForm(TComponent* Owner)
NodeDisplayInterval=1; /* seconds */
ClientDisplayInterval=5; /* seconds */
Initialized=false;
FirstRun=false;
char* p;
if((p=getenv("SBBSCTRL"))!=NULL)
......@@ -1454,8 +1453,6 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
if(Registry->ValueExists("AnswerSound"))
SAFECOPY(bbs_startup.answer_sound
,Registry->ReadString("AnswerSound").c_str());
else
FirstRun=true;
if(Registry->ValueExists("HangupSound"))
SAFECOPY(bbs_startup.hangup_sound
......@@ -1634,7 +1631,7 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
tzset();
}
if(FirstRun) {
if(cfg.new_install) {
Application->BringToFront();
Sleep(3000); // Let 'em see the logo for a bit
BBSConfigWizardMenuItemClick(Sender);
......
......@@ -345,7 +345,6 @@ public: // User declarations
bool ServicesAutoStart;
bool MailLogFile;
bool FtpLogFile;
bool FirstRun;
AnsiString CtrlDirectory;
AnsiString Hostname;
AnsiString LoginCommand;
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment