forked from CastroFidel/PortWINE
Scripts version 2131
This commit is contained in:
@ -36,9 +36,9 @@ class MainWindow(QMainWindow):
|
||||
QMessageBox.critical(self, 'Error', 'Can not find installed PortProton')
|
||||
exit(1)
|
||||
g.scripts_dir = scripts_dir.rstrip('/')
|
||||
g.pp_icon = shortcut.get('Desktop Entry', 'Icon', fallback='/usr/share/pixmaps/portproton.png')
|
||||
pp_icon = QIcon(g.pp_icon)
|
||||
self.setWindowIcon(pp_icon)
|
||||
g.pw_icon = shortcut.get('Desktop Entry', 'Icon', fallback='/usr/share/pixmaps/portproton.png')
|
||||
pw_icon = QIcon(g.pw_icon)
|
||||
self.setWindowIcon(pw_icon)
|
||||
self.setWindowTitle('PortProton games library')
|
||||
|
||||
g.base_dir = str(Path(scripts_dir + '/../..').resolve())
|
||||
@ -86,7 +86,7 @@ class MainWindow(QMainWindow):
|
||||
spacer = QWidget(self)
|
||||
spacer.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred)
|
||||
self.toolbar.addWidget(spacer)
|
||||
action = QAction(pp_icon, 'PortProton', self)
|
||||
action = QAction(pw_icon, 'PortProton', self)
|
||||
action.triggered.connect(self.run_pp)
|
||||
self.toolbar.addAction(action)
|
||||
|
||||
@ -200,10 +200,10 @@ class InstallGame(QDialog):
|
||||
script = f"""
|
||||
mkdir -p {shlex.quote(g.install_pfx + '/drive_c/Games')}
|
||||
echo '
|
||||
export PP_VULKAN_USE=1
|
||||
export PP_GUI_DISABLED_CS=1
|
||||
export PP_PREFIX_NAME=INSTALL
|
||||
export PP_DLL_INSTALL=mfc42
|
||||
export PW_VULKAN_USE=1
|
||||
export PW_GUI_DISABLED_CS=1
|
||||
export PW_PREFIX_NAME=INSTALL
|
||||
export PW_DLL_INSTALL=mfc42
|
||||
' > {ppdb}
|
||||
{shlex.quote(g.scripts_dir + '/start.sh')} {shlex.quote(exe_file)}
|
||||
rm -f {ppdb}
|
||||
@ -246,15 +246,15 @@ class InstallGame(QDialog):
|
||||
export portwine_exe={exe_file}
|
||||
cd {shlex.quote(g.scripts_dir)}
|
||||
. {shlex.quote(g.scripts_dir + '/runlib')}
|
||||
pp_create_gui_png
|
||||
pp_init_db
|
||||
pw_create_gui_png
|
||||
pw_init_db
|
||||
[ -f {ppdb} ] && . {ppdb}
|
||||
echo -e "export PP_VULKAN_USE=${{PP_VULKAN_USE:-1}}\nexport PP_GUI_DISABLED_CS=1" >> {ppdb}
|
||||
echo -e "export PW_VULKAN_USE=${{PW_VULKAN_USE:-1}}\nexport PW_GUI_DISABLED_CS=1" >> {ppdb}
|
||||
"""
|
||||
run(['bash', '-c', script])
|
||||
icon_path = g.base_dir + '/data/img/' + Path(item.text()).stem + '.png'
|
||||
if not Path(icon_path).exists():
|
||||
icon_path = g.pp_icon
|
||||
icon_path = g.pw_icon
|
||||
Path(shortcut).write_text(f"""[Desktop Entry]
|
||||
Name={shortcut_name}
|
||||
Exec=env {shlex.quote(g.scripts_dir + '/start.sh')} {exe_file}
|
||||
@ -335,7 +335,7 @@ class GameList(QListWidget):
|
||||
with open(ppdb, 'r') as read:
|
||||
with open(ppdb + '.new', 'w') as write:
|
||||
while (line := read.readline()):
|
||||
if 'PP_GUI_DISABLED_CS' not in line:
|
||||
if 'PW_GUI_DISABLED_CS' not in line:
|
||||
write.write(line)
|
||||
os.rename(ppdb + '.new', ppdb)
|
||||
if action == remove:
|
||||
@ -386,7 +386,7 @@ class GameItem(QListWidgetItem):
|
||||
|
||||
self.setToolTip(text)
|
||||
self.setText(text)
|
||||
icon_path = self.get('Icon') if Path(self.get('Icon')).exists() else g.pp_icon
|
||||
icon_path = self.get('Icon') if Path(self.get('Icon')).exists() else g.pw_icon
|
||||
qicon = QIcon(icon_path)
|
||||
self.setIcon(qicon)
|
||||
self.setTextAlignment(Qt.AlignmentFlag.AlignHCenter | Qt.AlignmentFlag.AlignTop)
|
||||
|
Reference in New Issue
Block a user