From 5c29c150337e758084be13625ec24d09ce23d69e Mon Sep 17 00:00:00 2001 From: Budobudou <63654313+Budobudou@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:17:33 +0900 Subject: [PATCH] fix no Install ploblem --- .vscode/settings.json | 3 +++ MainWindow.cs | 19 ++++++++++++------- makefile | 2 +- src/DEBIAN/control | 2 +- src/usr/share/pioneos/oobe/apt-get.sh | 3 ++- 5 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b0d0698 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "makefile.configureOnOpen": true +} \ No newline at end of file diff --git a/MainWindow.cs b/MainWindow.cs index 5470c34..c3c5adf 100644 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -48,8 +48,7 @@ private MainWindow(Builder builder) : base(builder.GetRawOwnedObject("MainWindow // OSバージョンの確認 string[] lines = File.ReadAllLines("/etc/os-release"); string prettyNameLine = lines.FirstOrDefault(line => line.StartsWith("VERSION=")); - string prettyName = prettyNameLine.Split('=')[1].Trim('"'); - _pionever.Text = prettyName; + _pionever.Text = "ver." + prettyNameLine.Split('=')[1].Trim('"'); // CSS Apply var provider = new CssProvider(); var cssdata = "._navi_install { background-color: #E0E0E0; padding: 10px 10px 10px 10px;}._navigationbar{ background-color: #E0E0E0; padding: 5px 5px 5px 5px} .border{ padding: 1px 0px 1px 0px} "; @@ -427,6 +426,9 @@ private async Task setAsync(object sender, EventArgs a) _progress.Visible = true; packagelistbox.Visible = false; _navigationbar.Visible = false; + _infomationbar.Visible = true; + _pionever.Visible = true; + _window_info.Visible = false; _thum.Visible = true; // アイコン設定 _live_icon.IconName = "checkmark"; @@ -445,7 +447,8 @@ private async Task setAsync(object sender, EventArgs a) Arguments = "/usr/share/pioneos/oobe/apt-get.sh", RedirectStandardOutput = true }; - Process.Start(processInfo3); + _pionever.Text = "進捗状況:Debian システムの更新中..."; + using (Process pwatch = Process.Start(processInfo3)){if (pwatch != null){await pwatch.WaitForExitAsync();}} //パッケージのインストール if(texteditorcombo.Active == 0) { @@ -469,12 +472,14 @@ private async Task setAsync(object sender, EventArgs a) UseShellExecute = true, Arguments = "/usr/share/pioneos/oobe/instremo.sh" + " " + packageinstall + " " + packageuninstall }; - Process.Start(processInfo_textedit); + _pionever.Text = "進捗状況:必要なパッケージのインストール中..."; + using (Process pwatch = Process.Start(processInfo_textedit)){if (pwatch != null){await pwatch.WaitForExitAsync();}} Console.WriteLine(packageinstall + "をインストールしました。"); } } } //時間同期など + _pionever.Text = "進捗状況:設定の最適化中..."; if (windowstimesync == true){ Console.WriteLine("windowstimesync.sh を実行します。"); await Task.Delay(50); @@ -485,7 +490,7 @@ private async Task setAsync(object sender, EventArgs a) Arguments = "/usr/share/pioneos/oobe/windowstimesync.sh", RedirectStandardOutput = true, }; - Process.Start(processInfo_windowstimesync); + using (Process pwatch = Process.Start(processInfo_windowstimesync)){if (pwatch != null){await pwatch.WaitForExitAsync();}} } //最終処理、ここでサヨナラ Console.WriteLine("fini2.sh を実行します。"); @@ -496,7 +501,7 @@ private async Task setAsync(object sender, EventArgs a) RedirectStandardOutput = true }; Console.WriteLine("fini.sh を実行します。"); - Process.Start(process2Info); + using (Process pwatch = Process.Start(process2Info)){if (pwatch != null){await pwatch.WaitForExitAsync();}} await Task.Delay(50); var processInfo = new ProcessStartInfo { @@ -505,7 +510,7 @@ private async Task setAsync(object sender, EventArgs a) Arguments = "/usr/share/pioneos/oobe/fini.sh", RedirectStandardOutput = true }; - Process.Start(processInfo); + using (Process pwatch = Process.Start(processInfo)){if (pwatch != null){await pwatch.WaitForExitAsync();}} } static void StartProgressBarAnimation(ProgressBar _progress) { diff --git a/makefile b/makefile index 02ab1ec..e423439 100644 --- a/makefile +++ b/makefile @@ -17,7 +17,7 @@ dist: build chmod +x app/DEBIAN/prerm dpkg-deb --build app - mv app.deb ./pioneos-oobe_1.0-13_amd64.deb + mv app.deb ./pioneos-oobe_1.0-14_amd64.deb rm -rf app rm -rf dist rm -rf bin diff --git a/src/DEBIAN/control b/src/DEBIAN/control index 0ee99d6..4cde068 100644 --- a/src/DEBIAN/control +++ b/src/DEBIAN/control @@ -1,5 +1,5 @@ Package: pioneos-oobe -Version: 1.0-13 +Version: 1.0-14 Section: base Priority: optional Architecture: amd64 diff --git a/src/usr/share/pioneos/oobe/apt-get.sh b/src/usr/share/pioneos/oobe/apt-get.sh index ca8d27c..d85c544 100644 --- a/src/usr/share/pioneos/oobe/apt-get.sh +++ b/src/usr/share/pioneos/oobe/apt-get.sh @@ -1,2 +1,3 @@ #!/bin/sh -apt-get -y update \ No newline at end of file +apt-get -y update +apt-get -y upgrade \ No newline at end of file