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 @@ ...@@ -12,6 +12,7 @@
#define MyAppProcessName "FontManager" #define MyAppProcessName "FontManager"
#define MyAppRootPath "{userappdata}\..\Local\hanyang" #define MyAppRootPath "{userappdata}\..\Local\hanyang"
#define MyAppWindowName "FontbadaManager" #define MyAppWindowName "FontbadaManager"
#define MyAppFilter "fontmanager.exe"
[Setup] [Setup]
...@@ -31,7 +32,7 @@ SolidCompression = yes ...@@ -31,7 +32,7 @@ SolidCompression = yes
DisableProgramGroupPage = yes DisableProgramGroupPage = yes
SetupIconFile = fontmanager.ico SetupIconFile = fontmanager.ico
LicenseFile = License.txt LicenseFile = License.txt
WizardImageFile = image.bmp WizardImageFile = wizard.bmp
DisableReadyPage = yes DisableReadyPage = yes
AppCopyright = Copyright ⓒ 2017 by (주)한양정보통신 All Rights Reserved. AppCopyright = Copyright ⓒ 2017 by (주)한양정보통신 All Rights Reserved.
VersionInfoVersion = 1.0.0.0 VersionInfoVersion = 1.0.0.0
...@@ -47,23 +48,24 @@ Name: Korean; MessagesFile: "Korean.isl"; ...@@ -47,23 +48,24 @@ Name: Korean; MessagesFile: "Korean.isl";
[Files] [Files]
;실행 파일 ; 실행 파일
Source: "FontManager.exe"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion Source: "FontManager/FontManager.exe"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FontManager.exe.config"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion Source: "FontManager/FontManager.exe.config"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "FONTBADA_UPDATER.exe"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\"; 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: "FontManager/Newtonsoft.Json.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "Microsoft.Web.WebView2.Core.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion Source: "FontManager/Microsoft.Web.WebView2.Core.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "Microsoft.Web.WebView2.WinForms.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion Source: "FontManager/Microsoft.Web.WebView2.WinForms.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion
Source: "Microsoft.Web.WebView2.Wpf.dll"; DestDir: "{#MyAppRootPath}\{#MyAppFolderName}\"; Flags: ignoreversion Source: "FontManager/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: "FontManager/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: "FontManager/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/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/H2BDAB.TTF"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\down\"; Flags: ignoreversion
;Source: "fonts/H2BDAL.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 ;Source: "fonts/H2BDAM.TTF"; DestDir: "{#MyAppRootPath}\{#MyAppDataName}\down\"; Flags: ignoreversion
...@@ -344,6 +346,10 @@ type ...@@ -344,6 +346,10 @@ type
TProcessEntryList = array of TProcessEntry; TProcessEntryList = array of TProcessEntry;
var
ExitCode: Boolean;
function GetProcessList(const Filter: string; out List: TProcessEntryList): Integer; function GetProcessList(const Filter: string; out List: TProcessEntryList): Integer;
var var
I: Integer; I: Integer;
...@@ -382,7 +388,7 @@ var ...@@ -382,7 +388,7 @@ var
Filter: string; Filter: string;
ProcessList: TProcessEntryList; ProcessList: TProcessEntryList;
begin begin
Filter := 'fontmanager.exe'; Filter := '{#MyAppFilter}';
Result := false; Result := false;
if GetProcessList(Filter, ProcessList) > 0 then if GetProcessList(Filter, ProcessList) > 0 then
for I := 0 to (GetArrayLength(ProcessList) - 1) do for I := 0 to (GetArrayLength(ProcessList) - 1) do
...@@ -410,6 +416,15 @@ begin ...@@ -410,6 +416,15 @@ begin
end; 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; function IsUpgrade: Boolean;
begin begin
Result := (GetUninstallString() <> ''); Result := (GetUninstallString() <> '');
...@@ -422,34 +437,67 @@ begin ...@@ -422,34 +437,67 @@ begin
end; 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; function InitializeSetup: Boolean;
var var
V: Integer; V: Integer;
iResultCode: Integer; ResultCode: Integer;
sUnInstallString: string; UnInstallString: string;
begin 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 if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\{A2670E5F-4D34-4042-A9C5-5A3BC9547B37}_is1', 'UninstallString') then
begin 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 begin
MsgBox('폰트바다 매니저({#MyAppWindowName})가 실행 중입니다. 정상 종료(로그 아웃) 후 다시 실행해 주세요.', mbError, MB_OK); MsgBox('폰트바다 매니저({#MyAppWindowName})가 실행 중입니다. 정상 종료(로그 아웃) 후 다시 실행해 주세요.', mbError, MB_OK);
Result := false; Result := False;
ExitCode := False;
end end
else else
begin begin
V := MsgBox(ExpandConstant('이전 버전 폰트바다 매니저가 존재합니다. 삭제 후 설치를 권장합니다. 진행하시겠습니까?'), mbConfirmation, MB_YESNO); V := MsgBox(ExpandConstant('이전 버전 폰트바다 매니저가 존재합니다. 삭제 후 설치를 권장합니다. 진행하시겠습니까?'), mbConfirmation, MB_YESNO);
if V = IDYES then if V = IDYES then
begin begin
sUnInstallString := GetUninstallString(); UnInstallString := GetUninstallString();
sUnInstallString := RemoveQuotes(sUnInstallString); UnInstallString := RemoveQuotes(UnInstallString);
Exec(ExpandConstant(sUnInstallString), '', '', SW_SHOW, ewWaitUntilTerminated, iResultCode); Exec(ExpandConstant(UnInstallString), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
Result := True; Result := True;
end end
else else
begin begin
MsgBox('삭제 및 설치를 종료합니다.', mbError, MB_OK); MsgBox('삭제 및 설치를 종료합니다.', mbError, MB_OK);
Result := False; Result := False;
ExitCode := False;
end; end;
end; 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