File: execution-environment.txt

package info (click to toggle)
asciidoc 6.0.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,604 kB
  • ctags: 367
  • sloc: xml: 8,201; python: 3,518; makefile: 13; sh: 8
file content (136 lines) | stat: -rw-r--r-- 5,016 bytes parent folder | download
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
Building the Stand-alone Execution Environment
==============================================

Before we can package our website we need to build a stand-alone
execution environment containing the tools we use to maintain the
website:

- link:links.html[AsciiDoc]
- link:links.html[A-A-P]
- A link:links.html[Python] execution environment.

The directory structure of our stand-alone website development
environment (most of which gets packaged into the setup wizard)
consists of the following directories:

.............................................................
.                       Source and configuration files
./bin/aap/Exec          A-A-P Recipe Executive scripts
./bin/asciidoc          AsciiDoc scripts
./bin/python            Python execution environment
./install               Setup wizard and CD-ROM creation files
./artwork               Artwork source
.............................................................
  
To build this stand-alone website development environment observe the
following steps:

Create a website development directory
--------------------------------------
Create an empty website development directory.

IMPORTANT: The application and files referenced by the application
must reside in a drive path (not a UNC path). This is because UNC
paths do not have the functionality of drive paths. If necessary use
Windows Explorer to map UNC paths to drive letters.

Copy example website
--------------------
Copy all files and directories from the AsciiDoc distribution
`examples/website` directory to your website development directory.

These example files serve as a starting point and include:

- Web page AsciiDoc source files (*.txt).
- The website CSS stylesheet `main.css`.
- The AsciiDoc website configuration file `asciidoc.conf`.
- The A-A-P script file `main.aap` that contains recipes to build and
  publish the website.
- An `aap.bat` batch file to run the A-A-P.
- An `install` directory contains the setup wizard script, program
  icons, and a CD-ROM auto-run file.
- An `artwork` directory contains the link:links.html[Real-DRAW] 
  artwork files that I used to create the website graphics.

Create an Applications Sub-directory
------------------------------------
Create a `bin` sub-directory and install link:links.html[AsciiDoc]:

  $ mkdir bin

NOTE: Since we're creating a stand-alone execution environment you
need to install the tools even if they are installed elsewhere on your
PC.

Install AsciiDoc
----------------
Download the AsciiDoc zip file distribution from
http://www.methods.co.nz/asciidoc/downloads.html[] and unzip to
`bin/asciidoc`:

  $ cd bin
  $ mkdir asciidoc
  $ cd asciidoc
  $ unzip ~/asciidoc-2.1.zip

Install A-A-P Recipe Executive
------------------------------
Download the A-A-P Recipe Executive zip file distribution from
http://www.a-a-p.org/[] and unzip to `bin/aap/Exec`:

  $ cd bin
  $ mkdir aap
  $ cd aap
  $ mkdir Exec
  $ cd Exec
  Download the Aap Zip archive to the current directory.
  $ unzip aap-1.234.zip

Create Python Execution Environment
-----------------------------------
We simply copy the required Python runtime files from the already
installed Python environment. It is assumed that Python is installed
development PC, if not you'll first need to download and install the
Python Windows installer from http://www.python.org[].

These notes relate to Python 2.2.2 for Windows, but should be
applicable to other Python 2 Windows distributions.

Create a directory `bin/python`:

  $ cd bin
  $ mkdir python

Copy the following files and directories (including contents) from the
installed Python22 program directory (normally in either `C:\` or
`C:\Program Files`) to `bin/python`:

  python.exe
  DLLs
  include
  Lib
  libs

Copy `python22.dll` from the Windows System folder to our `bin/python`
directory.

NOTE: There's not need to copy the `Lib/test` folder or folders
contained in the `lib/site-packages/` folder unless you're sure
they're used by your Python applications.

You now have a standalone execution environment, in fact there's
almost certainly a lot of files in the `bin/python` directory that will
never be used by your Python applications. In lieu of error prone
application specific dependency checking I've opted for a brute force
"better safe than sorry" approach. For example, console applications
won't need the `Lib/lib-tk' folder or the `tk83.dll` or 'tcl83.dll'
files in the `DLLs' folder and you almost certainly won't need the
`Lib/distutils` folder.

image::directories.png[Execution environment directories]

Running `bin/python/python.exe` will start your stand-alone Python
execution environment.  There's no need for registry entries or any
files installed outside `bin/python`. When you start `python.exe` it
automatically searches the directory in which it's installed for
`python22.dll` and distribution sub-directories.