From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104844 invoked by alias); 27 Dec 2015 19:11:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 104721 invoked by uid 89); 27 Dec 2015 19:11:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=belong, apologies, WINDRES, autogen.sh X-HELO: mail-yk0-f175.google.com Received: from mail-yk0-f175.google.com (HELO mail-yk0-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 27 Dec 2015 19:11:46 +0000 Received: by mail-yk0-f175.google.com with SMTP id a85so11535953ykb.1 for ; Sun, 27 Dec 2015 11:11:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=p+QpksKf8tMQrt+Y3RDAU+sSixGvAgr5ijbR5a9iCYw=; b=PWY+tk7PrMIQEqUyec61KRFJyy4LKVxIXBPOn3se02GJjiytSkjJUffP9Q8oKNDcRP j8XlsWPFw2SBSBKiYk+qZdIzHMM3m6KKTW52qEu9cJRQel3qFlYVQ/X4tYpmfQCi0x4g juCeexUG4oyz/XZWHGaH7fSzO4CCWqJf2i8IAJcBQQXq2mLevzaqiSOvI886Ng+ZLUzG kakItfu1dY9ZM0f8ks1KK/QnHUsYKb+hDkuyqjRDqUFsSFDUXGCYvHP9rN3sfemvjboE CeNYIkjuBcaWXfddcu0lGN+/LdnxqhQl+dwJdGIlo+/LpcJxS/XjZ5w0F1ILbsv3dobG jJbQ== X-Gm-Message-State: ALoCoQnHKNePe2gRrdfHdvFmxzCRzkWt4b9bPVq5Se3ifa2cp0LsxO7DGvl5m7kJ9Z2yfrL+GPuTfb7I3Ao/lQM+HlgueV2pqOmYceMKB4cgFZqZmuduyq0= X-Received: by 10.13.213.193 with SMTP id x184mr43523246ywd.339.1451243504154; Sun, 27 Dec 2015 11:11:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.13.204.201 with HTTP; Sun, 27 Dec 2015 11:11:24 -0800 (PST) From: David Xu Date: Sun, 27 Dec 2015 19:11:00 -0000 Message-ID: Subject: Functional Cygwin GTK with native win32 backend To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-12/txt/msg00330.txt.bz2 Hi! I compiled GTK with the native win32 backend, and it is functional. Brief demo: http://i.imgur.com/PAWyLdW.gif I would like to bring up discussion about the possibility of including a native windows build of GTK in the Cygwin package list as well, since it turns out that the steps that I took weren't so bad. The general strategy I used was to build the GTK dependencies with native Windows backends where possible. Just getting those to compile was half the battle. The other half of the battle was to make some win32 API symbols from GLIB be exported in libglib-2.0.dll.a to be visible to the build of GTK. Caveat: I have not had a chance to test my build extensively yet, since it *is* holiday break for me, but so far it seems to work. If you're wondering why I did this, I did this because I was bored and felt festive. Happy holidays! *** Addendum: If you would like to reproduce my work, you can refer to https://gist.github.com/lyze/a4f53f8fadac1068a994 If certain details are unclear or do not work, I apologize in advance for that; I'd be happy to help clarify things. Outline: 1) Build cairo-1.15.2 with the windows backend (with --enable-win32=yes passed to ./configure). No patches necessary here. We need the newer version because it gives us the needed symbol cairo_win32_surface_create_with_format. This gives us the cairo-win32 package. 2) Build pango-1.39.0 from source. I just used the source release from their website. You probably will have to specify PKG_CONFIG_PATH as well to find the new cairo-win32 package. 3) Build epoxy-1.3.1 with the windows backend. I got the release from the GitHub repository. Patch the release with the attached epoxy patches, then run ./configure, which should prepare epoxy for EGL, GLX, and WGL backends. 3) Build glib2.0-2.46.2-1. Here, I obtained the source from the Cygwin package setup executable. Run cygport prep as usual, and then apply my patches. 4) Finally, build gtk+-3.18.6. I obtained the source release from the GNOME website. Apply patches, then configure with --enable-win32-backend. The invocation I used: ./autogen.sh WINDRES=/usr/bin/windres PKG_CONFIG_PATH=/usr/local/lib/pkgconfig LDFLAGS='-L/usr/local/lib -L/usr/lib/w32api' --enable-win32-backend Gotchas: You will probably have to specify PKG_CONFIG_PATH at every step, or else you might pick up your existing library files instead of the newly built ones. Same goes for LDFLAGS as well. Apologies in advance if this email is in the wrong list, or if specific discussion about these build details don't belong here. -- David Xu -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple