Skip to content

Commit

Permalink
Added the file confifuration for PyInstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
Dade916 committed Jan 20, 2018
1 parent 6d5c130 commit 7886f23
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 0 deletions.
34 changes: 34 additions & 0 deletions samples/pyluxcoreconsole/pyluxcoreconsole.linux.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- mode: python -*-

# To use as: pyinstaller samples/pyluxcoreconsole/pyluxcoreconsole.linux.spec

block_cipher = None


a = Analysis(['pyluxcoreconsole.py'],
pathex=['../..'],
binaries=[
('../../lib/pyluxcore.so', '.'),
('../../lib/pyluxcoretools.zip', '.')
],
datas=[],
hiddenimports=['uuid'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='pyluxcoreconsole',
debug=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True )
9 changes: 9 additions & 0 deletions samples/pyluxcoreconsole/pyluxcoreconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
################################################################################

import sys

# For PyInstaller environment
for sysPath in sys.path:
fileName = sysPath + "/pyluxcoretools.zip"
if os.path.exists(fileName) and os.path.isfile(fileName):
sys.path.append(fileName)
break;

# For the develop environment
sys.path.append("./lib")
sys.path.append("./lib/pyluxcoretools.zip")

Expand Down
34 changes: 34 additions & 0 deletions samples/pyluxcoremerge/pyluxcoremerge.linux.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- mode: python -*-

# To use as: pyinstaller samples/pyluxcoremerge/pyluxcoremerge.linux.spec

block_cipher = None


a = Analysis(['pyluxcoremerge.py'],
pathex=['../..'],
binaries=[
('../../lib/pyluxcore.so', '.'),
('../../lib/pyluxcoretools.zip', '.')
],
datas=[],
hiddenimports=['uuid'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='pyluxcoremerge',
debug=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True )
9 changes: 9 additions & 0 deletions samples/pyluxcoremerge/pyluxcoremerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
################################################################################

import sys

# For PyInstaller environment
for sysPath in sys.path:
fileName = sysPath + "/pyluxcoretools.zip"
if os.path.exists(fileName) and os.path.isfile(fileName):
sys.path.append(fileName)
break;

# For the develop environment
sys.path.append("./lib")
sys.path.append("./lib/pyluxcoretools.zip")

Expand Down
34 changes: 34 additions & 0 deletions samples/pyluxcorenetconsole/pyluxcorenetconsole.linux.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- mode: python -*-

# To use as: pyinstaller samples/pyluxcorenetconsole/pyluxcorenetconsole.linux.spec

block_cipher = None


a = Analysis(['pyluxcorenetconsole.py'],
pathex=['../..'],
binaries=[
('../../lib/pyluxcore.so', '.'),
('../../lib/pyluxcoretools.zip', '.')
],
datas=[],
hiddenimports=['uuid'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='pyluxcorenetconsole',
debug=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True )
9 changes: 9 additions & 0 deletions samples/pyluxcorenetconsole/pyluxcorenetconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
################################################################################

import sys

# For PyInstaller environment
for sysPath in sys.path:
fileName = sysPath + "/pyluxcoretools.zip"
if os.path.exists(fileName) and os.path.isfile(fileName):
sys.path.append(fileName)
break;

# For the develop environment
sys.path.append("./lib")
sys.path.append("./lib/pyluxcoretools.zip")

Expand Down
34 changes: 34 additions & 0 deletions samples/pyluxcorenetnode/pyluxcorenetnode.linux.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- mode: python -*-

# To use as: pyinstaller samples/pyluxcorenetnode/pyluxcorenetnode.linux.spec

block_cipher = None


a = Analysis(['pyluxcorenetnode.py'],
pathex=['../..'],
binaries=[
('../../lib/pyluxcore.so', '.'),
('../../lib/pyluxcoretools.zip', '.')
],
datas=[],
hiddenimports=['uuid'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='pyluxcorenetnode',
debug=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True )
9 changes: 9 additions & 0 deletions samples/pyluxcorenetnode/pyluxcorenetnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
################################################################################

import sys

# For PyInstaller environment
for sysPath in sys.path:
fileName = sysPath + "/pyluxcoretools.zip"
if os.path.exists(fileName) and os.path.isfile(fileName):
sys.path.append(fileName)
break;

# For the develop environment
sys.path.append("./lib")
sys.path.append("./lib/pyluxcoretools.zip")

Expand Down

0 comments on commit 7886f23

Please sign in to comment.