-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILDING.txt
71 lines (69 loc) · 5.48 KB
/
BUILDING.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
This is a description of how to build bibledit-gtk on Windows from scratch.
Written by Matt Postiff, [email protected], 3/21/2016
Revised: 3/24/2016
Outated of of 5/25/206
See latest updates to these instructions at http://fbcaa.org/cms/bible-resources/bibledit/developers/create-build-windows
Bibledit Build Environment Instructions
1. Go to http://msys2.github.io/ and follow the simple instructions there. Make sure that you use the default directory suggested, msys64 or msys32, depending on which platform you are on.
2. When the shell window pops up, run update-core as instructed in the website above. Be sure to follow the instructions about closing the window with the Red X and permit Windows to kill the process(es) that are associated with it.
3. Restart the MSys2 Shell from Start | All Programs | MSYS2 64bit | MSYS2 Shell
4. Run pacman -Su and answer Y to the question. Watch it install a bunch of stuff.
5. Kill the MSys2 shell again with the Red X. Restart it.
6. You have to do things a bit different if you are using the 64-bit toolchain (x86_64) or the 32-bit toolchain (i686). Be careful.
7. Install the toolchain
a. pacman -S mingw-w64-x86_64-toolchain --or-- pacman -S mingw-w64-i686-toolchain
b. I selected to install 1,2,3,7,9-16 (I did not include packages ada, objc, or fortran).
c. Wait for it to download a bunch of stuff. That is, go get some coffee.
8. Download the buildenvWin64.sh or buildenvWin32.sh script, put it into your home directory (C:\msys64\home\postiffm\buildenvWin64.sh, for example). Run it from a Mingw 64 shell of the appropriate bit size (32 or 64).
a. ./buildenvWin64.sh. It determines what to download based on the MSYSTEM environment variable.
b. buildenvWin32.sh is not yet created.
c. Wait for it to download a bunch of stuff. That is, go get some more coffee.
d. I believe it takes the username from your Windows account. You probably can create another one if you like but I haven't looked into how to point the shells to use that directory).
9. Verify some things
a. Quit the shell you are in and start a MinGW-w64 MINGW64 or MINGW32 shell. That is also in the MSys2 64bit or 32bit Start Menu folder, but note that it is a different shell than the MSys2 shell. Note: The idea is that you install packages from an msys shell; you use the packages from the MinGW shell of your choice. So the building of bibledit will actually happen in a mingw shell (either 32 or 64 bits)
b. Verify by "which gedit" whether /mingw64/bin/gedit is present. Run it and it should work. This is your test that all is well so far.
c. Modify your /home/username/.bash_profile so that the path doesn't have a bunch of Windows cruft in it. This will avoid a multitude of problems. For instance, if gcc points to some other gcc on your system (on mine, strawberry/gcc), then you will have problems. You can use the sample in bibledit/gtk/windows/bash_profile. It has a section where it looks at $MSYSTEM to determine what path to set, and it does NOT add the old ${PATH} back to the end of the new PATH.
d. Verify that "gcc --version" says 5.3.0 or newer. If not, exit the Mingw 64 shell and restart it. Check again. If you have no gcc in the path, then you forgot to install the toolchain. Do step 7 again. I have done this several times when I install the x86_64 (64-bit) tools and then later add on the i686 (32-bit) tools using buildenvWin.sh. I forget that I need to install the 32-bit toolchain.
e. Don't go to the next step until gcc --version reports the right thing.
10. cd 32bit/bibledit/gtk --or-- cd 64bit/bibledit/gtk
a. Note that the buildenvWin64 script automatically does a git clone of the bibledit sources from github, and places it into either 32bit/bibledit or 64bit/bibledit, depending on the environment that it sees when you run it.
11. ./autogen.sh
a. The output should look like this, with no fatal errors popping up:
Running autoreconf...
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:14: installing './compile'
configure.ac:7: installing './config.guess'
configure.ac:7: installing './config.sub'
configure.ac:11: installing './install-sh'
configure.ac:11: installing './missing'
Makefile.am: installing './INSTALL'
git/Makefile.am: installing './depcomp'
Creating m4/aclocal.m4 ...
Running glib-gettextize... Ignore non-fatal messages.
./autogen.sh: line 18: glib-gettextize: command not found
Making m4/aclocal.m4 writable ...
Running intltoolize...
Running aclocal...
Running libtoolize...
Running autoheader...
Running autoconf...
Running automake...
You should now run ./configure, then make, then make install...
12. ./configure
13. make
a. There will be some warnings about BIBLEDIT_LOCALEDIR being redefined.
Ignore these. I hope to fix them later in a small revision of the build
system where I will also remove duplication of -I directives in the
compiler command line.
b. Wait a while for the build to complete. No more coffee. Do something else!
14. If you run src/bibledit-gtk.exe, it will start up, but most likely will
not run correctly because it is not installed in an environment where all its
libraries and tools reside. See the next step.
15. Read bibledit-gtk/windows/INSTALLING.txt.