New fix + update UI

This commit is contained in:
plant_1312 2020-01-22 20:13:45 +00:00
parent 18c041630e
commit 93bd919f57
2 changed files with 20 additions and 6 deletions

18
main.ui
View File

@ -77,7 +77,7 @@
</object>
<packing>
<property name="x">200</property>
<property name="y">310</property>
<property name="y">280</property>
</packing>
</child>
<child>
@ -91,7 +91,21 @@
</object>
<packing>
<property name="x">200</property>
<property name="y">265</property>
<property name="y">235</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="portable">
<property name="label" translatable="yes">Portable</property>
<property name="height_request">35</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="x">255</property>
<property name="y">318</property>
</packing>
</child>
</object>

View File

@ -91,10 +91,10 @@ int download () {
string pm;
Process.spawn_command_line_sync ("pkexec pacman -S yggdrasil --noconfirm", out pm);
if (pm == "bash: pacman: command not found\n") {
if (pm == "Cannot run program pacman: No such file or directory\n") {
Process.spawn_command_line_sync ("wget https://2375-115685026-gh.circle-artifacts.com/0/yggdrasil-0.3.12-amd64.deb");
Process.spawn_command_line_sync ("dpkg -i yggdrasil-0.3.12-amd64.deb");
Process.spawn_command_line_sync ("pkexec dpkg -i yggdrasil-0.3.12-amd64.deb");
}
@ -139,7 +139,7 @@ int stop () {
try {
Process.spawn_command_line_sync ("pkexec rc-service yggdrasil stop");
Process.spawn_command_line_sync ("systemctl stop yggdrasil");
Process.spawn_command_line_sync ("pkexec systemctl stop yggdrasil");
} catch (Error e) {
@ -158,7 +158,7 @@ int start () {
try {
Process.spawn_command_line_sync ("pkexec rc-service yggdrasil start");
Process.spawn_command_line_sync ("systemctl start yggdrasil");
Process.spawn_command_line_sync ("pkexec systemctl start yggdrasil");
} catch (Error e) {