procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Result := True;
ExitCode := True;
if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{A2670E5F-4D34-4042-A9C5-5A3BC9547B37}_is1', 'UninstallString') then
begin
// 윈도우즈 버전 확인 및 안내
if not IsWindowsVersionOrNewer(10, 0) then
begin
V := MsgBox('이 프로그램은 Windows 10 이전 OS에서 정상 동작하지 않을 수 있습니다. 설치하시겠습니까?', mbCriticalError, MB_YESNO);
if V = IDNO then
begin
Result := False;
end
end
ExitCode := False;
end;
if Result = False then
begin
MsgBox('설치를 종료합니다.', mbError, MB_OK);
ExitCode := False;
Exit;
end
else if IsFontbadaManagerRunning() and RunProcesss() then
begin
MsgBox('폰트바다 매니저({#MyAppWindowName})가 실행 중입니다. 정상 종료(로그 아웃) 후 다시 실행해 주세요.', mbError, MB_OK);
Result := False;
ExitCode := False;
end
else
begin
V := MsgBox(ExpandConstant('이전 버전 폰트바다 매니저가 존재합니다. 삭제 후 설치를 권장합니다. 진행하시겠습니까?'), mbConfirmation, MB_YESNO);
if not IsWindowsVersionOrNewer({#MyAppMinOS}, 0) then
begin
MsgBox('이 프로그램은 Windows 10 이상을 지원합니다. 설치를 종료합니다.', mbCriticalError, MB_OK);
Result := False;
end;
end;
function CheckRunProcess: Boolean;
begin
Result := True;
if IsFontManagerProcesss and IsFontbadaManagerWindow then
begin
MsgBox('폰트바다 매니저({#MyAppWindowName})가 실행 중입니다. 정상 종료(로그 아웃) 후 다시 실행해 주세요.', mbCriticalError, MB_OK);
Result := False;
end;
end;
function InitializeSetup: Boolean;
var
ResultCode: Integer;
UnInstallString: string;
begin
ExitCode := False;
Result := False;
// 윈도우 버전 체크
if CheckOSVersion = False then
begin
Exit;
end
// 폰트바다 매니저 실행 상태 확인
if CheckRunProcess = False then
begin
Exit;
end
// 언인스톨러 확인
if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{A2670E5F-4D34-4042-A9C5-5A3BC9547B37}_is1', 'UninstallString') then
begin
MsgBox(ExpandConstant('이전 버전 폰트바다 매니저가 존재합니다. 삭제 후 설치를 진행합니다.'), mbInformation, MB_OK);