Development on Windows
Development on Windows
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
- Download and install msys2
- Download and install MinGW-w64. Select version 4.9 and pthreads when installing.
- 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).
- 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).
- Go to www.mingw.org and click on "Download Installer"
- 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
- Click Installation and Apply changes.
- Add :\MinGW\bin;C:\MinGW\MSYS\1.0\bin to the end of the PATH environment variable for your system (or user).
- Open control panel
- Find System and open
- Click Change settings near the computer name section.
- In the "System Properties" Window click on the Advanced tab.
- Press the Environment variables button
- Find "Path" or "PATH in the system list then click edit.
- Append :\MinGW\bin;C:\MinGW\MSYS\1.0\bin then click ok.
- Configure MSYS to mount mingw when loaded.
- Open C:\MinGW\msys\1.0\etc and copy fstab.sample and rename it to fstab
- 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
- Save then close.
- Open C:\MinGW\msys\1.0 and create a shortcut to msys.bat on your desktop (or wherever you like).
- 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.
- go to http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
- download the file pkg-config_0.26-1_win32.zip
- extract the file bin/pkg-config.exe to C:\MinGW\bin
- download the file gettext-runtime_0.18.1.1-2_win32.zip
- extract the file bin/intl.dll to C:\MinGW\bin
- go to http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28
- download the file glib_2.28.8-1_win32.zip
- 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:
- Run the MSYS shell (see Setup above for more information)
- change to the directory you have cloned echo-dependencies to.
cd /c/Projects/echodeps
- 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.
- Run edepbuild and build zlib first ./edepbuild windows zlib
- 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
- 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
- Clone Echo3
- Open Netbeans and load the Echo3 project
- Select the Windows configuration
- Build
- Last Author
- Timotheos
- Last Edited
- Sep 15 2017, 10:50 PM