Skip to content

Commit

Permalink
fix no Install ploblem
Browse files Browse the repository at this point in the history
  • Loading branch information
Budobudou committed Aug 30, 2024
1 parent 96cc784 commit 5c29c15
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"makefile.configureOnOpen": true
}
19 changes: 12 additions & 7 deletions MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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} ";
Expand Down Expand Up @@ -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";
Expand All @@ -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)
{
Expand All @@ -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);
Expand All @@ -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 を実行します。");
Expand All @@ -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
{
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: pioneos-oobe
Version: 1.0-13
Version: 1.0-14
Section: base
Priority: optional
Architecture: amd64
Expand Down
3 changes: 2 additions & 1 deletion src/usr/share/pioneos/oobe/apt-get.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
apt-get -y update
apt-get -y update
apt-get -y upgrade

0 comments on commit 5c29c15

Please sign in to comment.