forked from gispos/AvsPmod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_instructions_windows_new.txt
173 lines (131 loc) · 7.77 KB
/
build_instructions_windows_new.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
How to build
------------
To build AvsPmod, check that all the requirements are met and run
'python -O build.py'. A ZIP or 7z archive will be created on its
same directory.
When you have multiple installations (2.7 x86/x64, 3.7 x86/x64), make sure you are using the proper python executable.
Current code base is using Python 2.7 and "classic" wxPython (up to 3.0.2).
So please ignore Python v3.7 and wxWidget 4.x parts ("experimental") they are really only for experimenting at the moment
Requirements
------------
- Install Python 2.7 (Original project info: versions 2.6-2.7 supported - we don't bother with 2.6)
Note that you need to install x86 and x64 separately if you want them both.
Latest 2.7:
https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi
https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi
Experimental:
Latest Python 3.7.1
https://www.python.org/ftp/python/3.7.1/python-3.7.1-amd64.exe
https://www.python.org/ftp/python/3.7.1/python-3.7.1.exe
- upgrade pip:
Yes, you'll need pip. PIP is a package manager for Python packages (modules).
Note: For Python 2 family: starting with Python 2.7.9, it is included by default.
For Python 3 family 3.4 or later PIP is included by default.
And make sure pip it’s up to date:
pip install --upgrade pip
Note: pip is a command line program, not available from python shell.
Find pip in the actual Python installation folder, e.g. c:\Program Files\Python37\Scripts
It may need a command shell prompt with admin privileges.
- Python2 and Python 3 compatibility
pip install six
- install wxPython (cross-platform GUI toolkit) (Info: https://pypi.org/project/wxPython/)
The original project info says that 2.8-2.9 supported, but there is a 3.0.2 version from the non-v4 "classic" family.
(Note: setup.py was also updated for use of v3.0.2)
Classic versions under version 4 do not have pip install support, install them manually.
Install 3.0.2 (sourceforge download only):
Latest "classic" is 3.0.2 which exists for Python 2.7
https://sourceforge.net/projects/wxpython/files/wxPython/3.0.2.0/wxPython3.0-win64-3.0.2.0-py27.exe/download
https://sourceforge.net/projects/wxpython/files/wxPython/3.0.2.0/wxPython3.0-win32-3.0.2.0-py27.exe/download
(run installers for x86 and x64)
Experimental (normally skip this part):
Install 4.0 or above (to be tested) (supports Python 2.7 and the new 3.x versions). No separate install files, just use package manager.
pip install "wxPython>=4.0.0,<5.0.0" --force-reinstall
Note: dont use wxversion in setup.py, it works only for "classic" and was removed from wxPython Phoenix (v4.x)
More info: https://wxpython.org/Phoenix/docs/html/MigrationGuide.html#the-wxversion-module
- Microsoft runtime DLLs
see later, Python 2.7 needs VS2008 redistributables, setup will copy specific dll files from it
- Additional included resources (see below)
- py2exe
For Python 2.x: https://sourceforge.net/projects/py2exe/files/
Experimental for Python v3.7 (normally skip this part):
Unfortunately the development of py2exe stopped.
py2exe does not exist for Python version 3.6 and up (they could not follow byte-code changes)
From Python 3.3: https://pypi.org/project/py2exe/
Todo: consider pyInstaller: https://www.pyinstaller.org/
pip install pyinstaller (even works from Python 2.7)
or nuitka?: https://stackoverflow.com/questions/49831163/compile-python-3-6-script-to-standalone-exe-with-nuitka-on-windows-10
- cffi and its dependencies (needed only for x86-64)
pip install --upgrade setuptools
pip install cffi (also installs dependency pycparser automatically!)
For more info, see section "Windows x86-64" later
- editbin (only for x86-32, optional) (for setting Large Address Aware)
- UPX (only for x86-32, optional)
- 7-Zip (optional)
- Additional dependencies: numpy, pyaudio, Cython (when compiling, the corresponding cfunc.pyd must be in the source directory)
- PySDL2 and SDL2.dll
Windows x86-64
--------------
Some extra dependencies are needed for building a 64-bit package:
- cffi module (already installed by pip if you followed the list above)
- pycparser module (cffi dependency, somes by pip installing cffi)
- Visual C++ (needed for building the C extension generated by cffi), options:
1 - Visual Studio 2008 (when you do not want to bother with it in the VS2017 era, use option 2)
2 - Microsoft Visual C++ Compiler for Python 2.7
<https://www.microsoft.com/en-us/download/details.aspx?id=44266>
This will download VCForPython27.msi This is enough to compile avisynth_c.h
Note by PF (as of December, 2018):
This header is a modified-prepared version of the file bundled in the Avisynth SDK.
At an earlier version of avsPMod it came from the x264 project, but actual (as of December 2018) version used by x264 is incompatible.
Adapting avisynth_c.h and avsPMod to up-to-date Interface 6 type and Avisynth+ C header is under progress.
Anyway, it should placed in the main AvsPMod folder.
Background info:
Which Microsoft Visual C++ compiler to use with a specific Python version ?
Each Python version uses a specific compiler version (e.g. CPython 2.7 uses Visual C++ 9.0, CPython 3.3 uses Visual C++ 10.0, etc).
So, you need to install the compiler version that corresponds to your Python version :
Visual C++ CPython
14.0 3.5, 3.6
10.0 3.3, 3.4
9.0 2.6, 2.7, 3.0, 3.1, 3.2
https://wiki.python.org/moin/WindowsCompilers
- Microsoft Visual C++ 14.0 standalone: Build Tools for Visual Studio 2017 (x86, x64, ARM, ARM64)
This is a standalone version of Visual C++ 14.0 compiler, you don't need to install Visual Studio 2017.
Install Microsoft Build Tools for Visual Studio 2017.
The setuptools Python package version must be at least 34.4.0.
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
- Microsoft Visual C++ 14.0 with Visual Studio 2017 (x86, x64, ARM, ARM64)
Visual Studio 2017 contains Visual C++ 14.0 compiler. The setuptools Python package version must be at least 34.4.0.
- avisynth_c.h
December 2018, from avisynth+ project, modified a bit
Microsoft runtime DLLs
----------------------
Some Microsoft Visual C runtime DLLs are needed: 'msvcm90.dll', 'msvcp90.dll'
and 'msvcr90.dll'. Chances are that these files are already present in your
system. In that case the build script will pick them up automatically.
If they don't, install the Microsoft Visual C++ 2008 Redistributable Package:
- 32-bit: <https://www.microsoft.com/en-us/download/details.aspx?id=29>
- 64-bit: <https://www.microsoft.com/en-us/download/details.aspx?id=15336>
or take them from Python, Visual Studio 2008 or another application and
place them in the same directory as the AvsPmod source files. The exact
version needed is 9.0.21022.8.
Additional included resources
-----------------------------
avs2avi <http://moitah.net/> is needed for the 'Script encoder (VfW)' tool.
These two files are expected to be found in the 'tools' subdirectory:
- avs2avi.exe
- avs2avi_src.zip
editbin
-------
The editbin.exe application can be used optionally to mark the 32-bit
executable produced by py2exe with the large address aware flag. This
way AvsPmod can use up to 4 GB in a 64-bit environment instead of the
2 GB default. Editbin is installed together with Visual Studio. The
build script will attempt to locate it automatically.
UPX, 7-Zip
----------
UPX can be used to compress the executable files. If 7-Zip is present, a 7z
archive is created instead of ZIP. The build script searchs for them in the
'Program Files' folder. You can also just put upx.exe and/or 7z.exe in the
same directory as the source code files.
Other
-----
Rename/copy readme.txt to README.md if not present.