installer now defaults to center of primary monitor
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401732
This commit is contained in:
parent
6545c3e08c
commit
d5ddb0ce79
@ -143,6 +143,19 @@ bool CopyStructureRecursively(ICopyMethod *pCopyMethod,
|
|||||||
/* Now copy folders */
|
/* Now copy folders */
|
||||||
while ((pSubList = pFileList->PeekCurrentFolder()) != NULL)
|
while ((pSubList = pFileList->PeekCurrentFolder()) != NULL)
|
||||||
{
|
{
|
||||||
|
if (g_thread_args.m_bIsUpgrade)
|
||||||
|
{
|
||||||
|
/* :TODO: put this somewhere else because it technically
|
||||||
|
* means the progress bars get calculated wrong
|
||||||
|
*/
|
||||||
|
if (tstrcasecmp(pSubList->GetFolderName(), _T("cfg")) == 0
|
||||||
|
|| tstrcasecmp(pSubList->GetFolderName(), _T("configs")) == 0)
|
||||||
|
{
|
||||||
|
pFileList->PopCurrentFolder();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Try creating the folder */
|
/* Try creating the folder */
|
||||||
if (!pCopyMethod->CreateFolder(pSubList->GetFolderName(), errbuf, maxchars))
|
if (!pCopyMethod->CreateFolder(pSubList->GetFolderName(), errbuf, maxchars))
|
||||||
{
|
{
|
||||||
@ -270,15 +283,17 @@ bool StartInstallProcess(HWND hWnd)
|
|||||||
{
|
{
|
||||||
int val = MessageBox(
|
int val = MessageBox(
|
||||||
hWnd,
|
hWnd,
|
||||||
_T("It looks like a previous SourceMod installation exists. Do you want to upgrade? Select \"Yes\" to upgrade and keep configuration files. Select \"No\" to perform a full re-install."),
|
_T("It looks like a previous SourceMod installation exists. Select \"Yes\" to skip copying configuration files. Select \"No\" to perform a full re-install."),
|
||||||
_T("SourceMod Installer"),
|
_T("SourceMod Installer"),
|
||||||
MB_YESNO|MB_ICONQUESTION);
|
MB_YESNO|MB_ICONQUESTION);
|
||||||
|
|
||||||
if (val == 0 || val == IDYES)
|
if (val == 0 || val == IDYES)
|
||||||
{
|
{
|
||||||
|
g_thread_args.m_bIsUpgrade = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
g_thread_args.m_bIsUpgrade = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,13 +2,22 @@
|
|||||||
#include "Welcome.h"
|
#include "Welcome.h"
|
||||||
#include "ChooseMethod.h"
|
#include "ChooseMethod.h"
|
||||||
|
|
||||||
|
bool g_bIsFirstRun = true;
|
||||||
|
|
||||||
INT_PTR CALLBACK WelcomeHandler(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
INT_PTR CALLBACK WelcomeHandler(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
{
|
||||||
|
if (!g_bIsFirstRun)
|
||||||
{
|
{
|
||||||
SetToGlobalPosition(hDlg);
|
SetToGlobalPosition(hDlg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_bIsFirstRun = false;
|
||||||
|
}
|
||||||
return (INT_PTR)TRUE;
|
return (INT_PTR)TRUE;
|
||||||
}
|
}
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
@ -68,7 +68,7 @@ END
|
|||||||
//
|
//
|
||||||
|
|
||||||
IDD_WELCOME DIALOGEX 0, 0, 244, 74
|
IDD_WELCOME DIALOGEX 0, 0, 244, 74
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_APPWINDOW
|
EXSTYLE WS_EX_APPWINDOW
|
||||||
CAPTION "SourceMod Installer"
|
CAPTION "SourceMod Installer"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
|
Loading…
Reference in New Issue
Block a user