Improved windows distutils file

Automatically adds the platforms dll, removing a manual step.
This commit is contained in:
Salvo 'LtWorf' Tomaselli 2015-09-15 01:00:48 +02:00
parent 6fad0cdf68
commit fc3ed21e92
2 changed files with 58 additions and 41 deletions

View File

@ -12,8 +12,7 @@ It is necessary to have the: Microsoft Visual C++ 2010 Redistributable Package.
- Execute "python input.py py2exe" - Execute "python input.py py2exe"
At the end, there should be a directory named "dist" containing the exe file and the needed libs (excluding for the c++ one) At the end, there should be a directory named "dist" containing the exe file and the needed libs (excluding for the c++ one)
within the dist directory there should be a "platforms" directory with a dll the PyQt5 directory.
- manually copy the platforms subdirectory of plugins from the PyQt5 folder into dist
Create the setup with Inno Setup Create the setup with Inno Setup
- Move windows/ss.iss to ../ - Move windows/ss.iss to ../

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python
# Relational # Relational
# Copyright (C) 2008 Salvo "LtWorf" Tomaselli # Copyright (C) 2008 Salvo "LtWorf" Tomaselli
# #
@ -25,15 +24,34 @@ import py2exe
#probable need to manually install it. Since to redistribute it #probable need to manually install it. Since to redistribute it
#some dammit certificates are needed. #some dammit certificates are needed.
setup(options = { includes = (
"sip",
"PyQt5",
"PyQt5.QtCore",
"PyQt5.QtGui",
)
datafiles = (
(
"platforms", ["C:\\Python34\\Lib\\site-packages\\PyQt5\\plugins" + "\\platforms\\qwindows.dll"]
),
)
setup(
data_files=datafiles,
zipfile=None,
options={
"py2exe": { "py2exe": {
"dll_excludes": ["MSVCP90.dll"] "includes": includes,
"dll_excludes": ["MSVCP90.dll"],
} }
}, },
windows= windows=[
[ {
{"script": "relational_gui.py","icon_resources": [(0, "windows/favicon.ico")]} "script": "relational_gui.py",
] "icon_resources": [(0, "windows/favicon.ico")],
,name="Relational", }
version="2.1" ],
name="Relational",
version="2.1",
) )