Commit 0163b931 authored by carlosperate's avatar carlosperate

Update static docs build script for better error management.

parent d4a299f6
...@@ -90,4 +90,5 @@ cef_debug.log ...@@ -90,4 +90,5 @@ cef_debug.log
/ardublockly_run.bat /ardublockly_run.bat
# The documentation is built with the GitHub wiki data # The documentation is built with the GitHub wiki data
/Documentation
package/ardublocklydocs/site package/ardublocklydocs/site
...@@ -7,9 +7,9 @@ __Downloading the packaged Ardublockly__: The binaries will be hosted in GitHub ...@@ -7,9 +7,9 @@ __Downloading the packaged Ardublockly__: The binaries will be hosted in GitHub
## Building Ardublockly from source ## Building Ardublockly from source
These scripts are currently built and tested using Python 2.7. These scripts have tested using Python 2.7.
While it is possible to maintain compatibility with other Python versions (the ArdublocklyServer Python package used in the developer installation has been tested on Python 2.7 and 3.4), due to the multiple individual perks of the python libraries used here, it has been decided to target a single build environment. While it is possible to maintain compatibility with other Python versions (the ArdublocklyServer Python package used in the developer installation has been tested on Python 2.7 and 3.4), due to the multiple individual perks of the python libraries used here, a single build environment will be targeted.
If you are using Python virtual environments on Windows this [collection of Python extensions binaries][2] is highly recommended. If you are using Python virtual environments on Windows this [collection of Python extensions binaries][2] is highly recommended.
...@@ -28,23 +28,36 @@ CEF Python provides python bindings for the Chromium Embedded Framework. This is ...@@ -28,23 +28,36 @@ CEF Python provides python bindings for the Chromium Embedded Framework. This is
#### py2exe #### py2exe
py2exe is a Distutils extension to build Python scripts into Windows executable programs. py2exe is a Distutils extension to build Python scripts into Windows executable programs.
There is a plan to migrate from py2exe to Pyinstaller, but for now this is the main library used to create the Windows build. There is a plan to migrate from py2exe to Pyinstaller, but for now this is the main library used to create the Windows build.
You can download py2exe from their [official website][6]. You can download py2exe from their [official website][6].
#### MkDocs
MkDocs is a static page generator specifically designed for documentation using Markdown.
The project documentation is written and hosted in the [Arudblockly repository GitHub Wiki][7]. The build script for the documentation pulls its markdown files and converts them into an HTML static site for offline access.
More information about this procedure can be found in [this article][8].
## Build steps ## Build steps
Download and initialise this project repository: Download and initialise this project repository:
``` ```
git clone https://github.com/carlosperate/ardublockly.git git clone https://github.com/carlosperate/ardublockly.git
cd ardublockly
git submodule init git submodule init
git submodule update git submodule update
cd closure-library
git pull origin master
``` ```
Now navigate to the `package` folder in the project directory: Now navigate to the `package` folder in the project directory:
``` ```
cd ../package cd package
```
To first build the offline documentation execute the `build_docs.py` file. This will add a folder named `documentation` into the project root directory:
```
python build_docs.py
``` ```
To build Ardublockly all you have to do is execute the `build_windows.py` file: To build Ardublockly all you have to do is execute the `build_windows.py` file:
...@@ -54,7 +67,7 @@ python build_windows.py ...@@ -54,7 +67,7 @@ python build_windows.py
This will remove any previous build directory (`/win` directory in project root), rebuild, and create the `ardublockly_run.bat` file into the project root. This will remove any previous build directory (`/win` directory in project root), rebuild, and create the `ardublockly_run.bat` file into the project root.
To run Ardublockly then just execute the `ardublockly_run.bat` file. To run Ardublockly on Windows execute the `ardublockly_run.bat` file.
[1]: https://github.com/carlosperate/ardublockly/releases/ [1]: https://github.com/carlosperate/ardublockly/releases/
...@@ -63,3 +76,5 @@ To run Ardublockly then just execute the `ardublockly_run.bat` file. ...@@ -63,3 +76,5 @@ To run Ardublockly then just execute the `ardublockly_run.bat` file.
[4]: http://www.wxpython.org/download.php [4]: http://www.wxpython.org/download.php
[5]: https://code.google.com/p/cefpython/ [5]: https://code.google.com/p/cefpython/
[6]: http://www.py2exe.org/ [6]: http://www.py2exe.org/
[7]: https://github.com/carlosperate/ardublockly/wiki
[8]: http://www.embeddedlog.com/static-docs-from-github-wiki.html
This diff is collapsed.
#!/usr/bin/env python2 #!/usr/bin/env python2
# -*- coding: utf-8 -*- #
#
# Builds the Ardublockly application for the Windows operating system.
#
# Copyright (c) 2015 carlosperate https://github.com/carlosperate/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import os import os
import sys import sys
import shutil import shutil
......
cefpython3==31.2 cefpython3=>31.2
py2exe==0.6.9 py2exe=>0.6.9
wxPython==3.0.2.0 wxPython=>3.0.2.0
wxPython-common==3.0.2.0 wxPython-common=>3.0.2.0
mkdocs==0.12.1 mkdocs=>0.12.1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment