Re: [Vala] 2 questions on valac in msys2
- From: oyster <lepto python gmail com>
- Cc: vala <vala-list gnome org>
- Subject: Re: [Vala] 2 questions on valac in msys2
- Date: Thu, 23 Jun 2016 22:10:56 +0800
thank you, Gilzad Hamuni
in fact, I have another way: while EXE is running, try to delete all
the DLLs. If one DLLs is in used, it can not be deleted. However, this
method could fail if some DLLs are loaded later
2016-06-23 20:41 GMT+08:00 Gilzad Hamuni <gilli4 gmx net>:
Hi,
I can try to give you some ideas for the first question from my experiences with msys+vala (Win32).
In a real linux environment we can use ldd to find out which libraries an executable depends on.
$ ldd hello
But in my version of msys/mingw ldd doesn't work. However, I don't update my msys to avoid conflicts with
too quickly updated libraries. So you might have a working version of it by now.
Another way is to use the Dependency Walker [1] which seems to be suggested among developers. I haven't had
many experiences with it though.
The third way I know is just trial and error. You copy your hello.exe into a different directory and call
it directly from the system (outside the msys-environment). Windows will then tell you which DLL it is
missing. You can then copy the requested DLL to the same directory and attempt to run hello.exe again.
Windows will tell you what other DLL is missing. So you repeat this procedure until you have all the DLLs
that hello.exe needs. You surely don't need to provide all DLLs from mingw, thus you'll save some space,
too.
If you still need to reduce the required disk space of your app+dlls, you can try to pack them with UPX
[2]. Just note that some anti-virus programs used to detect self-extracting executables as harmful.
Unfortunately I don't have a clue about your second question, I'm sorry.
[1] http://www.dependencywalker.com/
[2] http://upx.sourceforge.net/
Gesendet: Donnerstag, 23. Juni 2016 um 04:31 Uhr
Von: oyster <lepto python gmail com>
An: "vala-list gnome org" <vala-list gnome org>
Betreff: [Vala] 2 questions on valac in msys2
they are 2 relative questions I found in my msys2 on Windows 7
1. how to distribute EXE for PC without glib/gtk/etc? Currently, I
copy all DLLs under /msys64 to the same directory where the EXE stays.
The problem is that it is not so nice, and the DLLs take up 150Mbytes!
So is there an automatic way to copy only necessary DLLs?
2. If I run hello_gtk.exe in the dos prompt window of Windows7, when I
close it, nothing is displayed. However, in msys2, I have changed the
current working directory to where hello_gtk.exe can be found, the I
run and close hello_gtk.exe
[code]
$ ./hello_gtk.exe
# then I close hello_gtk.exe
(hello_gtk.exe:43496): GLib-GObject-WARNING **: attempt to override
closure->va_marshal (0000000063a48a20) with new marshal
(0000000066710ea8)
[/code]
Why? and how to eliminate it? Thanks
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]