Commit a0210bb7 authored by PA-ROGS\whitrail's avatar PA-ROGS\whitrail
Browse files

2023.02.10 - 3.0.36 MR B23021401.F4 /

 - 프로그램 폴더 정리
 - MicrosoftEdgeWebview2Setup.exe 설치 추가 >> 폰트매니저 설치 종료 후 진행
 - 윈도우 버전 체크 >> 현재 윈도우 10 이전 버전 지원하지 않는 것으로 안내 >> 다른 OS 테스트 필요
 -
parent 8bb20d4f
......@@ -12,6 +12,7 @@
#define MyAppProcessName "FontManager"
#define MyAppRootPath "{userappdata}\..\Local\hanyang"
#define MyAppWindowName "FontbadaManager"
#define MyAppFilter "fontmanager.exe"
[Setup]
......@@ -31,7 +32,7 @@ SolidCompression = yes
DisableProgramGroupPage = yes
SetupIconFile = fontmanager.ico
LicenseFile = License.txt
WizardImageFile = image.bmp
WizardImageFile = wizard.bmp
DisableReadyPage = yes
AppCopyright = Copyright ⓒ 2017 by (주)한양정보통신 All Rights Reserved.
VersionInfoVersion = 1.0.0.0
......@@ -47,23 +48,24 @@ Name: Korean; MessagesFile: "Korean.isl";
[Files]
;실행 파일
Source: "FontManager.exe"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FontManager.exe.config"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FONTBADA_UPDATER.exe"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\"; Flags: ignoreversion
; 실행 파일
Source: "FontManager/FontManager.exe"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FontManager/FontManager.exe.config"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FontManager/FONTBADA_UPDATER.exe"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\"; Flags: ignoreversion
Source: "FontManager/MicrosoftEdgeWebview2Setup.exe"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\"; Flags: ignoreversion
;추가 라이브러리
Source: "Newtonsoft.Json.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "Microsoft.Web.WebView2.Core.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "Microsoft.Web.WebView2.WinForms.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "Microsoft.Web.WebView2.Wpf.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "runtimes\win-arm64\native\WebView2Loader.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\runtimes\win-arm64\native\"; Flags: ignoreversion
Source: "runtimes\win-x64\native\WebView2Loader.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\runtimes\win-x64\native\"; Flags: ignoreversion
Source: "runtimes\win-x86\native\WebView2Loader.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\runtimes\win-x86\native\"; Flags: ignoreversion
; 추가 라이브러리
Source: "FontManager/Newtonsoft.Json.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FontManager/Microsoft.Web.WebView2.Core.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FontManager/Microsoft.Web.WebView2.WinForms.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FontManager/Microsoft.Web.WebView2.Wpf.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FontManager/runtimes\win-arm64\native\WebView2Loader.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\runtimes\win-arm64\native\"; Flags: ignoreversion
Source: "FontManager/runtimes\win-x64\native\WebView2Loader.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\runtimes\win-x64\native\"; Flags: ignoreversion
Source: "FontManager/runtimes\win-x86\native\WebView2Loader.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\runtimes\win-x86\native\"; Flags: ignoreversion
;폰트 파일
; 폰트 파일
;Source: "fonts/H2BDAB.TTF"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\down\"; Flags: ignoreversion
;Source: "fonts/H2BDAL.TTF"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\down\"; Flags: ignoreversion
;Source: "fonts/H2BDAM.TTF"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\down\"; Flags: ignoreversion
......@@ -344,6 +346,10 @@ type
TProcessEntryList = array of TProcessEntry;
var
ExitCode: Boolean;
function GetProcessList(const Filter: string; out List: TProcessEntryList): Integer;
var
I: Integer;
......@@ -382,7 +388,7 @@ var
Filter: string;
ProcessList: TProcessEntryList;
begin
Filter := 'fontmanager.exe';
Filter := '{#MyAppFilter}';
Result := false;
if GetProcessList(Filter, ProcessList) > 0 then
for I := 0 to (GetArrayLength(ProcessList) - 1) do
......@@ -410,6 +416,15 @@ begin
end;
function IsWindowsVersionOrNewer(Major, Minor: Integer): Boolean;
var
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
Result := (Version.Major > Major) or ((Version.Major = Major) and (Version.Minor >= Minor));
end;
function IsUpgrade: Boolean;
begin
Result := (GetUninstallString() <> '');
......@@ -422,34 +437,67 @@ begin
end;
procedure DeinitializeSetup();
var
ResultCode: Integer;
begin
// Log(Format('DeinitializeSetup ExitCode %d', [ExitCode]));
if ExitCode = True then
begin
MsgBox('프로그램의 정상적인 동작을 위해 Microsoft Edge Webview2 런타임을 설치합니다. 설치에 다소 시간이 소요될 수 있습니다.', mbInformation, MB_OK);
Exec(ExpandConstant('{#MyAppRootPath}\{#MyAppDataName}\MicrosoftEdgeWebview2Setup.exe'), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
end;
end;
function InitializeSetup: Boolean;
var
V: Integer;
iResultCode: Integer;
sUnInstallString: string;
ResultCode: Integer;
UnInstallString: string;
begin
Result := True;
Result := True;
ExitCode := True;
if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{A2670E5F-4D34-4042-A9C5-5A3BC9547B37}_is1', 'UninstallString') then
begin
if IsFontbadaManagerRunning() and RunProcesss() then
// 윈도우즈 버전 확인 및 안내
if not IsWindowsVersionOrNewer(10, 0) then
begin
V := MsgBox('이 프로그램은 Windows 10 이전 OS에서 정상 동작하지 않을 수 있습니다. 설치하시겠습니까?', mbCriticalError, MB_YESNO);
if V = IDNO then
begin
Result := False;
end
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;
Result := False;
ExitCode := False;
end
else
begin
V := MsgBox(ExpandConstant('이전 버전 폰트바다 매니저가 존재합니다. 삭제 후 설치를 권장합니다. 진행하시겠습니까?'), mbConfirmation, MB_YESNO);
if V = IDYES then
begin
sUnInstallString := GetUninstallString();
sUnInstallString := RemoveQuotes(sUnInstallString);
Exec(ExpandConstant(sUnInstallString), '', '', SW_SHOW, ewWaitUntilTerminated, iResultCode);
UnInstallString := GetUninstallString();
UnInstallString := RemoveQuotes(UnInstallString);
Exec(ExpandConstant(UnInstallString), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
Result := True;
end
else
begin
MsgBox('삭제 및 설치를 종료합니다.', mbError, MB_OK);
Result := False;
Result := False;
ExitCode := False;
end;
end;
end;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment