Skip to content

Commit

Permalink
add pyinstaller fix for loading ldd
Browse files Browse the repository at this point in the history
  • Loading branch information
BrownNPC committed May 4, 2024
1 parent a2bd087 commit 69a7bc2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pg3d-injector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
import subprocess
import os

# pyinstaller fix?
env = dict(os.environ) # make a copy of the environment
lp_key = 'LD_LIBRARY_PATH' # for GNU/Linux and *BSD.
lp_orig = env.get(lp_key + '_ORIG')
if lp_orig is not None:
print('using original')
env[lp_key] = lp_orig # restore the original, unmodified value
else:
# This happens when LD_LIBRARY_PATH was not set.
# Remove the env var as a last resort:
env.pop(lp_key, None)



import protontricks as pt
import sys
from util import run_command
Expand Down

0 comments on commit 69a7bc2

Please sign in to comment.