Setting up the Build Environment

Here's how to set up your build environment in Windows. Admittedly, it is a bit more complicated than the Linux instructions (see below) because you have to set up a "Linux-like" programming environment. Actually, it is a Posix-type environment with a cross-compiler for Windows. A lot of stuff is going on in the build environment you are about to set up, but believe me, this is a lot easier than it use to be!

  1. Preparation. To avoid weird bugs, do the following. Turn off your virus scanner. It will just slow things down, and may find a false positive in the many files that you download. For example, MalwareBytes will break the installation process by flagging pacman.exe as a problem and stopping its correct operation. Uninstall or "hide" (by renaming a directory) your installations of cygwin and strawberry perl, or other packages that contain cygwin*.dll, or gcc. Another example is git bash. If those programs are in your path, remove them from the path.
  2. Go to and follow the simple instructions there. You pick the i686 version of the package if you are in 32-bit Windows; you pick the x86_64 version of the package for 64-bit Windows. Make sure that you use the default directory suggested, msys64 or msys32, depending on which platform you are on.
  3. Be sure to follow the instructions, including the one about closing the window after step 6. Use the Red X and allow Windows to kill the process(es) that are associated with it. Restart the MSys2 Shell from Start | All Programs | MSYS2 64bit | MSYS2 Shell (I'm assuming a 64-bit shell here, but you may use a 32-bit shell just as well.)
  4. Make sure that your shortcuts are updated properly so that they will start msys and mingw properly:
    * MSYS2_ROOT\msys2_shell.cmd -mingw32
    * MSYS2_ROOT\msys2_shell.cmd -mingw64
    * MSYS2_ROOT\msys2_shell.cmd -msys
  5. You have to do things a bit different if you going to use the 64-bit toolchain (x86_64) or the 32-bit toolchain (i686). On a 64-bit version of Windows, you can use either one. Be careful which shell you are using.
  6. Start a mingw-w64 Win64 shell and install the 64-bit toolchain: pacman -S mingw-w64-x86_64-toolchain --or--
    Start a mingw-w64 Win32 shell and install the 32-bit toolchain: pacman -S mingw-w64-i686-toolchain
  7. For the above, install package numbers "1,2,3,7,9-16" by typing just what I have in quotes (I did not include packages ada, objc, or fortran).
  8. Did I mention that you need to start a MINGW shell? You do not want to use the MSYS shell now. It is only necessary sometimes, like when initially bootstrapping up the development environment. After that, MINGW shells are what you should use.
  9. Wait for it to download a bunch of stuff. You can watch if you want. It's like watching grass grow.
  10. pacman -S base-devel and make sure to select all the packages (the default)
  11. After awhile, you will have to update your msys2 system because it will become out-of-date. Sometimes you might NOT want to do that if the build environment is working very well, since change to msys2 can break your build env. Anyway, if you need to update, run the command: pacman -Syuu. Repeat this until no packages are updated. This can be done in an msys2 shell or a mingw shell.
  12. wget
  13. Run ./ ...... It determines what to download based on the MSYSTEM environment variable. It downloads a bunch of packages and git clones the source code repository onto your system. Wait. Note if it complains about zlib1.dll, and take the appropriate action, as this can really mess things up.
  14. The source code repo will be in 32bit/bibledit-desktop or 64bit/bibledit-desktop depending...
  15. 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-desktop/windows/bash_profile. If you want, just cp ~/64bit/bibledit/gtk/windows/bash_profile ~/.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.
  16. 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.
  17. Verify that "gcc --version" says 5.4.0 or later. If not, exit the Mingw shell and restart it. Check again. If you have no gcc in the path, then you forgot to install the toolchain. Do step 8 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 I forget that I need to install the 32-bit toolchain.
  18. Don't go to the next step until gcc --version reports the right thing.

Doing the Build

  1. cd 32bit/bibledit-desktop or cd 64bit/bibledit/desktop
  2. ./
  3. ./configure
  4. make
  5. We use a special installation script on Windows. You have to run this inside a mingw shell that has Administrator rights. (Right click its icon and select the option "Run as administrator.")
  6. ./windows/
  7. This creates either C:\Program Files (x86)\Bibledit-4.9.3 (32-bit) or C:\Program Files\Bibledit-4.9.3 (64-bit)
  8. Within that directory, it creates \editor\... and puts all the files needed to run Bibledit
  9. Create a shortcut on your desktop pointing to the appropriate editor\bin\bibledit-desktop.exe file.
  10. Give it an icon, say %ProgramFiles%\Bibledit-4.9.3\editor\bin\bibledit.ico
  11. Make sure the shortcut working directory is something like C:\Program Files (x86) \Bibledit-4.9.3 or C:\Program Files\Bibledit-4.9.3 (but with the version number appropriately modified)
  12. Follow the instructions in optional step #2 and #3 found in bibledit/gtk/windows/INSTALLLING.txt. This will guide you through the installation of php-cli and xetex so that you will have the necessary support programs and won't get error messages about them missing.
  13. NOTE: Don't bother trying to run ./src/libs/bibledit-desktop.exe because it won't work. Bibledit-desktop.exe needs to be situated in a running directory where it has access to a bunch of library code, fonts, and other shared resources. You need to run to get it into a happy home before it will run properly.
  14. Now go to Code Development on Linux or Windows
  15. Or, go to if you want to create an install package to distribute.

Building a Windows Installer

These instructions describe how to build the Windows installer package. It is a self-extracting executable that you can use to install Bibledit on another computer without having to install the entire build environment. We will assume that you are on a 64-bit Windows environment and will be building the installer for the same.

  1. Make sure you run the MinGW-w64 Win64 Shell as administrator.
  2. cd bibledit-desktop
  3. windows/ --strip --generateinstall
    The --strip option shrinks the executable sizes.
    The --generateinstall option tells to create the self-extracting installer.
  4. The entire process takes under 2 minutes on Windows 7 Pro with an SSD.

Last updated 5/25/2017.

© 2004-2019 Fellowship Bible Church | 2775 Bedford Road, Ann Arbor, MI 48104 | 734-971-2837 | Privacy Policy | Sitemap

Home | Connect | Learn | Grow | Community | Bible | Members

Facebook  Twitter  YouTube