Unverified Commit 99b9f80e authored by dmMaze's avatar dmMaze Committed by GitHub
Browse files

Merge pull request #235 from hyrulelinks/dev

Add runtime environment check
parents e03ac90b 01d554c0
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -20,10 +20,5 @@ pip install pyinstaller
ditto ../libs data/libs -V
ditto ../models data/models -V

# Comment lines 213-229 of launch.py
cp launch.py launch.py.bak # backup launch.py
sed -i '' '213,229s|^| \#|' launch.py # comment specfied lines
sed -n '213,229p' launch.py # check if comment is successful

# Build macOS app via pyinstaller
sudo pyinstaller launch.spec
+4 −1
Original line number Diff line number Diff line
@@ -212,6 +212,9 @@ def main():
    sys.exit(app.exec())

def prepare_environment():
    if getattr(sys, 'frozen', False):
        print('Running as app, skip dependency installation')
        return

    req_updated = False
    if sys.platform == 'win32':
+0 −5
Original line number Diff line number Diff line
@@ -77,11 +77,6 @@ unzip 'libopencv_world.4.4.0.dylib.zip' -d data/libs
unzip 'libpatchmatch_inpaint.dylib.zip' -d data/libs
rm -rf libopencv_world.4.4.0.dylib.zip libpatchmatch_inpaint.dylib.zip

# Comment lines 213-229 of launch.py
cp launch.py launch.py.bak # backup launch.py
sed -i '' '213,229s|^| \#|' launch.py # comment specfied lines
sed -n '213,229p' launch.py # check if comment is successful

# Build macOS app via pyinstaller
sudo pyinstaller launch.spec