Skip to content

Commit eec3a9e

Browse files
authored
Merge pull request #81 from PropGit/demo
Update README.md
2 parents 77450da + 59ffad5 commit eec3a9e

File tree

1 file changed

+3
-194
lines changed

1 file changed

+3
-194
lines changed

README.md

Lines changed: 3 additions & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -2,198 +2,7 @@ BlocklyPropClient
22
=======================
33

44
# Introduction
5-
--------------
5+
The BlocklyPropClient is a vital part of the http://blockly.parallax.com system that must be installed and run locally on the user's computer to complete the connection to the target Propeller microcontroller product. It provides local connection features- downloading your programs into the Propeller-based product and creating a debugging serial connection between it and the BlocklyProp Editor in the web browser.
66

7-
The BlocklyPropClient is a client for the http://blockly.parallax.com system.
8-
It provides local Propeller connection features- downloading your programs into the Propeller and creating a serial connection between the Propeller and the browser.
9-
10-
BlocklyPropClient is written using Python v2.7.
11-
12-
13-
# Running
14-
---------
15-
16-
Installations are self-contained; no extra dependencies are required except for USB drivers for Parallax development boards.
17-
18-
## Running on Linux
19-
You will first have to install some python dependencies before you can run BlocklyPropClient.
20-
21-
* ws4py
22-
* pyserial
23-
* cherrypy
24-
25-
These can all be installed using the auto-installer by running the following in the terminal: 'python InstallDependencies.py'
26-
27-
Then execute: python BlocklyPropClient.py
28-
29-
30-
# Developers
31-
------------
32-
33-
To build and package BlocklyProp Client, configure your system and then perform the appropriate build and package steps below.
34-
35-
## System Configuration
36-
These configurations steps need only be done once per system.
37-
38-
### Windows Configuration
39-
40-
* __IMPORTANT:__ Don't use _McAfee_ (or possibly any anti-virus) on build system - it prevents proper builds of BlocklyPropClient installer
41-
* Install _Git_
42-
* Install _Python v2.7.12_ 64-bit / 32-bit (as appropriate)
43-
* [https://www.python.org/downloads/release/python-2712/](https://www.python.org/downloads/release/python-2712/)
44-
* Use standard destination
45-
* Install _PyCharm v2016.2.3_ - Community Edition - this is convienent for package installation
46-
* [https://confluence.jetbrains.com/display/PYH/Previous+PyCharm+Releases](https://confluence.jetbrains.com/display/PYH/Previous+PyCharm+Releases)
47-
* Check option to create desktop shortcut
48-
* Uncheck .py association
49-
* Run PyCharm (be patient, it takes a long time to start sometimes) and then...
50-
* If prompted, select _I do not have a previous version..._
51-
* Allow default options on _Initial Configuration_ dialog
52-
* Select _Check out from Version Control > Git_
53-
* Set _Git Repository URL:_ to __https://github.com/parallaxinc/BlocklyPropClient.git__
54-
* Click _Test_ button
55-
* If test successfull, click the _Clone_ button
56-
* Choose to open the project's directory
57-
* Select _File > Settings..._
58-
* Expand the _BlocklyPropClient_ item
59-
* Select _Project Interpreter_
60-
* In the right pane, select the _+_ button (_Install_)
61-
* If the _+_ button is grayed out, try closing the _Settings_ window and reopening it again
62-
* In the _Available Packages_ window
63-
* Uncheck the _Install to user's site packages directory..._ item
64-
* Search for and _Install Package_ for each of the items below
65-
* Install _ws4py v0.3.5+_
66-
* Install _CherryPy v8.1.0_ (Select _CherryPy_, check the _Specify version_ box, and select _8.1.0_)
67-
* Install _pyserial v3.1.1_ (Select _pyserial_, check the _Specify version_ box, and select _v3.1.1_)
68-
* Install _PyInstaller v3.1.1_ (Select _PyInstaller_, check the _Specify version_ box and select _v3.1.1_)
69-
* Do not use v3.2 as it creates an msc..100 dependency
70-
* Close the _Available Packages_ window
71-
* Click the _Apply_ button (if available) on the _Settings_ window
72-
* Click _OK_ on the _Settings_ window
73-
* Wait for the installation steps (status bar of PyCharm) to finish
74-
* Exit PyCharm
75-
* Install _Innosetup 5.5.9 (non-Unicode)_
76-
* [http://www.jrsoftware.org/isdl.php](http://www.jrsoftware.org/isdl.php)
77-
* Check _Install Inno Setup Preprocessor_ option
78-
* Check _Create a desktop shortcut_ option
79-
* If you chose to run Inno Setup, just close the _Open_ dialog for now
80-
81-
### Mac Configuration
82-
* Open Terminal (Mac command-line)
83-
* Install _Git_ if necessary
84-
* Install _Homebrew_
85-
* _$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"_
86-
* Install _Python_ (_v2.7.13_ at the time of this writing; v2.7.12 and v2.7.13 are known to work for BlocklyPropClient)
87-
* _$ brew install python_
88-
* Install _VirtualEnv_ package
89-
* _$ pip install virtualenv_
90-
* Create _PythonProjects_ folder
91-
* _$ cd ~/_
92-
* _$ mkdir PythonProjects_
93-
* _$ cd PythonProjects_
94-
* Check out the needed branch from the _BlocklyPropClient_ repository
95-
* _$ git clone https://github.com/parallaxinc/BlocklyPropClient.git_
96-
* _$ cd BlocklyPropClient_
97-
* _$ git checkout {branch}_
98-
* Create a _Virtual Python_ environment inside the repository's work folder
99-
* _$ virtualenv VPython --distribute_
100-
* Activate the _Virtual Python_ environment for BlocklyPropClient
101-
* _$ source VPython/bin/activate_
102-
* Install all required packages for BlocklyPropClient
103-
* Install _ws4py v0.3.5+_
104-
* _(VPython)$ pip install ws4py==0.3.5_
105-
* Install _CherryPy v8.1.0_
106-
* _(VPython)$ pip install CherryPy==8.1.0_
107-
* _Install pyserial v3.1.1_
108-
* _(VPython)$ pip install pyserial==3.1.1_
109-
* Install _PyInstaller v3.1.1_ (Do not use v3.2 as it creates an msc..100 dependency)
110-
* _(VPython)$ pip install PyInstaller==3.1.1_
111-
* Deactivate the _Virtual Environment..._
112-
* _(VPython)$ deactivate_
113-
* The "(VPython)" prefix will now disappear from your command-line
114-
115-
## Building & Packaging
116-
These steps need be performed frequently, as needed, after System Configuration (above).
117-
118-
### Windows Building & Packaging
119-
120-
* Build the BlocklyPropClient
121-
* Open a command window
122-
* Check out the needed branch from the _BlocklyPropClient_ repository
123-
* This can be done either
124-
* in _PyCharm's VCS > Git > Branches..._ menu, then select _origin/{branch} > Checkout as new local branch_ from _Remote Branches_ (or if _Local Branches_ section exists, you can select _{branch} -> origin/{branch}_ from _Local Branches_), then Exit PyCharm
125-
* in Git command line:
126-
* _$ cd C:\Users\{username}\PycharmProjects\BlocklyPropClient_
127-
* _$ git checkout origin {branch}_
128-
* Run the build script (.windows.spec) from within the repository directory:
129-
* _$ c:\Python27\Scripts\pyinstaller BlocklyPropClient.windows.spec_
130-
* This builds and stores the application files in the __./dist__ subfolder which will be used by InnoSetup.
131-
* Package BlocklyPropClient
132-
* Run InnoSetup
133-
* _File > Open_ the .spec file: _C:\Users\{username}\PycharmProjects\BlocklyPropClient\package\blocklypropclient-installer.iss_
134-
* Select _Build > Compile_
135-
* Now the installer executable will be in the __./dist__ subfolder.
136-
137-
### Mac Building & Packaging
138-
139-
* Open a terminal (command-line)
140-
* Navigate to the project
141-
* _$ cd ~/PythonProjects/BlocklyPropClient_
142-
* Check out the needed branch from the _BlocklyPropClient_ repository
143-
* _$ git checkout {branch}_
144-
* Activate the _Virtual Python_ environment for BlocklyPropClient
145-
* _$ source VPython/bin/activate_
146-
* Build BlocklyPropClient
147-
* (VPython)$ PyInstaller BlocklyPropClient.macos.spec
148-
* This builds and stores the application bundle in the ./dist subfolder as BlocklyPropClient.app
149-
* See BlocklyPropClient.macos.spec Details (below) for more information
150-
* Sign and Package BlocklyPropClient (requires signing certificate in Mac's KeyChain)
151-
* Navigate to the package folder
152-
* cd package
153-
* Run the mac_sign_and_package script giving the proper version number and deploy option
154-
* To include the FTDI USB Drivers inside the installer:
155-
* _$ ./mac_app_sign_and_package.sh -a "BlocklyPropClient" -v 0.5.1 -r -f -d_
156-
* To exclude the FTDI USB Drivers from the installer:
157-
* _$ ./mac_app_sign_and_package.sh -a "BlocklyPropClient" -v 0.5.1 -d_
158-
* The installer package will be written to the ../dist subfolder as BlocklyPropClient-0.5.1-setup-MacOS.pkg
159-
* Deactivate the Virtual Environment...
160-
* _(VPython)$ deactivate_
161-
* The "(VPython)" prefix will now disappear from your command-line
162-
163-
#### BlocklyPropClient.macos.spec Details
164-
165-
The BlocklyPropClient.macos.spec is the build specification file for Mac OS. This file contains Python executable source generated automatically by the pyi-makespec command and also later amended to include features not expressible via the pyi-makespec command-line.
166-
167-
To regenerate a specification file for Mac OS:
168-
* Navigate to the project
169-
* _$ cd ~/PythonProjects/BlocklyPropClient_
170-
* Activate the _Virtual Python_ environment for BlocklyPropClient
171-
* _$ source VPython/bin/activate_
172-
* Generate a new BlocklyPropClient.spec file
173-
* _(VPython)$ pyi-makespec --windowed --icon BlocklyPropClient.icns --osx-bundle-identifier com.ParallaxInc.BlocklyPropClient --noupx BlocklyPropClient.py_
174-
* Update the BlocklyPropClient.spec file to include propeller-tools content
175-
* Below the "exe" block, add the following three lines
176-
177-
```
178-
#Propeller Tools
179-
propeller_libs_and_tools = Tree('propeller-tools', prefix='propeller-tools', excludes=['*.pdf', 'windows', 'linux'])
180-
propeller_libs_and_tools += [('about.txt', 'about.txt', 'About file')]
181-
```
182-
183-
* Above the "coll" block, indicates it is modified
184-
```
185-
#Collection (edited to include Propeller Tools)
186-
```
187-
188-
* Below the "coll" block's "a.datas," line, insert the following line
189-
```
190-
propeller_libs_and_tools,
191-
```
192-
193-
* At the end of the "app" block, change that last element to the following lines (where x.x.x is the version number):
194-
```
195-
bundle_identifier='com.ParallaxInc.BlocklyPropClient',
196-
info_plist={'CFBundleShortVersionString': 'x.x.x'})
197-
```
198-
199-
* Save the file and rename to __BlocklyPropClient.macos.spec__
7+
# Wiki
8+
Visit the [BlocklyPropClient Wiki](https://github.com/parallaxinc/BlocklyPropClient/wiki) for more information.

0 commit comments

Comments
 (0)