-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINSTALL.Mac.txt
230 lines (133 loc) · 7.31 KB
/
INSTALL.Mac.txt
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
HOWTO Install Emdros on a Mac OS X
Last update: January 3, 2023
Overview:
- Installing from .dmg
- Installing from source
Installing from .dmg
====================
DMG images are sometimes made available via:
http://emdros.org/download.html
To install Emdros from a .dmg:
1) Open the .dmg by double-clicking it
2) Drag the applications inside of the .dmg to your Application folder.
The rest is only needed if you wish to use Emdros from the command
line, and/or you wish to develop software using Emdros.
3) Open a shell
4) cd to /Volumes/whatever-the-dmg-was-loaded-as/development/
5) Run ./install_mac.sh
This takes an optional argument, which is the install prefix. If
no argument is given, then Emdros is installed in
${HOME}/opt/Emdros@VERSION@, where "@VERSION@" is the current Emdros
version.
Examples of usage:
$ ./install_mac.sh
$ sudo ./install_mac.sh /usr/local
$ sudo ./install_mac.sh /usr
$ sudo ./install_mac.sh /opt/Emdros
Note that any of the above installs Emdros in the specified
location; thus you only need to do it once!
6) If you wish to use SWIG, then you must manually copy the
appropriate files in development/SWIG/*/ to the place where you
wish to use the files.
The binaries provided by the author have support only for SQLite 2 and
SQLite 3. No support for MySQL or PostgreSQL is provided. In case
you want to have support for these backends, please follow the
instructions in the next section.
Installing from source
======================
In order to install from source, you should first install Xcode from
Apple's developer site. You should also compile and install wxWidgets
2.8.12 or later, or wxWidgets 3.0.3 or later (available from
www.wxwidgets.org).
Prerequisites
-------------
1) Install Xcode from Apple Developer Connection:
http://developer.apple.com ... or from the App Store.
2) Install the latest Xcode command line tools by opening a Terminal,
then issuing this command:
xcode-select --install
Then follow the prompts to install the latest command line tools.
Obtaining wxWidgets
-------------------
You have two options for obtaining wxWidgets.
1) Install using HomeBrew.
2) Compile it yourself from the sources.
Each is detailed below.
Install wxWidgets using HomeBrew
--------------------------------
$ brew install wxwidgets --universal
The --universal switch is important. Leaving it off will give you a
lot of linking errors later, when compiling Emdros.
Compiling wxWidgets from source code
------------------------------------
Download the latest sources from: http://www.wxwidgets.org/
When installing wxWidgets, you should install it, e.g., in
$HOME/opt/wxWidgets-3.2.1, then add $HOME/opt/wxWidgets-3.2.1/bin to
the beginning of your path. That way, the wx-config program picked up
by the Emdros configure script will be the newly installed wx-config
program rather than the native Mac OS X wx-config.
1) Install wxWidgets 3.2.1 or later in $HOME/opt/wxWidgets-3.2.1
1a) mkdir -p ~/build/wxWidgets && cd ~/build/wxWidgets
1b) tar xfvz /path/to/wxWidgets-Sources-tarball/wxWidgets-3.2.1.tar.gz
(Note: Please replace this with whatever is true on your system).
1c) Enter into the thusly created sources directory. E.g.:
cd wxWidgets-3.2.1
1d) mkdir osxbuild && cd osxbuild
1e) When running wxWidget's configure-script, do this:
If on Mac OS X 10.10 or later:
CXX="g++ -std=c++11 --stdlib=libc++" ../configure --prefix=${HOME}/opt/wxWidgets-3.2.1 --with-osx_cocoa --enable-macosx_arch=i386,x86_64 --disable-shared --disable-dependency-tracking --with-expat=builtin --with-zlib=builtin --with-macosx-version-min=10.10
If on Mac OS X 10.14 or later:
CXX="g++ -std=c++11 --stdlib=libc++" ../configure --prefix=${HOME}/opt/wxWidgets-3.2.1 --with-osx_cocoa --enable-macosx_arch=x86_64 --disable-shared --disable-dependency-tracking --with-expat=builtin --with-zlib=builtin --with-macosx-version-min=10.13
If on macOS 11 (Big Sur) or later:
WXWIDGETS_VERSION=`cat ../configure.in | grep AC_INIT | awk -F '[' '{print $3}' | awk -F ']' '{print $1}'` CXX="g++ -std=c++11 --stdlib=libc++" ../configure --prefix=${HOME}/opt/wxWidgets-$WXWIDGETS_VERSION --with-osx_cocoa --disable-shared --disable-dependency-tracking --with-expat=builtin --with-zlib=builtin --enable-macosx_arch="x86_64,arm64" --with-macosx-version-min=10.15
1f) make && make install
Compiling Emdros from sources
-----------------------------
First, make sure you've installed Universal binaries of wxWidgets as
detailed above.
However, please note that building Emdros with
--enable-universal_binary is is not supported when compiling with
PostgreSQL and MySQL backends included.
In order to compile with MySQL, you should install the latest official
binaries for Mac OS X from www.mysql.com, although the author probably
has not tested this combination. You might have luck with the fink or
macports versions of MySQL, but this configuration has probably not
been tested either. Please contact the author via the email in the
AUTHORS file if you run into problems.
PostgreSQL is not supported on Mac OS X by the author of Emdros. You
may have luck, though, if you install PostgreSQL via fink or macports.
This is, however, not supported by the author of Emdros.
1) If you installed wxWidgets from HomeBrew, you can skip this step.
Otherwise, if you installed wxWidgets by compiling it from source,
you need to put wx-config in your PATH:
Put ${HOME}/opt/wxWidgets-3.0.2 at the BEGINNING of your PATH, so
that ${HOME}/opt/wxWidgets-3.0.2/bin/wx-config from your fresh
installation of wxWidgets will be used, rather than the native Mac
OS X wx-config. This is best done by putting the following line at
the bottom of your ~/.bash_profile or ~/.bashrc file:
export PATH=${HOME}/opt/wxWidgets-3.0.2/bin:$PATH
It does not matter if, say, /sw/bin (from fink) is in front... what
matters is that ${HOME}/opt/wxWidgets-3.0.2/bin comes *before* /usr/bin,
where the normal wx-config resides.
2) Unpack the emdros sources (e.g., in ~/build/emdros):
tar xfz /path/to/Emdros-sources/emdros-3.X.X.tar.gz
then cd to the root of the sources, and do
export CFLAGS="-O3" CXXFLAGS="-O3" && ./configure --disable-debug --with-wx --enable-universal_binary --disable-dependency-tracking --with-sqlite3=local --enable-local-zlib --enable-local-pcre --with-swig-language-python2=no --with-swig-language-python3=no --with-swig-language-java=no --with-swig-language-csharp=no --with-swig-language-php7=no --with-swig-language-php8=no --with-swig-language-nodejs=maybe
Please see the INSTALL file in the root of the sources for other
switches you can give to configure.
3) Run make
make
4) If you wish to make a .dmg image, you can do as follows:
4a) Copy the Emdros source code to the directory one step upwards
from the root of the source code.
cp /path/to/Emdros-sources/emdros-3.X.X.tar.gz ..
4b) make macdist
This should build a .dmg image, and you can then proceed as in the
instructions above for using a .dmg image.
5) You can, however, also opt for installing using "make install":
sudo make install
Step number (4) should build a .dmg image. If it doesn't, PLEASE let
the author know via ulrikp<write-the-sign>scripturesys<dot>com.
Thanks.
Enjoy!
Ulrik Sandborg-Petersen