22 February 2012

Testing WebkitGTK3 1.6.3 Win32

This is a test using the supplied GTKLauncher with default settings, I have done most of these tests a year ago and found few workaround but mostly remain the same now.

Core components:
WebkitGTK 1.6.3
GTK+ 3.3.6 using adwaita theme
libsoup 2.37.3

Issue 1. 50% resources hog

When opening certain pages (in this case google.co.jp) browser will eat up 50% resources (my system is dual core).
Workaround: unfocus the window (you kidding me? that's not workaround)

Issue 2. Unicode glib, fontconfig and pango aliases.

Under Linux, baidu.com reportedly okay (glib backend) while becoming like this under windows, anyone knows why?

Workaround: build webkitgtk against ICU instead of glib, above is webkitgtk 1.2.7 with ICU (gtk2)

Wikipedia.org shown with freetype backend and default etc\fonts\fonts.conf

With freetype backend and modified etc\fonts\fonts.conf (add autohint, antialias and set tahoma as default). Here most indic languages is back, under windows 7 and pango 1.29 this should rendered near perfect like below but fonts.conf need to be set to segoe ui. Also notice dropdown list widget above is now properly rendered in GTK-3

With modified fonts.conf and modified pango.aliases (due to limitation in Win XP) also need additional unicode fonts.

Issue 3. Local file URI

Regression: webkitgtk 1.6.3 can't open windows' file URI see wikipedia, other schemes also failed

Here is how version 1.6.3 treat the triple slashed URI, it's like opening "/D:/Sources/webkit-1.6.3/html/index.html"

Application like Devhelp also affected

Webkitgtk 1.2.7 (GTK-2) correctly open local files

Issue 4. GCC miscompiles JavaScriptCore
When compiled against win32 api from mingw-w64, for example webkitgtk produce the following anomalies:

Numbered list stopped after 9th...?
Google top menu not shown in black

Workaround: use mingw32 or find the culprit?

Issue 5. Video

With gstdirectsoundsink and gstautodetect from gst-plugins-good webkitgtk3 also could play html5 video canvas and compared to 1.2.7 there is time lapse info. But other issue still the same: once volume muted sound will gone forever. Notice that fullscreen mode doesn't work in Windows so don't clicked it.

Issue 6. Printing doesn't work properly

Webkitgtk seemed to print with correct outer frame width (fitted?) and anything else is scaled down by approximately 8 times (thanks to Pawel for the report). Not an issue under linux.

Workaround: scaling up before printing

Issue 7. No plugins
And that's what youtube said

Okay that's enough with the problems :-)

Good :-)

Notes: If anyone encountered Mutex (pthreads) issue during building try to use https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/experimental/winpthreads/

17 February 2012

Anti Piracy Campaign: The police move ahead their mouth and brain

After reading http://tekno.kompas.com/read/2012/02/16/15242314/Kampanye.Anti.Pembajak

Indonesian police seems felt very stimulated by the recent SOPA news in the internet. Now it's show off time!

If the idea is A, the police officer may later said B and in practice it won't be A nor B. That's how it works here, yet they act in name of law and justice. Shouldn't they went to jail themselves before they try to clean someone else ass? These corrupt filthy police! how dare! KPK should arrest more generals to give them some lessons.

One of the absurd plan is the police would endorse that "a PC should be sold not without OS" because they "worried" users will abuse this by installing illegal software. Oh well another M$ running dog... (note: here, it's rare to see build-up PC like Dell being sold)

The government themselves are only half-hearted when promoting OSS, they appear to be inconsistent presenting OSS as a solution for anti-piracy and do not have the dick to promote the availability of OSS *before* endorse "use of original software". Not that I can expect they could be a model for the citizen anyway...  (note: original software by any common means of public knowledge is paid software)

Some of reckless acts by the so-called government (of course they failed because they are too old to understand teh internet):
- Censoring the net after some sex scandal video involving parliament's thieves and bitches and several public figures
- You can get jailed for saying (typing) something inappropriate via twitter

IMO in a country where piracy is too common to be said as illegal and the authorities are hypocrites (they precisely also pirates) at the best, raid after raid is a suicide move. After all the level of software usage mostly can covered adequately by switching into OSS. Educational institution instead should be more proactive spreading the OSS awareness, but last time I checked the faculty is busy buying software licenses. It's true that there are many field where OSS is unacceptable but otherwise it can't be that worse.

Oh be careful there is also cybercafe raid and notebook raid maybe next time your PC get raided and don't forget BSA too, they won't tell you the truth they just want to squeeze your pennies. If you ever read http://www.software-asli.com/faq.php where they seems advocating themselves to the "original software usage"  while the fact there is no "open source" word found in their FAQ is a no good sign for your life. So an open source software is not original software? nice joke!. Don't get bullied! they just another running dog of corporate software who don't care about the future.

People should realize how poisonous is when they're overly adept to proprietary software. Alternatives do exist and (sadly) waiting to be found and learned. And there is more than just price: freedom

14 February 2012

How to perfectly mix 32bit and 64bit libraries in MinGW

Assuming you have multilib (dual 32bit/64bit) GCC and you have common libraries in /usr/local you could put all 32bit and 64bit in /usr/local/lib folder altogether.

How? I found out that GCC filename lookup for libraries (be it import lib or static lib) have the following order:
In case of -l[foo] getting parsed:
1. lib[foo].dll.a
2. [foo].dll.a
3. lib[foo].a
4. [foo].lib

The common convention is (1) as import library and (3) as static library however this may varied among makefiles. If you're willing to do a little renaming work or better more edit the libtool or makefiles. You could arrange them this way:

32bit import lib: lib[foo].dll.a
32bit static lib: lib[foo].a
64bit import lib: [foo].dll.a
64bit static lib: [foo].lib

This way, during compile gcc will look for all possibilities till found the matched bitness with import lib having higher priority than static lib. Huh lucky number 4 eh?

Hence the same -L/usr/local/lib and -lfoo for both 32 and 64bit hence single .pc (pkg-config) file too. Nice!

I use this convention in my MinGW toolchain

12 February 2012

JSCoreGTK 1.6.3 static build win32

JSCoreGTK is part of WebkitGTK and JSCore can be said as the vanilla version of Google V8. During my unsuccessful attempt to build webkitgtk I have been playing with it instead. And it seems possible to have static version through many fraudulent practices of course :-), now it can be fully integrated to a project requiring JavaScript Engine (I think).

Static build (sjlj exceptions, TDM compatible):
jscoregtk-1.6.3_win32.7z 1.45MB

static interpreter in release and debug (no-symbols) version
JSCoreGTK 1.6.3 headers and static library
minimal Glib 2.28.8 static library
minimal pango 1.28.4 static library
libintl static library

- to build you may need to append -lpthread in LIBS
- the jscoregtk alone seems to be licensed under LGPLv2 only (slightly different from Webkit)
- I also made spidermonkey mingw binary here for comparison

Freenode banned toonel.net

Just noticing now why pidgin so stubbornly not logged me in into #freenode IRC. Why banned? what about my privacy? People with public IP? Come on that's no fun at all, I need to hide my ass from any possible intrusion and penetration. Even now, some sites have also banned Opera's proxy a.k.a "Turbo mode" which also hide your identity. Now what? should I use the sluggish Tor network?

Really.. is this part of ACTA SOPA or PIPA so they could catch their prey easily? arrrgh

11 February 2012

GDB 7.4 with TUI win32

GDB UI for windows is rare indeed, I've looking at Insight but the latest version only support GDB 6.8 and apparently gdbtk also withdrawn from GDB source code tarball. Thats only leave TUI, fortunately it's not that complicated to enable it. We need latest ncurses (5.9) to make it happen, but since GDB has its own termcap implementation for windows this will conflicting ncurses' (see patch below). However when using gdb.exe (instead of gdbtui.exe) it will crash immediately once we type as this mode expect for GDB's own termcap that being disabled earlier. Thus only gdbtui.exe usable, to build normal gdb.exe we will need to rebuild with --disable-tui.

And there is more catch about gdbtui, if it was run under MSYS (TERM=cygwin) gdb will print ugly UI. We need to unset TERM before execute gdbtui and only plain Windows console that works (console2, rxvt or mintty won't). Here is a screenie under CMD window:

Patch to enable TUI (need ncurses 5.9):

--- gdb/configure Tue Dec 13 20:08:05 2011
+++ gdb/configure Sat Feb 11 18:06:04 2012
@@ -9799,9 +9799,10 @@
     ac_cv_search_tgetent="none required"
-    ac_cv_search_tgetent="none required"
-    CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
-    ;;
+    if test x"$enable_tui" = xno; then
+      ac_cv_search_tgetent="none required"
+      CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
+    fi ;;

 # These are the libraries checked by Readline.

Patch to make portable python integration:

--- gdb/python/python.c Sun Jan 15 01:04:05 2012
+++ gdb/python/python.c Sat Feb 11 19:21:56 2012
@@ -1429,6 +1429,12 @@
   # interpreter to find them.\n\
   if old_dir in sys.path:\n\
    sys.path.remove (old_dir)\n\
+  if (os.getenv ('PYTHONHOME')):\n\
+    if os.path.isdir (os.getenv ('PYTHONHOME'), 'Lib', 'site-packages')):\n\
+      gdb.PYTHONDIR = os.getenv ('PYTHONHOME'), 'Lib', 'site-packages')\n\
+  else:\n\
+    gdb.PYTHONDIR = os.path.join (os.path.split (sys.executable)[0], 'gdb', 'python')\n\
   sys.path.insert (0, gdb.PYTHONDIR)\n\
  # Tell python where to find submodules of gdb.\n\

gdbtui74.7z 2.59MB with python 2.6

7.4.1 with python 2.6 against pdcurses + the old insight 6.8-1a, gdb linked to msvcr90.dll
7.5.1 with keybinding patch (see comment)

09 February 2012

The closest thing to Thinstall

Portable app will getting more interesting with this available open source tool: a registry emulation
The fabled ThinApp (formerly Thinstall) is an application level virtualizer for windows that handle both filesystem and registry redirection. Each have true virtualization, one of the simplest thing of filesystem redirection is by altering some common environment variable like %USERPROFILE% %PROGRAMFILES% and so on at user session level. But this method is nowhere near what Thinstall do. Say, what if the program call for hardcoded path?

Few years ago I've looking for OSS alternative for Thinstall, if I recall there was one, a research product (I think) which come as source code only, too bad I forgot its name.. but seems to be discontinued or become commercial software (dunno).

Now let's leave that one alone because OSS generally more simple and timid when it come to Windows (no COM, no ActiveX although now there are some). Now about registry... Like it or not no matter how clean and standalone an application is, it will indirectly ask for many information from registry via windows so it's good to emulate it.

And this app "WinAPIOverride32" http://jacquelin.potier.free.fr/winapioverride32/ don't let the name fool you (me too) for thinking "oh an open source alternative of procmon" but wait till I unpack the zip file, a registry emulator being bundled! (Umm.. well registry emulation is basically overriding one of Windows API) While still in beta (source code available) the documentation is minimum but clear enough and there is video too http://jacquelin.potier.free.fr/winapioverride32/videos/registryemulation.htm

For large OSS app like OpenOffice, this tool could be a lifesaver (no compromised functionality). I'm still playing with it tonight :) will see how far it can go, for my first try I want to emulate userlevel fonts availability by emulate HKLM\Microsoft\Windows NT\CurrentVersion\Fonts a.k.a adding fonts without admin rights and put it in user accessible location.

Check it out dudes! oh caveat that I don't feel:  it's currently a 32bit only

03 February 2012

Qemu git win32

Yet another Qemu-git win32 (XP SP1) binaries...
Originally I want to test if Qemu-alpha is able to emulate openvms (as es40 replacement), but no luck.. probably bios issue

Configured with:
configure --static --enable-sdl --enable-curses --enable-curl --enable-libiscsi --enable-vnc-tls --enable-vnc-jpeg --enable-vnc-png --enable-vnc-ws --audio-drv-list=winwave,dsound,sdl --enable-guest-agent --enable-vhost-net --enable-libssh2 --with-coroutine=windows

Static Libraries:
Glib, libintl, win-iconv
GnuTLS, libgcryp, gpg-error

last update: 21 May 2013

The installer will install to [CD]\QEMU then make all console-less version of qemu-system*.exe with 'w' suffix and upx'd all executables.
Or you can extract it using 7zip too but without above extras.

01 February 2012

AoTuV on edcast

Winamp+edcast+icecast2 = broadcast yourself :) took me a while to realize how similar this to Skype, although I got nasty 10s lag which seems more to client issue rather than icecast.

But with only 128Kbps connection, realistically I only have ~60Kbps upload speed thus the bundled vorbis q0 (~64Kbps) just barely over the top. AoTuV will fix that! with q-1 (~48Kbps) still good for music or -2(~32Kbps) for speech I could get steady streaming, tested with Opera's proxy (turbo mode) as client on the same connection.

To enable aotuv replace edcast's vorbis.dll and ogg.dll with my dlls edcast_aotuv.7z

using the free Multiple DSP plugin will enhance audio "quality" by applying DSP FX and edcast simultaneously

depends on how complex is the audio channel separation, in most case we won't get any higher than 60Kbps