How to pack a Vala application under Windows? - windows

On windows I use Vala via MSYS2. How do I properly package the application so that it can run on another computer(along with Gtk). What and where windows should be placed from MSYS2 dll to exe you can run from anywhere?

You are using MSYS2 so you could try a three staged approach:
Create a PKGBUILD file and use makepkg-mingw to build a MSYS2 package of your application
Install MSYS2 in a temporary directory and then your application's MSYS2 package, this will resolve the dependencies
Use a tool like msitools or NSIS to create an installer for the files in your temporary directory, msitools plays nicer with installs in a corporate environment, but is not graphical, NSIS provides a GUI interface
Some references:
Building and distributing your application - GTK Windows download page
How to build your GTK+ application on Windows - detailed instructions for building the intermediate MSYS2 package, by Ignacio Casal Quinteiro
What is major difference between MSI and EXE installation files?

Related

How to install C/C++ development libraries (like GLEW, SDL2, Lua52) under Windows 10 with MinGW+Cmake

It is very long time (~20 years) since I tried last time to program something in C/C++ under Windows, and I completely forgot how it works.
I have some project using GLEW, SDL2 and Lua52 under Linux, but my friend wants to compile it under windows.
I installed MinGW and cmake under windows, and downloaded the .zip files with the libraries (lua-5.2.4_Win64_bin.zip, lua-5.2.4_Win64_dllw6_lib.zip, SDL2-devel-2.0.12-mingw.tar.gz, SDL2_mixer-devel-2.0.4-mingw.tar.gz )
What I don't see, where should I unpack these files so that Cmake can find them?
In Linux I install the libraries from system repo, and then corresponding .cmake scripts can find the automatically use some helper files like (FindSDL2.cmake, FindSDL2_mixer.cmake, FindLua52.cmake) but I don't see how to do this under Windows where is no such central repo-manager I have to unpack the libs in some folder manually.
I want to avoid manual setup of PATHS, since this I always mess up.
If you have a Linux background you should definitively use the MSYS2 environment (https://www.msys2.org/). It comes with a bash shell and a package manager.

gtk+ native ms windows application - how do I redistribute the gtk libraries with my app?

I've compile my helloworld gtk+ application using MinGW for Native MS Windows. The instructions I followed were here.
If I run the helloworld.exe application from the same command window that I built the application, it works fine.
However, I would like to distribute the gtk+ libraries with my app, so I have downloaded and extracted all of the runtimes from http://www.gtk.org/download/win32.php.
I have also copied my helloworld.exe application to the bin folder with the gtk runtime files.
When I attempt to run my application in a new command prompt, I get the following error:
My machine is 64 bit, but I downloaded the 32 bit runtime for gtk.
Any pointers will be appreciated.
One option is to extract the gtk+ all-in-one-bundle to a clean folder, and copy the application to the extracted bin folder.
The extracted all-in-one-bundle can then be zipped with the included application and distributed as a zip or tar file.

Creation of Windows executable file (*.exe) with PyDev-Eclipse and CDT-Eclipse --- How?

Is it possible to create Windows executable files for Python and C/C++ code within the Eclipse workbench? If yes, then how can this be done?
This is how I create .exe files from eclipse, in windows. Is not within the eclipse workbench but it might help you. To avoid problems, I would recommend to download everything for 32 bit even if you use 64 bit computer.
Install python 2.6
Install Eclipse
Install py2exe
In eclipse go to Help > Install new software and install pydev plugin from http://pydev.org/updates/
In windows preferences point the python interpreter to the location of your python.exe in your computer (C:/Python26)
you might need to add py2exe to the libraries
create a python module called setup.py with a code similar to this one:
from distutils.core import setup
import py2exe
setup(windows=['H:/yourworkspace/YourPythonProject/src/yourprogram.py'])
open windows console and type
python H:/yourworkspace/YourPythonProject/src/setup.py py2exe
this will create a .exe located in C:/Python26/dist folder. It should work if you double click it but you cannot take it to a computer without python or any of the libraries that you´ve used. To do that, you can use Inno Setup.
It's very easy to use, basically it will ask for the location of the .exe, the dlls and folders that you want to add (I don't know about this so I add most of the things inside my C:/Python26/dist and it works). Inno setup will create an script and generate a .exe that you can install in any computer. You might need to edit the [Icons] part of the script, I had problems with that before to add an icon to the application.
That should hopefully work,
good luck.
Not sure I understand what you're asking as you're mixing Python/C++ in your question...
If you want to embed Python in some library, Google for 'embed python in c++'
If you just want to package Python to run Python code with extension modules, search for py2exe or cx-Freeze (personally, I like cx-Freeze better).
I don't think any of this is PyDev/Eclipse dependent (this should be IDE agnostic).
In addition to Fabio's answer:
In terms of C/C++, if you compile it on windows, eclipse does create yourprog.exe file automaticaly in order to be executed (in case if you have your main function written in C/C++). Look for your executable in bin folder of your project.
In terms of compiler: I use Cygwin. It simulates Linux environment. It contains (not by default though) g++ compiler, which, because of cygwin, compiles it in binary that can be launched in Windows (i.e. .exe file). I am not sure exactly about whether Linux binary is then converted to Windows binary or it is directly compiled for windows, but I know that this .exe file alone works if you run it.
Let me know if you need help installing Cygwin.

How to install freeimage.dll on Windows?

How to register/install freeimage.dll on my Windows XP machine? I have download the library and open my command shell pointing to the freeimage folder. I ran regsvr32 but the library won't install .
Just copy it to local or windows/system directory, only ActiveX and COM servers need regsvr32.
maybe the library has dependencies not fullfilled. try checking its dependencies using this tool: http://www.dependencywalker.com/
this software shows you all DLL's requiered by an EXE or DLL or OCX, if a dependency fails then regsvr32 fails to.
first check that all dependencies are fullfilled.
i think freeimage.dll is very old to be used on this days...maybe OS incompatibilities or a Service Pack update can cause a fail.

Qt on Mac: where to find "configure"

I am very new to Mac.
I downloaded QT SDK Mac Open source (http://get.qt.nokia.com/qtsdk/qt-sdk-mac-opensource-2010.02.dmg) and installed the Package.
I can run qmake, build samples and run demos,
but I cannot run configure (in order to build the Qt libraries statically).
It says: -bash: No such file or directory.
Documentation says I should run this in the "Qt root folder", but what is this folder in Mac?
I looked for it in /usr/bin, /usr/local/Qt4.6, /Developer/Tools/Qt.
Anyway, what is "configure" on Mac. is it an executable or a script?
Thanks a lot
The SDK download is a pre-built binary library. You need to download the source code version of Qt to be able to configure it to build as static libraries.
The configure script only comes with the source code download version.
I think the SDK only provides the headers and libraries hence the reason you can build applications using Qt. To build Qt itself you will need the source package which is a different download.

Resources