-
Notifications
You must be signed in to change notification settings - Fork 6
Developers
If you are here, then you know that the code is stored on github. Bug and requests should be reported in the "Issues" section.
The main development line is in the master branch. The gtk3 branch contains unstable code in which we are upgrading bibledit from gtk2 and libwebkit1 to gtk3 and webkit2. It is fairly workable. The experimental editor is a current bottleneck that needs work. It is present in both the master and gtk3 branches.
If you are going to build, develop, and debug Bibledit-Desktop, you can do so on a Linux computer with 4 GB of RAM and not much hard disk space. That is not ideal, but it works OK. An SSD and 8 GB of RAM would be great.
If you are on Windows and running Linux inside a virtual machine like VMWare or VirtualBox, you should allocate it 6 to 8 GB and have a pretty fast hard drive. At least two processors set aside for it would be good. You only need to give the virtual machine 32 GB of hard drive, and you can do it with somewhat less if you are careful. This means your Windows computer should have at least 16 GB ideally, or 12 GB, to run both Windows and the virtual machine at the same time.
Bibledit itself doesn't need this much horsepower. However, the process of developing, compiling, debugging, and moving quickly between windows requires somewhat more horsepower.
We use KDevelop, VSCode, and CodeBlocks. You can use emacs if you want, but it is a bit dated. :-)
For KDevelop, we have a project file already in the repository.
For CodeBlocks, I'm not sure what to tell you as of yet.
Learn the devhelp program and how to install new documentation packages for it. It is often easier than trolling around in Google or stackoverflow to find what you need.
See linux/DEBUGGING.txt and linux/PROFILING.txt for some tips on debugging in Linux.
See windows/DEBUGGING.txt and other files in that directory for tips on development in Windows.
For VSCode, visit https://medium.com/@LicHacker/debugging-c-with-vscode-and-gdb-a266eec287e3 to see how to hook up GDB. This works very well on Ubuntu, for example. However, note that if you are needing to do serious debugging, you will want to get rid of -O2 in the Makefile because that level of compiler optimization makes debugging too confusing. Of course, doing this may get rid of a bug (like an uninitialized variable which is treated differently by the compiler optimizer). That is fairly rare, but be aware of it.
Please include as much information as possible. Include the /tmp/bibledit/bibledit.log file, or a copy-and-paste of the Help | System log window. If you know how to run gdb, do that, and copy and paste a backtrace from it. If you can include the contents of your ~/.bibledit folder (tar -czf bibledit.tar.gz .bibledit) that would be helpful.
Here's how to set up your build environment in Ubuntu 16.04 LTS or ArchLinux. I will assume you can adapt these instructions for your flavor of Linux if it is not one of those.
- Make sure you have git (on Ubuntu: sudo apt-get install git)
- cd ~
- git clone https://github.com/postiffm/bibledit-desktop.git
- bibledit-desktop/linux/buildenvLinux.sh [this supports Ubuntu quite well; pacman-based Linux like Arch have some support]
Doing the Build
- cd bibledit-desktop
- Note: if you want to build an experimental branch, you first must change branches: git checkout gtk3 or git checkout webkit2
- ./autogen.sh
- ./configure (or something like ./configure --prefix=/home/user)
- make
- sudo make install (or just make install if you configured to a prefix folder that you own)
- Run the program from /usr/bin/bibledit-desktop (or ~/bin/bibledit-desktop if you configured as above)
- I recommend you lock the icon in Ubuntu launcher.
This worked on an ARM64 Chromebook, 4 GB RAM. The Linux environment is Debian Stretch. Thanks to J. Wiley for these build instructions.
- git clone https://github.com/postiffm/bibledit-desktop.git
- sudo apt install make
- sudo apt install gnome-builder
- sudo apt-get install gnome-software gnome-packagekit
- sudo apt install libxml2-dev
- sudo apt install libgtk-3-dev
- sudo apt install libgtk-2-dev
- sudo apt install libgtk-dev
- sudo apt install libgtk2.0-dev
- sudo apt install rcs
- sudo apt install libsqlite3-dev
- sudo apt install libglibmm-2.4-dev
- sudo apt install enchant
- sudo apt install enchant-dev
- sudo apt install libenchant-dev
- sudo apt install libgtksourceview2.0-dev
- cd bibledit-desktop/
- ./autogen.sh & ./configure
- make -j 1
- sudo make install -j1
- /usr/bin/bibledit-desktop -debug
See https://www.fbcaa.org/bible-resources/bibledit/developers/create-build-windows.
Also, see below for some old instructions on how to build on MinGW, credit to Dan Dennison.
When installing Bibledit from source, at one stage you run:./configure
If your system has been prepared for bibledit installation, then all should go well. There should be no error messages.
If there is an error regarding the MySQL database, check whether this database has been installed and is running.
If the above is the case, and there is still an error, then it could be related to the password to access the database.When Bibledit gets configured, it has a default password of "root" for the database root user. On your system the value is probably different.
You can pass the root password of the database to the configure script:./configure --with-mysql-root-password=mysecret
The above uses password "mysecret".
Bibledit has been tested with the Apache web server. The ./configure script is capable of finding the web server document root on several distributions. If you like to use a special location for the document root, you can pass that to the ./configure script:./configure --with-web-document-root=/home/joe/publicThe above changes the web server document root for Bibledit to /home/joe/public.
These are very old, but the instructions are here for future reference. To create a build environment in Windows from scratch takes a LOT of work.
My approach uses Debian's MinGW cross-compiler. If you use a different MinGW build environment, you should still be able to grok this. Some Linux distributions such as Fedora and OpenSUSE even have MinGW package repositories.
An example, beta-quality release of Bibledit 3.7.48 using this technique can be found here.
Click here to download Windows Installer MSI package for Bibledit 3.7.48.
Release Notes:
-
Requires Windows XP or later. Might work on 2000, but some functionality might not. -
You must install msysgit and place the Git tools in the system path. Git, a version control system, is required for proper function of Bibledit. -
You must install Bibledit to a NTFS partition. FAT type partitions are experimental. You must use PortableGit if you use FAT. This means that installing to a typical (FAT) USB stick is probably not going to work. -
Windows Outpost is required for printing, web browsing, and BibleWorks integration. -
BibleWorks integration requires version 7 or greater -
Printing requires a PDF reader (Acrobat 9 tested). -
SIL/Graphite (NRSI) fonts are supported using the Graphite backend to Pango (pango-graphite). If there is demand, future builds will include this by default.
Known Issues:
-
Context-sensitive help buttons are broken in this build. It might even crash Bibledit. -
The startup script has a bug that prevents proper startup sometimes when you restart the app.
This beta release is quite a bit more stable than previous. Give it a try! Backup early and often. Please use this on production projects, now that the git integration and USB/remote repositories is functional. As with all Free Software, it comes with no warranty for suitably for any purpose.
Without fuirther ado, here's how to build this using Debian or Ubuntu:
-
apt-get install mingw32 -
Get mingw-configure to make the configuration for cross-compiling much easier, however, for some reason, the Makefiles sometimes call pkg-config themselves, so they end up getting the build system's config and not the cross-config. You might need to temporarily make your pkg-config point to your win32 build root. (http://live.gnome.org/Cross%20compiling%20GTK%2B%20for%20Win32) - Create a cross-compile root directory and unpack all of the binaries listed below into it. Set the ROOT environment variable to it.
-
SQLite needs a pkg-config file. Copied mine and inserted into $ROOT/lib/pkgconfig -
MinGW seems to have a broken realloc in their cstdlib. Based on some possibly bad advice, I commented it out ;) - OpenSUSE/MinGW WebKit comes with RPM files that are designed for the OpenSUSE MinGW build system. Either use OpenSUSE, or use the alien command to convert the RPMs to tar.gz, using the '-t' flag of alien. Once done, extract the relevant subtree into your ROOT. You will need to modify the OpenSUSE pkg-config files to work correctly.
-
You need to have a native pkg-config, but /usr/bin/pkg-config needs to report the cross-compiled pkg-config state. Suggestion: Point /usr/bin/pkg-config at the custom pkg-config script created by mingw-configure, and point that custom pkg-config script to /usr/bin/pkg-config.dist - The prebuilt MinGW libxml2 doesn't have a xml2-config. Took my system's copy and changed its prefix, placed it in the $ROOT/bin directory. Ran configure like so:
-
XML2_CONFIG=$ROOT/bin/xml2-config ../mingw-configure --prefix=$ROOT -
Unfortunately, /usr/bin/xml2-config is still hardcoded in places, so I did a hack similar to the pkg-config one, where /usr/bin/xml2-config points to $ROOT/bin/xml2-config ... In light of these 2 issues, it might make sense to add $ROOT/bin as a prefix in your $PATH.
- Unless you want to cross-compile practically the entire known Gtk+ GNOME universe, grab the following binaries from http://ftp.gnome.org/pub/gnome/binaries/win32 (some of them are under the dependencies directory):
enchant-1.4.2-tml.zip
enchant-dev-1.4.2-tml.zip
fontconfig-2.4.2-tml-20071015.zip
fontconfig-dev-2.4.2-tml-20071015.zip
freetype-2.3.6.zip
freetype-dev-2.3.6.zip
GConf_2.22.0-2_win32.zip
GConf-dev_2.22.0-2_win32.zip
gettext-runtime-0.17-1.zip
gettext-runtime-dev-0.17-1.zip
gnome-vfs_2.24.0-1_win32.zip
gnome-vfs-dev_2.24.0-1_win32.zip
gtk+-bundle_2.14.7-20090110_win32.zip
gtkhtml-3.18.2.zip
gtkhtml-dev-3.18.2.zip
gtksourceview-2.4.1.zip
gtksourceview-dev-2.4.1.zip
libart_lgpl-2.3.20.zip
libart_lgpl-dev-2.3.20.zip
libbonobo_2.24.0-1_win32.zip
libbonobo-dev_2.24.0-1_win32.zip
libbonoboui_2.24.0-1_win32.zip
libbonoboui-dev_2.24.0-1_win32.zip
expat_2.0.1-1_win32.zip
libglade_2.6.3-1_win32.zip
libglade-dev_2.6.3-1_win32.zip
libgnome_2.24.1-1_win32.zip
libgnomecanvas-2.20.1.zip
libgnomecanvas-dev-2.20.1.zip
libgnome-dev_2.24.1-1_win32.zip
libgnomeui-2.22.1.zip
libgnomeui-dev-2.22.1.zip
libgnurx-2.5.zip
libiconv-1.9.1.bin.woe32.zip
libIDL_0.8.11-1_win32.zip
libxml2-2.6.27.zip
libxml2-dev-2.6.27.zip
ORBit2_2.14.16-1_win32.zip
ORBit2-dev_2.14.16-1_win32.zip
popt-1.10.2-tml-20050828.zip
popt-dev-1.10.2-tml-20050828.zip
-
WebKit is required also, and our friends at OpenSUSE have built it for us:
http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Factory/noarch/
From there, grab:
mingw32-libwebkit-1.1.7.noarch.rpm
mingw32-libwebkit-devel-1.1.7.noarch.rpm
mingw32-gnutls-2.6.6.noarch.rpm
mingw32-libgnutls-2.6.6.noarch.rpm
mingw32-libgnutls-devel-2.6.6.noarch.rpm
mingw32-libsoup-2.26.2.noarch.rpm
mingw32-libsoup-devel-2.26.2.noarch.rpm
- Since GNOME and OpenSUSE together aren't quite the entire universe, grab these too from their respective locations, or have even more fun compiling:
sqlite-amalgamation-3_6_10.zip (just the headers) - from http://www.sqlite.org/download.html
sqlitedll-3_6_10.zip - from http://www.sqlite.org/download.html
aspell-w32-0.50.3.zip - from http://ftp.gnu.org/gnu/aspell/w32
Git-1.6.3.2-preview20090608.exe - from http://code.google.com/p/msysgit/
zip232xN.zip (zip.exe) - from http://www.info-zip.org/
unz552xN.exe (unzip.exe) - from http://www.info-zip.org/
diffutils-2.8.7-1-bin.zip - from http://gnuwin32.sourceforge.net
patch-2.5.9-7-bin.zip - from http://gnuwin32.sourceforge.net
- Some debugging tools are included:
GDB for MinGW - gdb-6.8-mingw-3.tar.bz2 - http://mingw.org
Dependency Walker - depends22_x86.zip - http://dependencywalker.com/
Development builds include a copy of gprof from MinGW binutils.
-
Finally, it goes without saying that anything that isn't Bibledit is copyright its respective holder. Please check the README and COPYING files in the above packages for redistribution and licensing details.
Visit the web page for Bibledit-Desktop at bibleditdesktop.org