Skip to content

Commit

Permalink
rename ULWGL to umu
Browse files Browse the repository at this point in the history
  • Loading branch information
GloriousEggroll committed Mar 21, 2024
1 parent 9cc354a commit 93f563f
Show file tree
Hide file tree
Showing 56 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ULWGL-protonfixes workflow
name: umu-protonfixes workflow

on:
push:
Expand Down
22 changes: 11 additions & 11 deletions fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
def game_id():
""" Trys to return the game id from environment variables
"""
if 'ULWGL_ID' in os.environ:
return os.environ['ULWGL_ID']
if 'UMU_ID' in os.environ:
return os.environ['UMU_ID']
if 'SteamAppId' in os.environ:
return os.environ['SteamAppId']
if 'SteamGameId' in os.environ:
Expand All @@ -34,14 +34,14 @@ def game_name():
""" Trys to return the game name from environment variables
"""
is_online = check_internet()
if 'ULWGL_ID' in os.environ:
if 'UMU_ID' in os.environ:
if os.path.isfile(os.environ['WINEPREFIX'] + "/game_title"):
with open(os.environ['WINEPREFIX'] + "/game_title", 'r') as file:
return file.readline()
else:
try:
if 'STORE' in os.environ and is_online:
url = "https://ulwgl.openwinecomponents.org/ulwgl_api.php?ulwgl_id=" + os.environ['ULWGL_ID'] + "&store=" + os.environ['STORE']
url = "https://umu.openwinecomponents.org/umu_api.php?umu_id=" + os.environ['UMU_ID'] + "&store=" + os.environ['STORE']
headers = {'User-Agent': 'Mozilla/5.0'}
req = urllib.request.Request(url, headers=headers)
response = urllib.request.urlopen(req, timeout=5)
Expand All @@ -52,7 +52,7 @@ def game_name():
file.write(title)
file.close()
elif 'STORE' not in os.environ and is_online:
url = "https://ulwgl.openwinecomponents.org/ulwgl_api.php?ulwgl_id=" + os.environ['ULWGL_ID'] + "&store=none"
url = "https://umu.openwinecomponents.org/umu_api.php?umu_id=" + os.environ['UMU_ID'] + "&store=none"
headers = {'User-Agent': 'Mozilla/5.0'}
req = urllib.request.Request(url, headers=headers)
response = urllib.request.urlopen(req, timeout=5)
Expand All @@ -74,7 +74,7 @@ def game_name():
#log.info('UnicodeDecodeError occurred: {}'.format(e)) # used for debugging
return 'UNKNOWN'
except TimeoutError:
log.info('ulwgl.openwinecomponents.org timed out')
log.info('umu.openwinecomponents.org timed out')
return 'UNKNOWN'
with open(os.environ['WINEPREFIX'] + "/game_title", 'r') as file:
return file.readline()
Expand Down Expand Up @@ -126,7 +126,7 @@ def run_fix(gameid):
game_module = import_module('protonfixes.gamefixes-steam.default')
else:
log.info('Non-steam game ' + game)
game_module = import_module('protonfixes.gamefixes-ulwgl.default')
game_module = import_module('protonfixes.gamefixes-umu.default')
log.info('Using global defaults for ' + game)
game_module.main()
except ImportError:
Expand Down Expand Up @@ -177,11 +177,11 @@ def run_fix(gameid):
log.info('ZOOM Platform store specified, using ZOOM Platform database')
game_module = import_module('protonfixes.gamefixes-zoomplatform.' + gameid)
elif os.environ['STORE'].lower() == "none":
log.info('No store specified, using ULWGL database')
game_module = import_module('protonfixes.gamefixes-ulwgl.' + gameid)
log.info('No store specified, using umu database')
game_module = import_module('protonfixes.gamefixes-umu.' + gameid)
else:
log.info('No store specified, using ULWGL database')
game_module = import_module('protonfixes.gamefixes-ulwgl.' + gameid)
log.info('No store specified, using umu database')
game_module = import_module('protonfixes.gamefixes-umu.' + gameid)
log.info('Using protonfix for ' + game)
game_module.main()
except ImportError:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/check-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#

# Lint the following gamefix dir:
# gog, amazon, egs, humble, itchio, ubisoft, ulwgl, zoomplatform
for file in ./{gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-ulwgl,gamefixes-zoomplatform}/*; do
# gog, amazon, egs, humble, itchio, ubisoft, umu, zoomplatform
for file in ./{gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-umu,gamefixes-zoomplatform}/*; do
if [[ -L "$file" && ! -e "$file" ]]; then
echo "The following file is not a valid link: ${file}"
exit 1
Expand Down
6 changes: 3 additions & 3 deletions tools/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#

# Lint the following gamefix dir:
# steam, gog, amazon, egs, humble, itchio, ubisoft, ulwgl, zoomplatform
mapfile -d '' files_array < <(find ./{gamefixes-steam,gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-ulwgl,gamefixes-zoomplatform} -type f -name "*.py" ! -name "__init__.py" -print0)
# steam, gog, amazon, egs, humble, itchio, ubisoft, umu, zoomplatform
mapfile -d '' files_array < <(find ./{gamefixes-steam,gamefixes-amazon,gamefixes-gog,gamefixes-egs,gamefixes-humble,gamefixes-itchio,gamefixes-ubisoft,gamefixes-umu,gamefixes-zoomplatform} -type f -name "*.py" ! -name "__init__.py" -print0)

# Disable these checks:
# - Long lines from comments
# - Import errors because ULWGL-protonfixes will be renamed at release
# - Import errors because umu-protonfixes will be renamed at release
# - Docstrings for functions and modules
# - Invalid identifier names for files
pylint --rcfile pyproject.toml --disable C0103,C0116,E0401,C0301,C0114 "${files_array[@]}"

0 comments on commit 93f563f

Please sign in to comment.