Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit dba0f53

Browse files
committed
Write up of prerequisites and build instructions in README.md.
1 parent 81c1b70 commit dba0f53

1 file changed

Lines changed: 226 additions & 0 deletions

File tree

README.md

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
LiveCode Source Repository
2+
==========================
3+
4+
This is the source-code repository for LiveCode <http://www.livecode.com>.
5+
6+
Build Overview
7+
--------------
8+
The build system is (currently) very platform-specific in that there are distinct sets of projects (or Makefiles) for each platform.
9+
10+
At the top-level there are folders for each of the non-third-party static libraries, the externals and the engine itself:
11+
* libcore: this is a static library used by several other components that provides various basic functions and types.
12+
* libexternal(v1): these are the static libraries that support the LiveCode external interface.
13+
* engine: this is the main engine component, this folder produces the IDE, Standalone, Installer and Server engines.
14+
* revdb: this contains projects to build the revdb external and associated drivers.
15+
* revmobile: this contains projects to build the iOS support external (for Mac) and the Android support external (for Mac, Windows and Linux).
16+
* revpdfprinter: this contains the project to build the revpdfprinter component (for print to pdf functionality).
17+
* revspeech: this contains the project to build the revspeech external.
18+
* revvideograbber: this contains the project to build the revvideograbber external.
19+
* revxml: this contains the project to build the revxml external.
20+
* revzip: this contains the project to build the revzip external.
21+
22+
The most complex component is the main engine (unsurprisingly!). In particular, there are several variants of the engine that are specialised for particular uses. These are exposed as different targets in each of the projects (on each platform):
23+
24+
* IDE engine: This is the engine that is used to run the IDE. It contains extra functionality (compared to standalones) for things like syntax highlighting and standalone building. On each platform the target has a slightly different name:
25+
* Mac: LiveCode-Community
26+
* Linux: development
27+
* Windows: engine
28+
* Installer engine: This is the engine that is used to build the installer. It contains extra functionality for things like unzipping and processing binary differences. On each platform the target has a slightly different name:
29+
* Mac: Installer-Community
30+
* Linux: installer
31+
* Windows: installer
32+
* Server engine: This is the engine used in a server context. It contains server-specific functionality such as CGI support. It also has a much more minimal requirement on system libraries (depending as much as possible on non-Desktop related APIs). On each platform the target has a different name:
33+
* Mac: Server-Community
34+
* Linux: server
35+
* Windows: server
36+
* Standalone engine: This is the engine that is used to build standalones. Again, on each platform the target has a slightly different name:
37+
* Mac: Standalone-Community
38+
* Linux: standalone
39+
* Windows: standalone
40+
* iOS: standalone-mobile-community
41+
* Android: no target exactly, as Android builds are done using a shell script that builds all components together (a mixture of the NDK build system and Java compilation).
42+
43+
The systems used for each platform is as follows:
44+
* Mac: Uses Xcode and xcode projects. The top-level project for this (that builds all components) is stage.xcodeproj which references individual xcodeproj's in each relevant folder. (There are two xcodeproj's in each relevant folder – one for desktop, one for iOS). For example, the main engine project is engine/engine.xcodeproj.
45+
* Linux: Uses make. There is a top-level Makefile which references Makefiles in each relevant folder. Since some components have several sub-components (usually static libraries), many folders contain multiple Makefiles. The top-level Makefile has rules for each of the individual components, e.g. to build the IDE (development) engine use make development.
46+
* Windows (Desktop): Uses Visual C++ 2005. There is a top-level solution stage.sln which references all the projects in the sub-folders. Loading this solution into VS allows you to choose which targets to build, or just to build the whole solution.
47+
* Windows (Server): Uses Visual C++ 2005. There is a top-level solution stage-server.sln which references all the projects in the sub-folders. Loading this solution into VS allows you to choose which targets to build, or just to build the whole solution. Note this solution only contains the components specific to server – only revdb is slightly different here (as it integrates the security component for OpenSSL) the revxml and revzip external are just the desktop ones.
48+
* iOS: Uses Xcode and xcode projects. The top-level project for this (that builds all components) is stage-mobile.xcodeproj which references individual xcodeproj's in each relevant folder. For example, the main engine project is engine/engine-mobile.xcodeproj.
49+
* Android: This is built using a script tools/build-android.osx (we're working on variants for other platforms). This script builds all the binary components and necessary Java support classes. (The binary components use the NDK native build system based on Make, so it does do dependency analysis and doesn't do a complete rebuild each time).
50+
51+
Prerequisites
52+
-------------
53+
54+
### Mac – Xcode ###
55+
To build the engine on Mac you need to use Xcode. Now, at the moment the 'production' system we use to build the Mac Desktop engines we distribute is Xcode 3.2.6 – this is because, at the time of writing, we still support 10.4 and PowerPC.
56+
57+
However, there is no need for you to necessarily use 3.2.6 – the more recent Xcode 4 can also be used but you will need to make a small change to one of the configuration files within the LiveCode repository:
58+
* open up rules/Global.xcconfig
59+
* change SDKROOT to be set to 10.6
60+
61+
*Note:* Not using 3.2.6 and the 10.4 SDK will potentially result in engine binaries that will not run on older versions of Mac (particular PowerPC) but this doesn't matter for development purposes (only distribution).
62+
63+
### Linux ###
64+
Building the engine on Linux uses a collection of makefiles and make. Our 'production' system is Ubuntu 6.06 (32-bit) as using this as a base provides a high-degree of binary compatibility between linux distributions.
65+
In order to ensure you can build on your distribution you need to ensure you have appropriate dev packages installed. In particular:
66+
* make
67+
* gcc
68+
* g++
69+
* libX11-dev
70+
* libXext-dev
71+
* libXrender-dev
72+
* libXft-dev
73+
* libXinerama-dev
74+
* libXv-dev
75+
* libXcursor-dev
76+
* libfreetype6-dev
77+
* libgtk2.0-dev
78+
* libpopt-dev
79+
* libesd0-dev
80+
* liblcms-dev
81+
82+
*Note:* The above package names are for Ubuntu, other linux distributions might have slightly
83+
different naming.
84+
85+
*Note:* There are still some wrinkles in building on Linux on distributions that aren't Ubuntu 6.06 but we are working with contributors to sort these out. Also, be aware of binary compatibility – compiling an engine on your Linux system in no way guarantees it will run on someone else's (different) distribution. (Good example – building the engine on Ubuntu 12.04 will cause it to crash when run on Ubuntu 6.06!).
86+
87+
### Windows – Visual C++ 2005 ###
88+
89+
At the moment you need to use Visual C++ 2005 to build the engine on Windows along with a number of other prerequisites:
90+
* Visual C++ Express 2005:
91+
92+
http://download.microsoft.com/download/8/3/a/83aad8f9-38ba-4503-b3cd-ba28c360c27b/ENU/vcsetup.exe
93+
* Hotfix for Visual Studio / Visual C++ Express 2005:
94+
95+
http://support.microsoft.com/kb/949009
96+
* Microsoft Windows Platform SDK 6.1:
97+
98+
http://www.microsoft.com/en-us/download/details.aspx?id=24826
99+
* QuickTime SDK (requires Apple Developer account to download):
100+
101+
https://developer.apple.com/downloads/index.action?=quicktime
102+
* Microsoft Speech SDKs 4.0 + 5.1:
103+
104+
http://download.microsoft.com/download/speechSDK/Install/4.0a/WIN98/EN-US/SAPI4SDK.exe
105+
http://download.microsoft.com/download/B/4/3/B4314928-7B71-4336-9DE7-6FA4CF00B7B3/SpeechSDK51.exe
106+
107+
*Note:* Using Visual C++ Express will not allow you to build revbrowser – you need the Professional edition to do that. All the other components will build though.
108+
109+
### iOS – Xcode ###
110+
To build the iOS engines you need to use Xcode. For 'production' builds we use a range of versions depending on what version of iOS we are targetting (3.2.6 for 4.3, 4.2 for 5.0, 4.3.1 for 5.1 and 4.6 for 6.1). However, for development purposes any of these Xcode versions will do.
111+
112+
### Android ###
113+
To build android you need the following prerequisites:
114+
* JDK (appropriate to your platform): http://www.oracle.com/technetwork/java/javase/downloads/index.html
115+
* Android SDK: http://developer.android.com/sdk/index.html
116+
117+
Click “Download for Other Platforms” and select the “SDK Tools Only” package for your platform. Once downloaded and extracted, launch the SDK utility (tools/android) and install the SDK Platform package for Android 2.2 (API 8).
118+
* Android NDK:
119+
* Windows: https://dl.google.com/android/ndk/android-ndk-r6b-windows.zip
120+
* Mac OS X: http://dl.google.com/android/ndk/android-ndk-r6b-darwin-x86.tar.bz2
121+
* Linux: http://dl.google.com/android/ndk/android-ndk-r6b-linux-x86.tar.bz2
122+
123+
The Android SDK and NDK need to be placed (or symlinked) to a sub-folder of your local repository. Specifically:
124+
* <repo>/sdks/android-ndk must point to or be the NDK folder (unarchived from above)
125+
* <repo>/sdks/android-sdk must point to or be the SDK folder (unarchived from above)
126+
127+
*Note:* At the moment we only have a script for building the Android engine on Mac (tools/build-android.osx).
128+
129+
Building
130+
--------
131+
132+
With prerequisites installed, building the engine is quite straight-forward:
133+
* Mac:
134+
* Open engine/engine.xcodeproj in Xcode and choose the 'LiveCode-Community' target
135+
* Select Build → Build from the menu (or press Cmd-B)
136+
* Linux
137+
* From a command prompt and within your <repo> folder:
138+
* For debug: MODE=debug make development
139+
* For release: MODE=release make development
140+
* Windows
141+
* Open stage.sln in Visual C++ / Visual Studio
142+
* Choose Project → Build Solution from the menu
143+
* iOS
144+
* Open engine/engine-mobile.xcodeproj in Xcode
145+
* Select Build → Build from the menu (or press Cmd-B)
146+
* Android (Mac only!)
147+
* From a command prompt and within your <repo> folder type:
148+
* ./tools/build-android.osx
149+
150+
Running the engine
151+
------------------
152+
153+
*Note:* At the moment running a engine you've built (whether it be the IDE or standalone engine) is a little more fiddly than we'd like – this is high on our list to sort out though!
154+
155+
The procedure for running the IDE or Standalone engines on each platform is all slightly different as follows...
156+
157+
For the IDE engines (can use either Debug or Release profiles):
158+
* Mac (Xcode 3.2.6):
159+
* Right-click on the LiveCode-Community Executable and choose Get Info.
160+
* Switch to the Arguments tab
161+
* Add an environment variable REV_TOOLS_PATH with value $(SRCROOT)/../ide
162+
* Make sure LiveCode-Community is the active executable and click Build and Debug.
163+
* The engine should now launch using the ide folder within the local repo.
164+
* Mac (Xcode 4.x):
165+
* Click on the target selection drop-down and select LiveCode.
166+
* Click on the target selection again and choose Edit Scheme...
167+
* Choose the 'Run LiveCode-Community' section on the left.
168+
* Switch tab to Arguments
169+
* Make sure the Environment Variables section has a REV_TOOLS_PATH variable mapping to the full path to the ide folder within your local repo.
170+
* Click 'Run' and the engine should now launch using the ide within the local repo.
171+
* Linux:
172+
* Change directory to the top-level of the repository.
173+
* Create an environment variable: export REV_TOOLS_PATH=`pwd`/ide
174+
* Do:
175+
* master branch: ./_build/linux/debug/engine-community
176+
* develop branch: ./_build/linux/i386/debug/engine-community
177+
* Windows:
178+
* Right click on the engine target and choose Properties.
179+
* Switch to the Debugging page of the dialog.
180+
* Add an environment variable REV_TOOLS_PATH with value $(SOLUTION_DIR)ide
181+
* Make sure the engine target is the active target and click the run button.
182+
183+
*Note:* There's no easy means (at the moment) to use the externals built within the repo in the IDE when run as above. For now, the easiest thing to do is to copy the Externals folder from an existing (installed) copy of LiveCode into the ide folder inside the repo.
184+
185+
For the standalone engines (only works in Debug profile):
186+
* Mac (Xcode 3.2.6):
187+
* Right click on the Standalone-Community and choose Get Info.
188+
* Switch to the Arguments tab.
189+
* Add an environment variable TEST_STACK with value the path to the stack you want to run as if it had been the mainstack that had been built into the standalone.
190+
* Make sure Standalone-Community is the active executable and click Build and Debug.
191+
* The standalone engine should now launch using the given stack.
192+
* Mac (Xcode 4.x):
193+
* Click on the target selection drop-down and select standalone.
194+
* Click on the target selection again and choose Edit Scheme...
195+
* Choose the 'Run Standalone-Community' section on the left.
196+
* Switch tab to Arguments
197+
* Make sure the Environment Variables section has a TEST_STACK variable mapping to the path to the stack you want to run as if it had been the mainstack that had been built into the standalone.
198+
* Click 'Run' and the engine should now launch using the specified stack.
199+
* Linux:
200+
* Change directory to the top-level of the repository.
201+
* Create an environment variable: export TEST_STACK=<path to stack you want to use>
202+
* Do:
203+
* master branch: ./_build/linux/debug/standalone-community
204+
* develop branch: ./_build/linux/i386/debug/standalone-community
205+
* Windows:
206+
* Right click on the standalone target and choose Properties.
207+
* Switch to the Debugging page of the dialog.
208+
* Add an environment variable TEST_STACK with value the path to the stack you want to use.
209+
* Make sure the standalone target is the active target and click the run button.
210+
* iOS (Xcode 3.2.6 / Xcode 4.x):
211+
* Add you stack to the project so that it is included in the standalone-mobile target (otherwise it won't be placed in the app bundle where iOS can find it).
212+
* Search for iphone_test.livecode in the whole xcodeproj (Cmd-Shift-F).
213+
* Replace iphone_test.livecode with the name of the file (leaf) you added in the first step.
214+
* Click Build and Debug.
215+
216+
*Note:* When running the standalone engine in this fashion, none of the processes the IDE uses to build standalones are performed – you just get the given stack loaded as if it were the mainstack.
217+
218+
Contributing
219+
------------
220+
221+
TBC
222+
223+
License
224+
-------
225+
226+
See the [LICENSE](LICENSE) file.

0 commit comments

Comments
 (0)