31 October 2014

Javascript, GTK and Windows

GJS (Spidermonkey) and Seed (JSCore) are two Javascript binding for GTK (and other Gnome libraries) via GObject Introspection. The former commonly used by gnome shell, while the latter is a bit dated by now.

There are good demos at https://developer.gnome.org/gnome-devel-demos/stable/js.html.en and https://git.gnome.org/browse/seed-examples/

The build also bundled in PyGObject AIO but certainly shouldn't be there. So I might remove it one day and put it elsewhere.

At the moment only GTK bundled (you could make gui, image viewer etc) though it can use others gnome libraries, but I need to think about the packaging first.


25 October 2014

Attack Surface Analyzer for XP

This utility released by Microsoft long time ago when XP still supported but ironically decidedly for Vista or newer only. I thought it kind of regshot (registry and filesystem snapshot) or similar but turn out a security risks snapshot. I patch it to work with XP (only) because when debug the half native half dotnet apps it actually or at least initially designed for a minimum XP SP2. The patch just change the required NT version from 6 to 5 and it works but hey I'm no security expert kay?

Dedicated to XP diehards:
http://d-h.st/Tk6 (32bit only)

Original source:

06 October 2014

How to enable GCC i686-w64-mingw32 multilib

I always opt i686-w64-mingw32 multilib when building GCC. That mean 32bit by default and 64bit via -m64. in GCC 4.9 (or since GCC 4.8 SEH introduction) this configuration seems to be broken / unsupported. By common sense if x86_64 multilib is supported then the inverse should be possible too.

Here is the patch:

--- D:/Tarball/gcc49s/libgcc/config.host.bak Thu Mar 27 22:40:31 2014
+++ D:/Tarball/gcc49s/libgcc/config.host Sun Sep 28 14:24:20 2014
@@ -646,8 +646,20 @@
  if test x$enable_sjlj_exceptions = xyes; then
-  tmake_eh_file="i386/t-dw2-eh"
-  md_unwind_header=i386/w32-unwind.h
+  case ${host} in
+    i[34567]86-w64-mingw*)
+      if [ "${enable_multilib}" = yes ]; then
+        tmake_eh_file="i386/t-seh-eh"
+      else
+        tmake_eh_file="i386/t-dw2-eh"
+        md_unwind_header=i386/w32-unwind.h
+      fi
+      ;;
+    i[34567]86-pc-mingw*)
+      tmake_eh_file="i386/t-dw2-eh"
+      md_unwind_header=i386/w32-unwind.h
+      ;;
+  esac
  # Shared libgcc DLL install dir depends on cross/native build.
  if test x${build} = x${host} ; then

Might be a bit ugly but still make sense and works! Overall that's just a naming/convention mess. With the patch we should have SJLJ in 32bit and SEH exception in 64bit mode by default (a.k.a no exception handling specified at configure).