Skip to content

Commit

Permalink
Added experimental PyInstaller spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
RoliSoft committed Oct 22, 2016
1 parent 546e399 commit 3497652
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions pyinstaller.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- mode: python -*-
#
# Compiles the .py files into .exe using PyInstaller.
# Run with: pyinstaller --noconfirm --clean pyinstaller.spec
#

from os import system

files = ['get-source', 'get-prebuilt', 'install', 'switch']

for file in files:
binaries = None

if file == 'install':
binaries = [('ntfsea_x86.dll', '.'),('ntfsea_x64.dll', '.')]

a = Analysis([file + '.py'], pathex=['.'], binaries=binaries, datas=None, hiddenimports=[], hookspath=[], runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=None)
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
exe = EXE(pyz, a.scripts, exclude_binaries=True, name=file, debug=False, strip=False, upx=True, icon=None, console=True)
col = COLLECT(exe, a.binaries, a.zipfiles, a.datas, strip=False, upx=True, icon=None, name=file)

for file in files:
if file == 'switch':
continue

system('xcopy dist\\' + file + '\\* dist\\switch /e /d /y /h /r /c')
system('rmdir /s /q dist\\' + file)

system('xcopy C:\\Windows\\System32\\vcruntime140.dll dist\\switch\\vcruntime140.dll /y')
system('move dist\\switch dist\\wsl-distrib-switcher')

0 comments on commit 3497652

Please sign in to comment.