Binary packages

To install, open cmd.exe and run Cygwin's setup tool with the following parameters:

cmd> setup.exe --packages gambas3

Compilation from source

Gambas 3.9.2 and later can be compiled on Cygwin following these steps:

Step 1a. Open cmd.exe and run Cygwin's setup-x86_64.exe tool with the following parameters to install the (build) dependencies:

cmd> setup-x86_64.exe --packages curl,patch,xdg-utils,pkg-config,gcc-core,gcc-g++,automake,autoconf,libtool,libffi-devel,libpcre-devel,zlib-devel,libcairo-devel,libsqlite3-devel,libdbus1-devel,libXtst-devel,libgnome-keyring-devel,libgsl-devel,libgtk2.0-devel,librsvg2-devel,libgtkglext1.0-devel,libgdk_pixbuf2.0-devel,libImlib2-devel,libxml2-devel,libgstreamer1.0-devel,libgmime2.6-devel,libncurses-devel,libcurl-devel,libglib2.0-devel,libGL-devel,libGLEW-devel,libGLU-devel,openssl-devel,libpoppler-devel,libSDL-devel,libSDL2-devel,libSDL2_ttf-devel,libSDL_ttf-devel,libSDL_mixer-devel,libSDL2_mixer-devel,libxslt-devel,libQt5Core-devel,libQt5Gui-devel,libQt5WebKit-devel,libQt5Svg-devel,libQt5X11Extras-devel,libQt5Widgets-devel,libQt5PrintSupport-devel,libQt5Network-devel,libQt5Xml-devel,libQtCore4-devel,libopenal-devel,libalure-devel,libgtk3-devel,libSM-devel,libICE-devel,libpq-devel,libSDL2_image-devel,libQtGui4-devel,libQtSvg4-devel,libQtScript4-devel,libQt3Support4-devel,libQtNetwork4-devel,libQtDBus4-devel,libQtXml4-devel,libQtWebKit4-devel,libQtOpenGL4-devel,libX11-devel,libgstinterfaces1.0-devel,libbz2-devel,libcrypt-devel,libgmp-devel,libllvm3.5-devel,libmysqlclient-devel,libiodbc-devel,postgresql-devel

Step 1b. If you want to compile on 32 bit Cygwin, use setup-x86.exe with the same parameters. Additionally, after installing you have to delete (or temporarily rename) some files, because they are from older X11 packages, while newer ones in the repository that they are dependent on lack libtool files.
You can delete those files using Cygwin terminal like this:

$ rm /usr/lib/ /usr/lib/ /usr/lib/ /usr/lib/ /usr/lib/

Step 2. Get the Gambas source code (either download and extract the package from main Gambas website or use svn checkout).

Step 3. Open a Cygwin terminal and change to the Gambas source directory.

Step 4 (optional). If you want to compile the components gb.db.odbc or gb.db.postgresql, you have to run the following commands to patch these components for Cygwin:

$ curl | patch -p0
$ patch -p0 << 'EOF'
Index: gb.db.postgresql/
--- gb.db.postgresql/
+++ gb.db.postgresql/
@@ -14,7 +14,7 @@
   postgresql, POSTGRESQL, gb.db.postgresql, [src],
   [GB_FIND(libpq-fe.h postgres.h pg_type.h, /usr/local/lib /usr/local /opt /usr/lib /usr, include/pgsql* pgsql*/include include/postgresql* postgresql*/include include/postgresql/*/server/catalog include/postgresql/*/server include)],
-  [GB_FIND(libpq.$SHLIBEXT, /usr/local /opt /usr, lib pgsql*/lib postgresql*/lib)],
+  [GB_FIND(libpq.a, /usr/local /opt /usr, lib pgsql*/lib postgresql*/lib)],
   [$C_LIB -lpq])
 dnl ---- Create makefiles

Step 5 (optional). If you want to compile the deprecated gb.db.sqlite2 component, you have to compile and install SQLite 2 that is not available in the standard Cygwin repositories. Please consult its website for further information.

Step 6. To compile and install Gambas, run:

$ export LLVM_CONFIG=llvm-config-3.5
$ ./reconf-all
$ ./configure -C --disable-inotify --disable-v4l
$ make
$ make install -j1

Step 7 (optional). If you want to have a menu entry for Gambas, install it as follows:

$ xdg-icon-resource install --novendor --size 48 app/desktop/gambas3.png
$ xdg-desktop-menu  install --novendor app/desktop/gambas3.desktop

Running Gambas applications

You have to have Cygserver running for some Gambas features (e.g. the gb.qt5 component needs it).

For applications with GUI it is required to install xinit package and start the application or the terminal calling it via xwin-xdg-menu. You can find xwin-xdg-menu in your taskbar when the XWin Server (available in Windows Start menu) is running.