How can I compile Evince3 on Windows using msys2 from Evince3 Source Codes? - windows

Evince3 Source Code link = http://ftp.gnome.org/pub/GNOME/sources/evince/3.26/
I downloaded the Evince3 pdf reader program source code from the above link. and installed msys2 with gcc and gtk3 librares. Evince3 created using gtk3 module in C. but I don't know how to compile source code of Evince3 for using this program on Windows. Is it possible ?
Thanks.

I was curious to learn how to build Gtk apps on windows, so I did it myself, and it took me around one hour.
I followed this guide, https://blogs.gnome.org/nacho/2014/08/01/how-to-build-your-gtk-application-on-windows.
Note that the author used gedit as example. To install evince, you need to download three files from this directory(get 32 or 64 version of install file), https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-evince.
Modify pkgver to 3.26.0 and sha256sum to the hash value in evince-3.26.0.sha256sum in PKGBUILD file, and follow the rest of instructions.
Other way: It's also possible to install pre-built package from mysys2 repo with compiling the source code. Open the msys2 console and give the following command to install Evince.
pacman -S mingw-w64-x86_64-evince

Related

Trying to build ruby on visual studio with zlib

I'm trying to build ruby on visual studio with zlib and I'm having problems with it.
I have prepared everything to build it but I don't know how to specify where the zlib library and headers are.
I have the source code in $(ProjectDir)/..
I am buildin in $(ProjectDir)/$(Platform)/$(Configuration)
I build with command line, and I have it like this
mkdir $(Platform)\$(Configuration)
cd $(Platform)\$(Configuration)\
..\..\..\win32\configure.bat --target=i386-mswin32 --prefix=$(ProjectDir)$(Platform)\$(Configuration)\bin
If I go to ext/zlib, I can execute
extconf.rb --with-zlib-lib=$(ProjectDir)..\..\zlib-1.2.8\zlib-1.2.8\$(Platform)\$(Configuration)\lib --with-zlib-include=$(ProjectDir)..\..\zlib-1.2.8
and creates the makefile correcly, but I don't know how to pass zlib lib
and include paths to the configuration script.
I have tried with
..\..\..\win32\configure.bat --target=i386-mswin32 --prefix=$(ProjectDir)$(Platform)\$(Configuration)\bin --with-zlib-lib=$(ProjectDir)..\..\zlib-1.2.8\zlib-1.2.8\$(Platform)\$(Configuration)\lib --with-zlib-include=$(ProjectDir)..\..\zlib-1.2.8
but that doesn't works
I suppose it has something to do with the '--with-ext="a,b,..."' option or with the "--path" that is specified in the help command, but I don't know how to specify it and the documentation is really bad.
I would be very gratefull if you could help me.
The instructions below are for Ruby 2.2.5 – if you want to build some other version or use different folder paths, change accordingly. I used these to successfully build Ruby 2.2.5 and 2.3.1 from source with zlib using VS2013 Community Update 5 on Windows 8.1 Pro x64.
Create folders:
C:\ruby-2.2.5\build
C:\ruby-2.2.5\src
Untar ruby-2.2.5.tar.gz and put the sources in C:\ruby-2.2.5\src
Unzip the zlib distribution archive (zlib128-dll.zip) into C:\zlib128-dll
Run Developer Command Prompt for VS2013, then run:
SET INCLUDE=%INCLUDE%;C:\zlib128-dll\include
SET LIB=%LIB%;C:\zlib128-dll\lib
SET PATH=%PATH%;C:\zlib128-dll
cd C:\ruby-2.2.5\build
..\src\win32\configure.bat
nmake
nmake DESTDIR=C:/ruby-2.2.5 install
Done. You should now have a fully working, zlib-enabled, Ruby build in C:\ruby-2.2.5\usr.

Is it possible to set up GStreamer for use in MinGW, similar to how it's done in Linux?

Apologies for the tardy title, I'm not quite sure how to phrase this question. At its most basic, I'm attempting to compile a program with GStreamer. When running the configure script for said program I get the following error:
0:20.39 configure: checking for gstreamer-1.0 >= 1.0
0:20.39 gstreamer-app-1.0
0:20.39 gstreamer-plugins-base-1.0
0:20.39 configure: error: gstreamer and gstreamer-plugins-base development pack
ages are needed to build gstreamer backend. Install them or disable gstreamer su
pport with --disable-gstreamer
The build environment I'm compiling in:
Windows 7 (64-Bit)
MINGW & MSYS
Visual C/C++ 2010 SP1 (command line)
Now if this error occurred on a Linux distro, - say Ubuntu - it could be remedied by running the following commands:
apt-get install libgstreamer-plugins-base1.0-dev
apt-get install libgstreamer1.0-dev
What is the equivalent for Windows? I've found two type of versions that can be used: The gstreamer bin from the developer website, which has the following structure:
bin
include
lib
share
And a dynamic library of gstreamer for mingw with the following structure:
bin
lib
How am I supposed to let mingw/msys know that the gstreamer library is installed? Do I place the folders above in the relevant MSYS directories? Then, how does the configure know that it's installed and ready to be used?
I hope what I'm asking makes sense, please let me know if anything is confused. Cheers!
Using the first solution (official binaries from GStreamer), you need to tell the configure script where everything is located.
The simplest way is to set the environment variable PKG_CONFIG_PATH to where the .pc files are located. Generally it's in
$install_directory/lib/pkgconfig/
Replace $install_directory with the actual location, ex if it's installed in /c/GStreamer :
PKG_CONFIG_PATH=/c/GStreamer/lib/pkgconfig ./configure
That should make configure figure out everything

Compiling Ghostscript 9.10 using mingw

I am using msys2 Mingw (gcc 4.8.2 for i686 32-bit) for building Ghostscript 9.10. After running make, gs.exe was created successfully. Followed by that I ran "make so" for creating libgs library. Libgs.so, Libgs.so.9.10 were created which are of the same file size. But I found both of them to be PE executables. After renaming extension to .exe, they produced the same output as done by gs.exe. What I require is libgs.dll, libgs.a to be created, but instead "make so" creates libgs.so which is in fact a PE executable. I also tried using patch found on site:https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-ghostscript/mingw-build.patch, but still the output remains the same. Has anyone been successful in this? Kindly help me.
I presume if you follow the steps taken in the build script connected to the patch you linked, everything will work out fine. I think most of it is just to make it use the "system"'s 3rd party libraries instead of those in the GS source. I'd guess running the configure command would do.
Alternatively, you could just download the MSYS2 base system from here, and do a pacman -Syu mingw-w64-i686-ghostscript. It should download and install the binary package without you having to build it yourself.
If you really want to build it yourself, download the PKGBUILD and patch, and run makepkg from the aforementioned MSYS2 shell and have that build it for you.
Have just completed testing of gs 9.15 built executables using the a patch
MINGW-packages-master.zip from https://github.com/Alexpux/MINGW-packages
Without implementing the zlib patch and PKGBUILD and using a MINGW 4.7.3 32/64
without by ghostscript used libs installed.
They did not work as is while using msys1 pathe'd up ahead of Windoze.
I simply edited the the MINGW Build and 32/64 bit type in makefile in
and set them to =1 there. and as i built without GTK defined in ./configure
SOC_LOADER_PLAIN manually to gs.c
Check the makefile after ./configure ahead of make or make so though , , .
All went well except for the COMPILE_INITS
mkromfs build that failed so I had to set that to =0 and build without that
feature. For me personally preferred as one can patch the gs fonts and libs
much easier.
The builds run as charm with full cpu optimisers implemented
only disabling gcse and guess-branch-probability, easily outperforming
the binaries provided by http://www.ghostscript.com/ by all means.
HPC !

Build Lua 5.2.2 in Windows

I already have Lua For Windows installed but as I read about the latest version of Lua which is 5.2.2, I noticed that Lua For Windows is using an old version of Lua which is 5.1.
I want to build the latest lua version to my windows 7 pc, but I don't quite get the idea on how I can build it. I already read this too Detailed Instruction for installing Lua. Do i need to remove the Lua For Windows ? please give me links how I can build it? what are the necessary tools to build the last lua source code.
Note: please also tell how can I test a source on it.
Compiling lua on Windows using Visual Studio is as simple as:
Downloading a copy of the lua source code and extracting it
Opening a Visual Studio Developer Command Prompt and navigating to the 'src' directory
Run this command: move luac.c .. & cl *.c -o lua.exe /O1
Lua binaries are hosted on sourceforge. You don't need to remove Lua for Windows. What I do on my installation of LFW is, I overwrite the lua.exe and lua.dll with the respective 5.2.* files from the binaries I downloaded.
PS: Sourceforge hasn't been updated with 5.2.2 release of Lua and is still at version 5.2.1. If you want to build, you'll find the similar question that greatwolf has linked to.

use MinGW to create exe file in windows from GNU source package

the basic idea was, I wanted to generate the call graph in text format for several c files. After googling around for long time, i found cflow, which can deliver everything I want, but it is only runable in Linux or else. Then I began to search how to compile the cflow source files on the web to a exe file. I found MinGW which should be able to do the cross-platform compilation.
After installing the MinGW and the MSYS and running the usual commands "./configure; make; make install", I simply got an error that "mkdir" was not found. Actually. Actually I was wondering whether this is the correct way to compile the whole package.
Does anyone has an idea how I can build the cflow.exe correctly in Windows? If there is a tutorial or something like this, I will be very thankful.
Song
Solution
Please try this Github repository "MinGW + MSYS build of GNU cflow 1.4" (For Windows).
https://github.com/noahp/cflow-mingw
It contains already compiled "cflow.exe",and an instruction about how to build cflow using mingw and msys.
Test
System Environment:Win 8.1 (x64)
1.I tested the "cflow.exe" downloaded from the github repository , and amazingly it worked!
2.I followed the mingw compiling instruction,and it successfully compiled "cflow 1.5".
Command:
bash configure
make
I was able to do that today. I'm using cygwin, after installing gcc, binutils, make and after downloading the gnu cflow.tar.gz, it was as easy as ./configure ; make ; make install.

Resources