Page MenuHomePhabricator

Development on Windows
Updated 2,417 Days AgoPublic

NOTE: This is a work in progress. This is not guaranteed to work.

This document describes two different configurations to attempt to set up your environment for Windows development.

NOTE: @0xseantasker recently had success building Echo using Ubuntu for Windows on Windows 10 using the bash shell. This is a complete Ubuntu environment and actually builds Ubuntu packages rather than Windows packages. However, it is still a useful way to allow you to build if you're using Windows. Echo will build out of the box in the Ubuntu bash shell if you run Echo Installer, however to run applications you will need to install an X Server in Windows and have it running to allow the X client (application) to connect and display anything.

MinGW-w64 + MSYS2

Useful read

  1. Download and install msys2
  2. Download and install MinGW-w64. Select version 4.9 and pthreads when installing.
  3. Assuming you install MSYS2 to C:\msys64. Modify etc/fstab to include C:\mingw-w64\x86_64-4.9.2-posix-seh-rt_v3-rev1\mingw64 /mingw64 (or match your install location).
  4. Go to C:\msys64 and run msys2w64_shell.bat then execute the following commands (you may be able to issue a single command but I didn't.
pacman -S autoconf
pacman -S automake
pacman -S libtool
pacman -S make

WARNING: Incomplete...

MinGW + MSYS (Not the same as above)

You can build on Windows using MinGW and MSYS.

Setup

Download and Install Netbeans for windows (You will need the Java JDK/RE as well).

  1. Go to www.mingw.org and click on "Download Installer"
  2. When the MinGW Installation Manager comes up select the following:
    • Some of these may select automatically when you mark others. I cannot remember which was selected automatically though.
    • mingw32-autoconf
    • mingw32-automake
    • mingw32-autotools
    • mingw32-base
    • mingw32-binutils
    • mingw32-gcc
    • mingw32-g++
    • mingw32-gdb
    • mingw32-make
    • msys-base
    • msys-bash
    • msys-binutils
    • msys-core
    • msys-make
    • msys-sed
    • msys-base
  3. Click Installation and Apply changes.
  4. Add :\MinGW\bin;C:\MinGW\MSYS\1.0\bin to the end of the PATH environment variable for your system (or user).
    1. Open control panel
    2. Find System and open
    3. Click Change settings near the computer name section.
    4. In the "System Properties" Window click on the Advanced tab.
    5. Press the Environment variables button
    6. Find "Path" or "PATH in the system list then click edit.
    7. Append :\MinGW\bin;C:\MinGW\MSYS\1.0\bin then click ok.
  5. Configure MSYS to mount mingw when loaded.
    1. Open C:\MinGW\msys\1.0\etc and copy fstab.sample and rename it to fstab
    2. Edit fstab to look like this:
#You can use a # as the first character on the line as a comment indicator.
#Blank lines are ignored.

#Win32_Path		Mount_Point
c:/mingw		/mingw
    1. Save then close.
  1. Open C:\MinGW\msys\1.0 and create a shortcut to msys.bat on your desktop (or wherever you like).
  2. Now open the shortcut (or the bat file directly) and it will open a shell. This shell is a bit like a shell in Linux. The usual tools should be available, for example gcc, make, etc.-config**

Instructions grabbed from here
This is a step-by-step procedure to get pkg-config working on Windows, based on my experience, using the info from Oliver Zendel's comment.

I assume here that MinGW was installed to C:\MinGW. There were multiple versions of the packages available, and in each case I just downloaded the latest version.

  1. go to http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
  2. download the file pkg-config_0.26-1_win32.zip
  3. extract the file bin/pkg-config.exe to C:\MinGW\bin
  4. download the file gettext-runtime_0.18.1.1-2_win32.zip
  5. extract the file bin/intl.dll to C:\MinGW\bin
  6. go to http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28
  7. download the file glib_2.28.8-1_win32.zip
  8. extract the file bin/libglib-2.0-0.dll to C:\MinGW\bin

Building

Dependencies

Building dependencies can be done with the edepbuild script specifying the platform "windows"
After cloning the echo-dependencies repository:

  1. Run the MSYS shell (see Setup above for more information)
  2. change to the directory you have cloned echo-dependencies to.
cd /c/Projects/echodeps
  1. Make sure you have the X folder here. At the time of writing the script does not automatically retrieve the X folder. Contact @0xseantasker to grab a copy of this or pressure him to update the script to acquire the contents for the X folder.
  2. Run edepbuild and build zlib first ./edepbuild windows zlib
  3. Now run the command to build all (this is required because edepbuild assumes there aren't any dependencies between the libraries in X which is not the case. libpng depends on zlib which is why we build it first. This is a temporary hack to get around the lack of build order support. ./edepbuild windows
  4. Sit back and relax. The process will take some time but should produce output in the opt/windows folder.
NOTE: If you experience problems building boost (like errors with cp not creating hardlinks) then you can work around this issue by copying the X/boost folder to windows so you end up with windows/boost. You need to copy it and not rename the folder otherwise the script doesn't see them as the same.X/boost folder to windows so you end up with windows/boost. You need to copy it and not rename the folder otherwise the script doesn't see them as the same.

Echo

  1. Clone Echo3
  2. Open Netbeans and load the Echo3 project
  3. Select the Windows configuration
  4. Build
Last Author
Timotheos
Last Edited
Sep 15 2017, 10:50 PM

Event Timeline

Timotheos moved this document from Restricted Phriction Wiki Document.Sep 15 2017, 10:50 PM
0xseantasker changed the visibility from "All Users" to "Public (No Login Required)".Mar 6 2019, 4:41 PM