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
contain:

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

notes:
- 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"
     ;;
   *mingw32*)
-    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 ;;
 esac

 # 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\
+\n\
   sys.path.insert (0, gdb.PYTHONDIR)\n\
 \n\
  # Tell python where to find submodules of gdb.\n\


Downloads:
gdbtui74.7z 2.59MB with python 2.6

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

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
SDL
GnuTLS, libgcryp, gpg-error
libpng
libjpeg
libiscsi
pixman
pdcurses
libcurl
libssh2
zlib

last update: 21 May 2013
Qemu-1.5.0.exe
Qemu-1.4.0.exe
Qemu-1.3.50.0git.exe
Qemu-1.2.50.0git.exe
Qemu-1.1.50.0git.exe
Qemu-1.0.50.0git.exe

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

31 January 2012

ImageMagick Win32 Pack

This package contain numerous file format command-line converter (all are open source software). The main package is ImageMagick (I think it's more complete than official build) with dozens other additions. While most are image format conversion, I put several addition to handle other documents (DWG, PDF, DjVu, WordPerfect, OpenXML and ODF), Audio/Video through ffmpeg and several SWF tools.

There is some overlapping functionalities though, for.ex IM could convert pdf to svg however Poppler's pdftocairo produce much better svg result. This case we could always modify delegates.xml and make IM do what we want and even to handle what it can't.

To use them effectively we need to be accustomed with batch script and IM has valuable guide for it http://www.imagemagick.org/Usage

To install, extract the archive somewhere and add [somewhere]\bin to your PATH environment variable, then start making .bat files and put them in your SendTo folder so it can be accessed from explorer's context menu.

download (with HDRI and OpenMP enabled):
IM-6.7.3plus_win32.7z 23.6MB [patches]
MD5: e4daa031556eef7b6c1c5b8227b065c1

Updated 32bit/64bit build available in main page

notes:
- IM's convert.exe has been renamed to imconvert.exe to prevent name conflict with Windows' convert.exe
- All binaries should run without dependencies except for ODF<->OpenXML converter which need .NET framework
- Most of them are my personal build (optimized for Core2 CPU), few others are taken from official build

24 January 2012

A little program that print CPU class

Got this nice executable from GMP package that auto-generated during compilation. Only 39KB :-) but very useful if we just want to retrieve a processor class (instead of ID) from command line easily.

Supported x86 CPU family:
i686
GenuineIntel
pentium
pentiummmx
pentiumpro
pentium2
pentium3
pentiumm
core2
corei
atom
pentium4
AuthenticAMD
k5
k6
k62
k63
geode
athlon
athlon64
CyrixInstead
CentaurHauls
viac3
viac32
nano

A class is differentiated specific CPU features unlike "family" that call pentium pro - pentium 3 as i686 which is a bit vague.

http://dl.dropbox.com/u/33728474/cpuc.exe
execute without argument and it will print your CPU class name: