Uninstall 완료 시 Installer 창에 이벤트 전달
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,10 +2,6 @@
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\programlauncher\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
@@ -14,6 +10,10 @@
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|c:\\users\\sjm\\desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\launcher_app\\programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\programlauncher\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
@@ -29,7 +29,7 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 5,
|
||||
"SelectedChildIndex": 3,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
@@ -52,8 +52,8 @@
|
||||
"Title": "Form1.Designer.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.Designer.cs",
|
||||
"RelativeDocumentMoniker": "ProgramLauncher\\Form1.Designer.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.Designer.cs*",
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.Designer.cs*",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.Designer.cs",
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.Designer.cs",
|
||||
"ViewState": "AgIAAB8AAAAAAAAAAAArwC4AAAAkAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-22T01:32:16.984Z",
|
||||
@@ -61,38 +61,38 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Program.cs",
|
||||
"RelativeDocumentMoniker": "ProgramLauncher\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Program.cs",
|
||||
"RelativeToolTip": "ProgramLauncher\\Program.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAyAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAAMAAAAAAAAAAAAAAA8AAAAaAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-22T00:44:05.335Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Form1.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "ProgramLauncher\\Form1.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs*",
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.cs*",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAADIAAAANAAAAAAAAAA==",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs",
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.cs",
|
||||
"ViewState": "AgIAAH8AAAAAAAAAAAAUwJwAAAAJAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-22T00:43:10.886Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"DocumentIndex": 2,
|
||||
"Title": "Form1.cs [\uB514\uC790\uC778]",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "ProgramLauncher\\Form1.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs [\uB514\uC790\uC778]*",
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.cs [\uB514\uC790\uC778]*",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs [\uB514\uC790\uC778]",
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.cs [\uB514\uC790\uC778]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-22T00:42:49.663Z",
|
||||
"EditorCaption": " [\uB514\uC790\uC778]"
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
"WorkspaceRootPath": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|c:\\users\\sjm\\desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\launcher_app\\programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|c:\\users\\sjm\\desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\launcher_app\\programlauncher\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\programlauncher\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\programlauncher\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{948819DD-0CD3-49B2-91E0-8530D1D0D871}|ProgramLauncher\\ProgramLauncher.csproj|solutionrelative:programlauncher\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
@@ -29,7 +29,7 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 4,
|
||||
"SelectedChildIndex": 3,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
@@ -56,46 +56,43 @@
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.Designer.cs",
|
||||
"ViewState": "AgIAAB8AAAAAAAAAAAArwC4AAAAkAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-22T01:32:16.984Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-04-22T01:32:16.984Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Program.cs",
|
||||
"RelativeDocumentMoniker": "ProgramLauncher\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Program.cs",
|
||||
"RelativeToolTip": "ProgramLauncher\\Program.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAyAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAAMAAAAAAAAAAAAAAA8AAAAaAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-22T00:44:05.335Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Form1.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "ProgramLauncher\\Form1.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs",
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.cs",
|
||||
"ViewState": "AgIAAIkAAAAAAAAAAAApwJoAAAARAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAH8AAAAAAAAAAAAUwJwAAAAJAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-22T00:43:10.886Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-04-22T00:43:10.886Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"DocumentIndex": 2,
|
||||
"Title": "Form1.cs [\uB514\uC790\uC778]",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "ProgramLauncher\\Form1.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\Launcher_App\\ProgramLauncher\\Form1.cs [\uB514\uC790\uC778]",
|
||||
"RelativeToolTip": "ProgramLauncher\\Form1.cs [\uB514\uC790\uC778]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-22T00:42:49.663Z",
|
||||
"EditorCaption": " [\uB514\uC790\uC778]"
|
||||
"WhenOpened": "2025-04-22T00:42:49.663Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
18
Launcher_App/ProgramLauncher/Form1.Designer.cs
generated
18
Launcher_App/ProgramLauncher/Form1.Designer.cs
generated
@@ -29,7 +29,7 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.Label_UpdateFileName = new System.Windows.Forms.Label();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.ProgressBar = new System.Windows.Forms.ProgressBar();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Label_UpdateFileName
|
||||
@@ -42,22 +42,22 @@
|
||||
this.Label_UpdateFileName.TabIndex = 1;
|
||||
this.Label_UpdateFileName.Text = "Name";
|
||||
//
|
||||
// progressBar1
|
||||
// ProgressBar
|
||||
//
|
||||
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
this.ProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.progressBar1.Location = new System.Drawing.Point(50, 360);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(700, 23);
|
||||
this.progressBar1.TabIndex = 2;
|
||||
this.ProgressBar.Location = new System.Drawing.Point(50, 360);
|
||||
this.ProgressBar.Name = "ProgressBar";
|
||||
this.ProgressBar.Size = new System.Drawing.Size(700, 23);
|
||||
this.ProgressBar.TabIndex = 2;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.ProgressBar);
|
||||
this.Controls.Add(this.Label_UpdateFileName);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
@@ -70,7 +70,7 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label Label_UpdateFileName;
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
private System.Windows.Forms.ProgressBar ProgressBar;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Net.Http;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace ProgramLauncher
|
||||
{
|
||||
@@ -24,6 +26,9 @@ namespace ProgramLauncher
|
||||
static string jsonFileName = "file_list.json";
|
||||
static string localVersionID = "versionID.txt";
|
||||
|
||||
long totalBytesToDownload = 0;
|
||||
long totalBytesDownloaded = 0;
|
||||
|
||||
static readonly HttpClient httpClient = new HttpClient();
|
||||
|
||||
public Form1()
|
||||
@@ -39,6 +44,11 @@ namespace ProgramLauncher
|
||||
await CheckUpdate();
|
||||
}
|
||||
|
||||
private void WriteText(string text)
|
||||
{
|
||||
Label_UpdateFileName.Text = text;
|
||||
}
|
||||
|
||||
private async Task CheckUpdate()
|
||||
{
|
||||
var serverFileList = await GetServerFileList(downloadServerUrl);
|
||||
@@ -49,17 +59,49 @@ namespace ProgramLauncher
|
||||
|
||||
if (latestVersionID != localVersionID)
|
||||
{
|
||||
// ✅ [1] 전체 크기 계산
|
||||
foreach (var file in serverFileList.Files)
|
||||
{
|
||||
string fileUrl = CombineUrl(downloadServerUrl, Path.Combine(downloadFolderName, file.Key));
|
||||
|
||||
using (var response = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, fileUrl)))
|
||||
{
|
||||
if (response.IsSuccessStatusCode && response.Content.Headers.ContentLength.HasValue)
|
||||
{
|
||||
totalBytesToDownload += response.Content.Headers.ContentLength.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ✅ [2] ProgressBar 초기화
|
||||
ProgressBar.Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
ProgressBar.Minimum = 0;
|
||||
ProgressBar.Maximum = (int)Math.Max(totalBytesToDownload, 1); // 0 방지
|
||||
ProgressBar.Value = 0;
|
||||
}));
|
||||
|
||||
|
||||
foreach (var file in serverFileList.Files)
|
||||
{
|
||||
string localFilePath = Path.Combine(downloadFolderName, file.Key);
|
||||
string serverHash = file.Value;
|
||||
|
||||
|
||||
if (!File.Exists(localFilePath) || GetFileHash(localFilePath) != serverHash)
|
||||
{
|
||||
Label_UpdateFileName.Text = localFilePath;
|
||||
string downloadFolder = CombineUrl(downloadServerUrl, downloadFolderName);
|
||||
string downloadFile = Path.Combine(downloadFolder, file.Key);
|
||||
await DownloadFile(downloadFile, localFilePath);
|
||||
|
||||
await DownloadFile(downloadFile, localFilePath, (downloadedBytes) =>
|
||||
{
|
||||
totalBytesDownloaded += downloadedBytes;
|
||||
ProgressBar.Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
ProgressBar.Value = (int)Math.Min(totalBytesDownloaded, ProgressBar.Maximum);
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +127,7 @@ namespace ProgramLauncher
|
||||
this.Close();
|
||||
}
|
||||
|
||||
static async Task<ServerFileList> GetServerFileList(string serverUrl)
|
||||
private async Task<ServerFileList> GetServerFileList(string serverUrl)
|
||||
{
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
@@ -102,16 +144,16 @@ namespace ProgramLauncher
|
||||
}
|
||||
}
|
||||
|
||||
static string GetLocalVersion()
|
||||
private string GetLocalVersion()
|
||||
{
|
||||
return File.Exists(localVersionID) ? File.ReadAllText(localVersionID).Trim() : "";
|
||||
}
|
||||
static void SaveLocalVersion(string version)
|
||||
private void SaveLocalVersion(string version)
|
||||
{
|
||||
File.WriteAllText(localVersionID, version);
|
||||
}
|
||||
|
||||
static string GetFileHash(string filePath)
|
||||
private string GetFileHash(string filePath)
|
||||
{
|
||||
using (var sha256 = SHA256.Create())
|
||||
using (var stream = File.OpenRead(filePath))
|
||||
@@ -120,24 +162,8 @@ namespace ProgramLauncher
|
||||
return BitConverter.ToString(hash).Replace("-", "").ToLower();
|
||||
}
|
||||
}
|
||||
/*
|
||||
static async Task DownloadFile(string url, string outputPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath) ?? "");
|
||||
await client.DownloadFileTaskAsync(new Uri(url), outputPath);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
static async Task DownloadFile(string url, string outputPath)
|
||||
|
||||
private async Task DownloadFile(string url, string outputPath, Action<long> reportProgress)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -145,22 +171,28 @@ namespace ProgramLauncher
|
||||
|
||||
using (var response = await httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead))
|
||||
{
|
||||
response.EnsureSuccessStatusCode(); // 200 OK가 아닐 경우 예외 발생
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
using (var stream = await response.Content.ReadAsStreamAsync())
|
||||
using (var fileStream = new FileStream(outputPath, FileMode.Create, FileAccess.Write, FileShare.None))
|
||||
{
|
||||
await stream.CopyToAsync(fileStream);
|
||||
byte[] buffer = new byte[81920];
|
||||
int bytesRead;
|
||||
while ((bytesRead = await stream.ReadAsync(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
await fileStream.WriteAsync(buffer, 0, bytesRead);
|
||||
reportProgress(bytesRead); // 매번 다운로드된 바이트 보고
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
WriteText($"❌ 다운로드 실패: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
static void StartExecutableFile(string executeFolder)
|
||||
private void StartExecutableFile(string executeFolder)
|
||||
{
|
||||
string[] exeFiles = Directory.GetFiles(executeFolder, "*.exe", SearchOption.TopDirectoryOnly);
|
||||
|
||||
@@ -179,7 +211,7 @@ namespace ProgramLauncher
|
||||
process.Start();
|
||||
}
|
||||
|
||||
static string CombineUrl(string baseUrl, string relativePath)
|
||||
private string CombineUrl(string baseUrl, string relativePath)
|
||||
{
|
||||
return $"{baseUrl.TrimEnd('/')}/{relativePath.TrimStart('/')}";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace ProgramLauncher
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
public static string projectName = "Studio";
|
||||
public static string projectName = "StudioInstaller";
|
||||
static string mutexName = "UVC_";
|
||||
|
||||
[STAThread]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>cCj4yXizFeIquWSbOSEGRjGjYboB6f2Pzd1O/xgzwPs=</dsig:DigestValue>
|
||||
<dsig:DigestValue>lY1Ik+V5aw2M0FzMxujBj62P5wgTLIvjQEboYQIUR/Q=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
Binary file not shown.
@@ -55,14 +55,14 @@
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="StudioClient.exe" size="590808">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="StudioClient.exe" size="771032">
|
||||
<assemblyIdentity name="StudioClient" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>X+MKsZ8X2xAD3jHWK0Yninre8l+1yJ9MXNRZy1vxhdw=</dsig:DigestValue>
|
||||
<dsig:DigestValue>PLm1Oz7fQ1u5aaQRFf158qfNcd7ighEkYFTLmnePxAg=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -250,4 +250,4 @@ begin
|
||||
Result := True;
|
||||
|
||||
FreeProcessSet(ProcSet);
|
||||
end;
|
||||
end;
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,20 +3,20 @@
|
||||
"WorkspaceRootPath": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|c:\\users\\sjm\\desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\studioinstaller_project\\studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|c:\\users\\sjm\\desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\studioinstaller_project\\studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
@@ -34,20 +34,20 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Form1.Designer.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Form1.Designer.cs",
|
||||
"RelativeDocumentMoniker": "StudioClient\\Form1.Designer.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Form1.Designer.cs",
|
||||
"RelativeToolTip": "StudioClient\\Form1.Designer.cs",
|
||||
"ViewState": "AgIAACIBAAAAAAAAAAAWwDABAAArAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAAgAAAAAAAAAAADwv00BAAAoAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-16T07:47:30.475Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"DocumentIndex": 3,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Program.cs",
|
||||
"RelativeDocumentMoniker": "StudioClient\\Program.cs",
|
||||
@@ -55,8 +55,7 @@
|
||||
"RelativeToolTip": "StudioClient\\Program.cs",
|
||||
"ViewState": "AgIAAAYAAAAAAAAAAAAAAAsAAAA1AAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-16T07:56:15.723Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-04-16T07:56:15.723Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -66,14 +65,14 @@
|
||||
"RelativeDocumentMoniker": "StudioClient\\Form1.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Form1.cs",
|
||||
"RelativeToolTip": "StudioClient\\Form1.cs",
|
||||
"ViewState": "AgIAACEAAAAAAAAAAAA5wCcAAAAAAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAPsAAAAAAAAAAAA6wA8BAAAgAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-16T01:35:37.449Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"DocumentIndex": 2,
|
||||
"Title": "Form1.cs [\uB514\uC790\uC778]",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "StudioClient\\Form1.cs",
|
||||
@@ -82,6 +81,22 @@
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-16T01:31:08.092Z",
|
||||
"EditorCaption": " [\uB514\uC790\uC778]"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{1c64b9c2-e352-428e-a56d-0ace190b99a6}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{c9c0ae26-aa77-11d2-b3f0-0000f87570ee}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
"WorkspaceRootPath": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|c:\\users\\sjm\\desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\studioinstaller_project\\studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|c:\\users\\sjm\\desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\studioinstaller_project\\studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\form1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\studioclient\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EA5BD6E3-FFCC-47B3-9A75-BC7E5027E07B}|StudioClient\\StudioClient.csproj|solutionrelative:studioclient\\form1.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
@@ -34,20 +34,20 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Form1.Designer.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Form1.Designer.cs",
|
||||
"RelativeDocumentMoniker": "StudioClient\\Form1.Designer.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Form1.Designer.cs",
|
||||
"RelativeToolTip": "StudioClient\\Form1.Designer.cs",
|
||||
"ViewState": "AgIAACIBAAAAAAAAAAAWwDABAAArAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAAgAAAAAAAAAAADwv00BAAAoAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-16T07:47:30.475Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"DocumentIndex": 3,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Program.cs",
|
||||
"RelativeDocumentMoniker": "StudioClient\\Program.cs",
|
||||
@@ -55,8 +55,7 @@
|
||||
"RelativeToolTip": "StudioClient\\Program.cs",
|
||||
"ViewState": "AgIAAAYAAAAAAAAAAAAAAAsAAAA1AAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-16T07:56:15.723Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-04-16T07:56:15.723Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -66,14 +65,14 @@
|
||||
"RelativeDocumentMoniker": "StudioClient\\Form1.cs",
|
||||
"ToolTip": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Form1.cs",
|
||||
"RelativeToolTip": "StudioClient\\Form1.cs",
|
||||
"ViewState": "AgIAANwAAAAAAAAAAAAAAO8AAAAAAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAP0AAAAAAAAAAAAmwBUBAAAEAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-16T01:35:37.449Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"DocumentIndex": 2,
|
||||
"Title": "Form1.cs [\uB514\uC790\uC778]",
|
||||
"DocumentMoniker": "C:\\Users\\SJM\\Desktop\\\uC5C5\uB370\uC774\uD2B8 \uAE30\uB2A5\\StudioInstaller_Project\\StudioClient\\Form1.cs",
|
||||
"RelativeDocumentMoniker": "StudioClient\\Form1.cs",
|
||||
@@ -82,6 +81,22 @@
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-04-16T01:31:08.092Z",
|
||||
"EditorCaption": " [\uB514\uC790\uC778]"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{1c64b9c2-e352-428e-a56d-0ace190b99a6}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{c9c0ae26-aa77-11d2-b3f0-0000f87570ee}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ using System.Security.Cryptography;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Win32;
|
||||
using System.Security.Policy;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StudioClient
|
||||
{
|
||||
@@ -91,15 +92,12 @@ namespace StudioClient
|
||||
|
||||
private async void StudioCheckButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
// 경로에 가서 전부 삭제하고 다시 설치
|
||||
// 실행된 상태라면 return 필요
|
||||
//await CheckIntegrity(serverUrl, appName_Studio);
|
||||
|
||||
}
|
||||
|
||||
private async void StudioDeleteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
await UninstallApp(appName_Studio);
|
||||
//SetButtonState(false, StudioInstallButton, StudioCheckButton, StudioDeleteButton);
|
||||
}
|
||||
|
||||
private async void StudioTwinDeleteButton_Click(object sender, EventArgs e)
|
||||
@@ -251,35 +249,11 @@ namespace StudioClient
|
||||
Process.Start(startInfo);
|
||||
}
|
||||
|
||||
private async Task CheckIntegrity(string serverUrl, string appName)
|
||||
{
|
||||
string appUrl = Path.Combine(serverUrl, appName);
|
||||
|
||||
string installPath = GetInstalledPathFromRegistry(appName);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(installPath) && Directory.Exists(installPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.Delete(installPath, recursive: true);
|
||||
WriteText("✅ 설치 경로 폴더가 성공적으로 삭제되었습니다.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
WriteText($"❌ 폴더 삭제 중 오류 발생: {ex.Message}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteText("❌ 설치된 경로가 없습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task UninstallApp(string appName)
|
||||
{
|
||||
string appUrl = Path.Combine(serverUrl, appName);
|
||||
|
||||
// Setup으로 설치를 진행했는지 체크
|
||||
// 설치가 이미 되어있는지 체크
|
||||
string installPath = GetInstalledPathFromRegistry(appName);
|
||||
string exeFilePath;
|
||||
|
||||
@@ -294,6 +268,7 @@ namespace StudioClient
|
||||
}
|
||||
|
||||
WriteText("Uninstaller 실행");
|
||||
|
||||
StartExecutableFile(exeFilePath, installPath);
|
||||
}
|
||||
else
|
||||
@@ -302,35 +277,26 @@ namespace StudioClient
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
SetControlsEnabled(false);
|
||||
UpdateStateMessage.Text = "업데이트 확인 중...";
|
||||
// Uninstall 완료 시
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern uint RegisterWindowMessage(string lpString);
|
||||
|
||||
bool surverConnect = await TryConnectToServerAsync();
|
||||
private uint uninstallCompleteMsg;
|
||||
|
||||
if (surverConnect)
|
||||
{
|
||||
SetControlsEnabled(true);
|
||||
UpdateStateMessage.Visible = false;
|
||||
UpdateStateMessage.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateStateMessage.Text = "네트워크 연결 상태를 확인하세요.";
|
||||
UpdateStateMessage.Visible = true;
|
||||
UpdateStateMessage.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetControlsEnabled(bool enabled)
|
||||
{
|
||||
StudioButton.Visible = enabled;
|
||||
StudioButton.Enabled = enabled;
|
||||
ChunilButton.Visible = enabled;
|
||||
ChunilButton.Enabled = enabled;
|
||||
}
|
||||
*/
|
||||
protected override void OnHandleCreated(EventArgs e)
|
||||
{
|
||||
base.OnHandleCreated(e);
|
||||
uninstallCompleteMsg = RegisterWindowMessage("UVC_UNINSTALL_COMPLETE");
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == uninstallCompleteMsg)
|
||||
{
|
||||
SetButtonState(false, StudioInstallButton, StudioCheckButton, StudioDeleteButton);
|
||||
}
|
||||
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<assemblyIdentity name="StudioClient.application" version="1.0.0.9" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<description asmv2:publisher="StudioClient" asmv2:product="StudioClient" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<deployment install="true" mapFileExtensions="true" />
|
||||
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<framework targetVersion="4.7.2" profile="Full" supportedRuntime="4.0.30319" />
|
||||
</compatibleFrameworks>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" codebase="StudioClient.exe.manifest" size="4679">
|
||||
<assemblyIdentity name="StudioClient.exe" version="1.0.0.9" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>4CO5RRtcy/o1BrjpLO0P/V+qqp9g77iOsb38XblxqrI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</asmv1:assembly>
|
||||
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<asmv1:assemblyIdentity name="StudioClient.exe" version="1.0.0.9" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<description asmv2:iconFile="TestIcon.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<application />
|
||||
<entryPoint>
|
||||
<assemblyIdentity name="StudioClient" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<commandLine file="StudioClient.exe" parameters="" />
|
||||
</entryPoint>
|
||||
<trustInfo>
|
||||
<security>
|
||||
<applicationRequestMinimum>
|
||||
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
</applicationRequestMinimum>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!--
|
||||
UAC 매니페스트 옵션
|
||||
Windows 사용자 계정 컨트롤 수준을 변경하려면
|
||||
requestedExecutionLevel 노드를 다음 중 하나로 바꾸세요.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
이전 버전과의 호환성을 위해 파일 및 레지스트리 가상화를 사용하려면
|
||||
requestedExecutionLevel 노드를 삭제하세요.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentOS>
|
||||
<osVersionInfo>
|
||||
<os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
|
||||
</osVersionInfo>
|
||||
</dependentOS>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Newtonsoft.Json.dll" size="711952">
|
||||
<assemblyIdentity name="Newtonsoft.Json" version="13.0.0.0" publicKeyToken="30AD4FE6B2A6AEED" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>4eJ697B+7t9c5xqSVfBCKBam/FhJpIPGcU4bRyBE+p0=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="StudioClient.exe" size="769496">
|
||||
<assemblyIdentity name="StudioClient" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>faT1MIO4A6M9G/900+ofgw/3whc/D+07kHsB3dYQFUg=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<file name="StudioClient.exe.config" size="189">
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>R+Wg8QGvQVHX8T0ta/qbhH1bXkqY0fRnS3wBV3J0bN8=</dsig:DigestValue>
|
||||
</hash>
|
||||
</file>
|
||||
<file name="TestIcon.ico" size="256670">
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>P1Zwp62aIqbJDt8MpxbXLmcRRLizrzS/nlBgX4y5QWE=</dsig:DigestValue>
|
||||
</hash>
|
||||
</file>
|
||||
</asmv1:assembly>
|
||||
Binary file not shown.
@@ -14,7 +14,7 @@
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>4CO5RRtcy/o1BrjpLO0P/V+qqp9g77iOsb38XblxqrI=</dsig:DigestValue>
|
||||
<dsig:DigestValue>lY1Ik+V5aw2M0FzMxujBj62P5wgTLIvjQEboYQIUR/Q=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
Binary file not shown.
@@ -55,14 +55,14 @@
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="StudioClient.exe" size="769496">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="StudioClient.exe" size="771032">
|
||||
<assemblyIdentity name="StudioClient" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>faT1MIO4A6M9G/900+ofgw/3whc/D+07kHsB3dYQFUg=</dsig:DigestValue>
|
||||
<dsig:DigestValue>PLm1Oz7fQ1u5aaQRFf158qfNcd7ighEkYFTLmnePxAg=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
@@ -63,6 +63,7 @@ Type: filesandordirs; Name: "{app}"
|
||||
[Code]
|
||||
const
|
||||
INVALID_HANDLE_VALUE = -1;
|
||||
WM_COPYDATA = $004A;
|
||||
|
||||
type
|
||||
TProcessInfoSet = record
|
||||
@@ -70,6 +71,34 @@ type
|
||||
NameSet: TStringList;
|
||||
end;
|
||||
|
||||
TCopyDataStruct = record
|
||||
dwData: LongInt;
|
||||
cbData: LongInt;
|
||||
lpData: LongInt;
|
||||
end;
|
||||
|
||||
WPARAM = LongWord;
|
||||
LPARAM = LongInt;
|
||||
LRESULT = LongInt;
|
||||
|
||||
// -------------------- StudioInstaller 메시지 전송 --------------------
|
||||
function SendMessage(HWND: LongWord; Msg: LongWord; wParam: LongWord; lParam: LongWord): LongInt;
|
||||
external 'SendMessageA@user32.dll stdcall';
|
||||
|
||||
function RegisterWindowMessage(lpString: AnsiString): LongWord;
|
||||
external 'RegisterWindowMessageA@user32.dll stdcall';
|
||||
|
||||
procedure NotifyStudioInstaller();
|
||||
var
|
||||
msg: LongWord;
|
||||
begin
|
||||
msg := RegisterWindowMessage('UVC_UNINSTALL_COMPLETE');
|
||||
if msg = 0 then exit;
|
||||
|
||||
SendMessage($FFFF, msg, 0, 0); // HWND_BROADCAST = $FFFF
|
||||
end;
|
||||
|
||||
|
||||
// -------------------- PowerShell 실행 및 결과 추출 --------------------
|
||||
function ExecAndGetLines(const CommandLine: string; var Lines: TArrayOfString): Boolean;
|
||||
var
|
||||
@@ -252,3 +281,12 @@ begin
|
||||
|
||||
FreeProcessSet(ProcSet);
|
||||
end;
|
||||
|
||||
// -------------------- 언인스톨 종료 시 StudioInstaller에 알림 --------------------
|
||||
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
|
||||
begin
|
||||
if CurUninstallStep = usPostUninstall then
|
||||
begin
|
||||
NotifyStudioInstaller();
|
||||
end;
|
||||
end;
|
||||
Reference in New Issue
Block a user