1
0
Fork 0
mirror of synced 2024-05-21 13:02:46 +12:00

stupid quotes

This commit is contained in:
Stelios Tsampas 2022-09-07 19:42:07 +03:00
parent 4b5b458fdb
commit 377fd486dc
3 changed files with 8 additions and 4 deletions

View file

@ -77,7 +77,6 @@ jobs:
name: Rare.AppImage
path: Rare.AppImage
cx_freeze:
runs-on: "windows-latest"
steps:
@ -91,6 +90,8 @@ jobs:
run: pip3 install -r requirements.txt
- name: cx_freeze
run: pip3 install --upgrade cx_freeze wheel
- name: pypresence
run: pip3 install pypresence
- name: Build
run: python freeze.py bdist_msi
@ -98,6 +99,7 @@ jobs:
with:
name: Rare-Windows.msi
path: dist/*.msi
mac_os:
runs-on: macos-latest
steps:

View file

@ -1,3 +1,4 @@
import multiprocessing
import os
import pathlib
import sys
@ -6,8 +7,6 @@ from argparse import ArgumentParser
def main():
# fix cx_freeze
import multiprocessing
multiprocessing.freeze_support()
# insert legendary for installed via pip/setup.py submodule to path

View file

@ -165,7 +165,7 @@ def get_size(b: Union[int, float]) -> str:
def get_rare_executable() -> List[str]:
# lk: detech if nuitka
# lk: detect if nuitka
if "__compiled__" in globals():
executable = [sys.executable]
elif platform.system() == "Linux" or platform.system() == "Darwin":
@ -285,7 +285,10 @@ def create_desktop_link(app_name=None, core: LegendaryCore = None, type_of_link=
arguments.extend(["launch", app_name])
# Maybe there is a better solution, but windows does not accept single quotes (Windows is weird)
logger.warning(executable)
logger.warning(shlex.quote(executable).replace("'", '"'))
shortcut.Targetpath = shlex.quote(executable).replace("'", '"')
logger.warning(shlex.join(arguments).replace("'", '"'))
shortcut.Arguments = shlex.join(arguments).replace("'", '"')
if for_rare:
shortcut.WorkingDirectory = QStandardPaths.writableLocation(QStandardPaths.HomeLocation)