def cb_button_install_kob(self, button):
modpacks_path = download_dir + '/_distr/the_temple_of_elemental_evil/' + exe_co8_kob
if not os.path.exists(modpacks_path):
message_dialog = Gtk.MessageDialog(
self.co8_kob_window,
0,
Gtk.MessageType.ERROR,
Gtk.ButtonsType.OK,
_("Mod not found in download directory")
)
content_area = message_dialog.get_content_area()
content_area.set_property('margin-left', 10)
content_area.set_property('margin-right', 10)
content_area.set_property('margin-top', 10)
content_area.set_property('margin-bottom', 10)
self.co8_kob_window.hide()
message_dialog.run()
message_dialog.destroy()
self.co8_kob_window.show()
else:
self.box_kob.set_visible(False)
self.progressbar_kob.set_visible(True)
command = ['innoextract', modpacks_path, '-d', game_dir + '/tmp']
self.pid_kob, stdin, stdout, stderr = GLib.spawn_async(command,
flags=GLib.SpawnFlags.SEARCH_PATH|GLib.SpawnFlags.DO_NOT_REAP_CHILD,
standard_output=True,
standard_error=True)
io = GLib.IOChannel(stdout)
self.source_id_out = io.add_watch(GLib.IO_IN|GLib.IO_HUP,
self.watch_process,
'extracting kob',
priority=GLib.PRIORITY_HIGH)
settings.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录