forked from forcecore/KWReplayAutoSaver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDEV_README.txt
More file actions
131 lines (91 loc) · 4.5 KB
/
Copy pathDEV_README.txt
File metadata and controls
131 lines (91 loc) · 4.5 KB
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
This readme is for developers, who might be interested in improving this replay autosaver.
The git repository for this project is available at:
https://github.com/forcecore/KWReplayAutoSaver
Begin from autosaver.py, it uses other class to accomplish the job.
-------------------------------------------------------------------
Environmental setup, quick guide
* Checkout the project with git.
* Install Python 3. As of now, I've installed it using python-3.4.2.msi.
Check add python to path option during the install to use PIP.
* Launch command shell and run the following command to install
wxPython_Phoenix :
pip install -U --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
* Install py2exe with the following command:
pip install py2exe
* After done developing, run dist.bat to compile Python scripts into exe
files.
-------------------------------------------------------------------
Python 3 has its own py2exe functionality, yay!
Read about it here:
https://pypi.python.org/pypi/py2exe/0.9.2.0
Unfortunately, tk/tcl bundled with Python sucks!
It can be packaged but with its big size which is comparable to wxPython,
hence I've decided to rather go for wxPython, not tk/tcl.
(Dropbox uses Python 2.x + wxPython, i got some influence from that.)
This is how you install Phoenix (wxPython for python 3.x) on Python 3.4
https://groups.google.com/forum/#!topic/wxpython-dev/LmGIrQyh7jc
----------------------------------------------------------------
For the benefit of those not used to pip, you need the -U option to
force an upgrade. It should be :-
pip install -U --pre -f http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix
Wrongly order the options as I stupidly did and you end up with :-
pip install --pre -f -U http://wxPython.org/Phoenix/snapshot-builds/wxPython_Phoenix
Downloading/unpacking http://wxPython.org/Phoenix/snapshot-builds/
Cannot unpack file
C:\Users\Mark\AppData\Local\Temp\pip-474idjxv-unpack\snapshot-builds
(downloaded from C:\Users\Mark\AppData\Local\Temp\pip-404ydr4s-build,
content-type: text/html;charset=UTF-8); cannot detect archive format
Cleaning up...
Cannot determine archive format of
C:\Users\Mark\AppData\Local\Temp\pip-404ydr4s-build
Storing debug log for failure in C:\Users\Mark\pip\pip.log
----------------------------------------------------------------
At the moment, I'm using Python 3.4.2 (on windows).
python-3.4.2.msi
all with default installation options.
oops, not default. For Python, I've add them to PATH.
This will allow you run "pip" command from the cmd console.
With pip, install Phoenix.
C:\Users\BoolBada\Dropbox\profile\myKWReplays\rep_tool>pip install -U --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
Notice the space between snapshot-builds/ and wxPython_Phoenix.
You should see something like this on success:
C:\Users\BoolBada\Dropbox\profile\myKWReplays\rep_tool>pip install -U --pre -f http:/
/wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
Downloading/unpacking wxPython-Phoenix
http://wxpython.org/Phoenix/snapshot-builds/ uses an insecure transport scheme
(http). Consider using https if wxpython.org has it available
Installing collected packages: wxPython-Phoenix
Successfully installed wxPython-Phoenix
Cleaning up...
I do get
C:\Python34\lib\site-packages\wx\core.py:22: UserWarning: wxPython/wxWidgets rel
ease number mismatch
warnings.warn("wxPython/wxWidgets release number mismatch")
but seems to run fine.
You should have your development environment up and running by now!
Have fun!
-------------------------------------------------------------------
Using matplotlib.
For plotting graphs
The version used for development: matplotlib-1.4.2.win32-py3.4
You need to install module "six", too, manually:
pip install six
Then we need many others...
pip install python-dateutil
pip install pyparsing
Numpy needed too download and install...
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
numpy-MKL?1.9.1.win32-py3.4.exe
Plotting should work now.
I have considered wx.lib.plot... But that requires NUMPY too.
You can't run from it. I chose matplotlib for ease of programming.
-------------------------------------------------------------------
For distributing the program to non-programmers:
Install py2exe with pip:
pip install py2exe
Now we can invoke build_exe command.
build_exe autosaver.py
But we need some customization, as we need the KW.ico file and stuff like that.
I've built setup.py with :
build_exe -W setup.py autosaver.py
You can just run "dist.bat" after customizing setup.py.