Skip to content

Commit

Permalink
Cease to Breathe fix
Browse files Browse the repository at this point in the history
Replace included nwjs(0.71) wich doesn't work with 0.86
Fix cursor hitbox (set frame=false in package.json)
Updated from 0.85 that didn't display custom cursors.
  • Loading branch information
marianoag authored Apr 4, 2024
1 parent aad87b2 commit e4bf406
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions gamefixes-steam/1873170.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
""" Cease to Breathe
Replace included nwjs(0.71) wich doesn't work with 0.86
Fix cursor hitbox (set frame=false in package.json)
Updated from 0.85 that didn't display custom cursors.
"""
#pylint: disable=C0103

import os
import glob
import shutil
import urllib.request
import zipfile
import subprocess
from protonfixes import util

def main():
util.replace_command('CTB.exe', 'nw.exe')
install_dir = glob.escape(util.get_game_install_path())
if not os.path.isfile(os.path.join(install_dir, 'nw.exe')):
url = 'https://dl.nwjs.io/v0.86.0/nwjs-v0.86.0-win-x64.zip'
nwjs = os.path.basename(url)
urllib.request.urlretrieve (url, nwjs)
with zipfile.ZipFile(nwjs, 'r') as zip_ref:
zip_ref.extractall(install_dir)
nwjs = os.path.join(install_dir, nwjs.rsplit('.', 1)[0])
shutil.copytree(nwjs, install_dir, dirs_exist_ok=True)
shutil.rmtree(nwjs)
subprocess.call([f"sed -i 's/\"frame\": true/\"frame\": false/' \"{install_dir}/package.json\""], shell=True)

0 comments on commit e4bf406

Please sign in to comment.