Showing posts with label custom build. Show all posts
Showing posts with label custom build. Show all posts

25 December 2021

Lightweight PDFium based reader

For a long time the best lightweight PDF reader for XP is SumatraPDF 3.1.2 which based on MuPDF. There is  alternative such poppler/xpdf and ghostscript, all of them use rather unfriendly GPL-like license. PDFium which used within Chromium is new BSD license or APL 2.0 but has crude packaging (typical of google).

I stumbled on https://github.com/vfr/UXReader-Windows a nice pure Win32 API UI library for pdfium, then made little quick change on UXReaderMainWindow.cpp: commenting ChangeWindowMessageFilterEx (which break XP) and add simple argument passing using CommandLineToArgvW so it now will open file from association / cmdline. Note that it's just a barebone demo for the library but IMHO suck less than FoxIt reader. I mean whats the point having a light renderer if you bloat everything else.

Campared to MuPDF I think it's faster (and smaller too), still when rendering image-rich page with multiple overlays and transparency nothing beats Adobe Reader!

opening large ETOPO map

download: UXReader.7z (1.6 MB) require VC++ runtime 2017

24 December 2021

Python 2.7 and TLSv1.3

Python 2.7.18 is the last bugfix version of any python that officially support Windows XP. By default those trying to build it on Windows will need openssl 1.0.2 per preconfigured VS2010 project file, that mean TLS 1.2 at best for you. However as we know, the patch to support TLS 1.3 also landing on 2.7.x line all you need is to build hashlib and ssl module with openssl 1.1.1 or preferably 3.0.x header and import libs (so you can update the dll in the future). 

To do so, basically remove libeay and ssleay projects from the solution and remove them from being listed as dependency of _ssl and _hashlib project. 

Put openssl 3.0.x header directory "openssl" into [root]\externals\openssl-1.0.2t\include32 

Rename the import lib of openssl 3.0.x into libeay.lib and ssleay.lib respectively and place them at [root]\PCBuild.

Build haslib and ssl module as usual.

To see if your python has TLS 1.3 you can use ssl.HAS_TLSv1_3 boolean to make sure they are compiled properly, note that with openssl 3.0.x there are a lot of deprecated warnings but no error. Be sure to put libcrypto-3.dll and libssl-3.dll in either DLLs subdirectory and anywhere in %PATH% environment.

my build can be found here https://sourceforge.net/projects/xpitory/files/python/

Since openssl is dynamically loaded it's preferred to be compiled with MSVC 9 (as is python 2.7) though I rarely see issue of mixing msvcrt.

my personal build of openssl 3.0.1 https://sourceforge.net/projects/xpitory/files/shared-builds/openssl-3.0.1-fips-win32.7z/download

14 December 2017

FFmpeg for Windows XP

FFmpeg itself has no problem with XP, but its dependencies are. This build is feature complete  (and therefor non-opensource and not redistributable) oh well.

This build specifically for XP so most of AVX optimization disabled
Aotuv is used for vorbis encoder and capable of ~32kbps at -aq 0
x264 and vpx codec use high bitdepth but not for x265 (is too slow)
your custom fonts goes to fonts sub-directory (via fontconfig)
your frei0r dlls goes to frei0r sub-directory
your ladspa dlls goes to ladspa sub-directory
place libbdplus.dll+libaacs.dll or libmmbd.dll in the root directory if you need those
flagged with LAA (bigmem)

download:
version 3.4.1
ffmpeg-3.4.1.7z (24.4 MB)
ffmpeg-3.4.1_LTO.7z (21.3 MB) small build

Configured as:
configure --enable-nonfree --enable-gpl --enable-version3 --enable-small --enable-avresample --enable-pthreads --disable-w32threads --enable-avisynth --enable-chromaprint --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libdc1394 --enable-libfdk-aac --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libilbc --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencv --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-librtmp --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-decklink --enable-libmysofa --enable-openal --enable-opencl --enable-opengl --enable-libmfx --disable-avx --disable-avx2 --pkg-config-flags=--static --extra-libs="-lstdc++ -lgomp"

25 November 2017

GTK 2.24.31 static library barebone

As a prior reference https://code.google.com/archive/p/static-gtk2-mingw32/
the thing is no patch provided but hints, that's enough though.

So why GTK2? well, after maintaining pygi-aio for several years, nothing really that good.. honestly
There is rough edges, regressions and more importantly it feel less responsive (with slower start-up). Overall GTK 3.x was turbulent version.

Just FYI, it's possible make GTK3 static build, especially prior to GDK's switch to adwaita as default theme, that is GTK 3.6.x where you get "somewhat" native theme, GTK 3.22 also have "somewahat" native theme returned and  it break XP compatibility Well duh.

I made a mod of vispdisp (a streaming image viewer powered by VIPS) and make single exe with GTK 3.6
https://github.com/tumagonx/XPitory/raw/master/static_port/vipsdisp/vipsdisp.exe support huge tiff/jpg/png image (upx'ed 1.56MB)
That's just to prove I'm not making excuse for choosing GTK2 over GTK3 :)

The goal here is to make it barebone otherwise you may as well use the dll version, no?
Considerations:
1 the focus is GTK alone, the rest isn't that important
2 dependencies will be trimmed down until it become what's GTK only really can use from
3 optimization flags

1) With version 2.24.31 I choose Glib 2.34.x which is the minimum to build the latest librsvg (more about it later), Glib also getting bloated too overtime and there are some regressions I don't want to mess with in more recent versions. Supposedly the officially supported static build for Glib was version 2.28-2.30 but it seems my workaround is fine for 2.34. With this other dependencies are pretty much settled:

zlib 1.2.11
win-iconv 0.6
gettext 0.18.3.2
libffi 3.2.1
pixman 0.34
cairo 1.12.18 (I have crash with cairo 1.14.10)
glib 2.34.3
atk 2.8.0
pango 1.40.12 (1.40.14 claim need glib 2.34, but actually it need quite recent one)
gdk-pixbuf 2.26.5
gtk+ 2.24.31

2) Several libraries to be trimmed down:
pixman : has big chunk of SIMD code, configure with --disable-sse2 --disable-ssse3
cairo : only few features that needed by GTK2, configure with --enable-pthread --disable-interpreter --disable-fc --disable-ft --disable-gobject --disable-png --disable-svg --disable-script --disable-ps (note: pthread is needed for static build to avoid mutex crash)
glib : disabling debugging make it smaller, configure with --enable-debug=no
pango : ditto
gdk-pixbuf : only use gdiplus, configure with --with-included-loaders=gdip-png,gdip-gif,gdip-bmp,gdip-tiff,gdip-emf,gdip-jpeg,gdip-wmf,gdip-ico --without-libpng --with-gdiplus --without-libjasper --without-libtiff --without-libjpeg --disable-modules --enable-debug=no
gtk : --disable-modules --with-included-immodules=ime,ipa --enable-debug=no

Do we need svg support? hint: it was one of format that MS really "hate" and hey Qt has it.
if so things get complicated as there is circular dependencies between gdk-pixbuf and librsvg, to solve that merge librsvg objects into libgdk_pixbuf-2.0.a and pass all librsvg dependencies through LIBS that is libcroco and libxml2, overall adds 500KB.

Do we need fontconfig/freetype? it will solve problem of "complex/unusual" font rendering that plagued win32 backend, but it also add almost 700KB (including several config files) and annoying font caching startup once in a while... frankly for most of case it's redundant.

Do we need full jpeg, png and tiff support? gdiplus backend provide less feature for these formats: no progressive mode, no png metadata, incomplete tiiff format/compression and so on. but this will add even more weight 1-1.5MB depends on configuration. Furthermore there is psd, webp, and raw modules that can be enabled

3) the flags is nothing special and for portability reason -flto is avoided (it will make your exe even smaller but you'll need gcc 4.6-4.8, I think)
cflags : -Os
add -fno-unwind-tables -fno-asynchronous-unwind-tables if EH is SJLJ, but not for DWARF or SEH
add -ffunction-sections -fdata-sections this is effective against simpleton app but lost it once app getting complex, in this case -flto is better replacement for dead code removal.
ldflags : -Os -Wl,-s
add -Wl,--gc-sections to correspond above cflags or -flto if you use it on cflags
cppflags : -DGLIB_STATIC_COMPILATION -DGOBJECT_STATIC_COMPILATION -DGDK_PIXBUF_STATIC_COMPILATION -DPANGO_STATIC_COMPILATION -DATK_STATIC_COMPILATION -DGTK_STATIC_COMPILATION -DGDK_STATIC_COMPILATION

The static library is intended for static exe, if monolithic dll desired then we need better replacement for GetModuleFileName (without relying on DllMain) such GetModuleHandleEx otherwise localization path will be unpredictable.
Produced exe for simpleton app is about 3.6MB, 3MB with LTO libraries, and a little over 1MB if compressed with 7zip.That's half of prior effort, not bad.

Downloads
Patches (including new stock icons replacement) : gtk+-2.24.31-static_patch.7z
Libraries and (flattened) headers : gtk+-2.24.31_win32_win64_sjlj.7z
add to ldflags like: -lgtk-win32-2.0 -lgdk-win32-2.0 -lpangocairo-1.0 -lpangowin32-1.0 -lpango-1.0 -latk-1.0 -lcairo -lpixman-1 -lgdk_pixbuf-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lintl -liconv -lz -lffi -lws2_32 -lole32 -lwinmm -ldnsapi -lshlwapi -luuid -lgdi32 -lgdiplus -lusp10 -lmsimg32 -limm32
alternatively create text files named libgtk2.a with linker script:
GROUP(-lgtk-win32-2.0 -lgdk-win32-2.0 -lpangocairo-1.0 -lpangowin32-1.0 -lpango-1.0 -latk-1.0 -lcairo -lpixman-1 -lgdk_pixbuf-2.0 -lgio-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lintl -liconv -lz -lffi -lws2_32 -lole32 -lwinmm -ldnsapi -lshlwapi -luuid -lgdi32 -lgdiplus -lusp10 -lmsimg32 -limm32)
then we can just add only -lgtk2 in ldflags

23 November 2017

Qemu for Windows XP

QEMU provide binaries for windows at https://qemu.weilnetz.de/w32/
But around version 2.8 (the builds is snapshot based) it was dropped XP support  (supposedly version 2.9 when it switched to SRWLOCK mutex thread)

I build recent qemu version that compatible with XP (32-bit) by reverting the threading model to 2.8.x version.

The build is LAA (bigmem) and fully static binary
https://sourceforge.net/projects/xpitory/files/qemu/

HAXM maybe possible using http://software.intel.com/sites/default/files/haxm-windows_r05.zip note that the installer itself wrongly flagged as NT6 executable! but you can open it using 7-zip and then use the hax.msi to install (only for XP32)

This post (and hopefully much more) will be part of XP revival effort which started at github https://github.com/tumagonx/XPitory (apparently not a viable option for long term use so I move to SF).

28 January 2016

NatGeo CNG image converter

Love geography? or you have downloaded their free huge magazine scans library? then you may interested in this tool from http://diplograph.net/posts/decoding_the_complete_national_geographic_images

In short cng2jpg de-obfuscate NatGeo's jpg files (lossless operation).

This is win32 version of C commandline application by Paul Knight, I just change the filemode to make windows version work.

cng2jpg.7z 11Kb

Alternatively .NET GUI application available at https://github.com/keithn/cng2jpg/releases

23 January 2016

Alternative build for XScreenSaverWin

I found great screensaver port from Linux at http://katahiromz.web.fc2.com/xscreensaverwin/eindex.html contain more than 200 screensavers. Okay that's a LOT, in fact Windows will only list the first 100. Fortunately it come with random.scr which is a screensaver loader.

About half of them are opengl accelerated and with some of these I have error when exiting. I made minor workaround for that error which a least works for me. I also made minor modification in the directory organization so that all screensaver goes to one folder. This way the folder can be copied to Windows folder and random.scr loader can be placed in system32/syswow64 to minimalize "pollution".

Here is the download and modified source
version 0.77
XScreenSaverWin32.7z (2.74 Mb, 220 Screensavers)
XScreenSaverWinSrc.7z (2.71 Mb, VS 2008 Source)

I wonder if there is a MyPaint brush like that?




 

29 June 2015

SWFDec Windows

Not to be confused with SWFDec = SWF Decompiler, this one is decoder http://swfdec.freedesktop.org. And it is not that I interested in the player itself (Flash will soon die) but rather the fact that it use cairo canvas so it can export its rendered scene to SVG/PDF easily.

Swfdec itself need little patch for Windows because of its local file URI mangling. This tool is the inverse of svg2swf and based on existing swfdec-thumbnailer (swfdec-gnome). It still ongoing, I want to make it more like rsvg-convert plus ability to set particular timeline to snap but at moment it just convert flash movie up to version 7 (version 8 or 9 may crashed) into pdf, ps, png or svg. The final version would be included in the Converter homepage here.

Command: swfdec-convert [-s minimum width/height] input output
Download: swfdec-convert.exe 1.6 Mb

22 November 2014

Morris 0.2 Win32

Been stumbled on this site http://www.ihsan.biz which offer hundreds of free logic games. Most made in VB and somehow have awkward error handling, however the games are very consistent and excellent for learning.

I can't find few traditional game such as morris there or maybe I missed it (so many games). The only one freeware I found is an old free morris (along its variants) game here: http://www.nine-mens-morris.net/downloads.html. AI is good and made with GTK. I want to share version 0.2 here in addition to the official 0.1 installer. This version has one more morris variant called Sunmill otherwise it looks the same as 0.1.

morris.exe (1.21 Mb)

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.

Download:
GJS-1.42_Seed-3.8.1.7z

20 September 2014

Retro Pacman Game

First post since very a long time hiatus :)

Looking for a real remade for classic pacman but for Windows? there is plenty but I can say funman which is part of funpack.net for windows http://www.classicdosgames.com/game/Funpack.Net_for_Windows.html is the closest one however while it said to be freeware the installer is the original shareware :confused:.

funman with the "entertainment pack" esque

Alternatively, with a quite improved gameplay is njam https://sourceforge.net/projects/njam/files/ which continued as commercial version here http://www.guacosoft.com/njam/About.php. No windows build for the open source version, so I made one. I made a little change of the default setting so it will started in windowed mode (patch included in download)

njam

As a bonus I'd like to share newer win32 version of lbreakout http:/lgames.sourceforge.net/ which solve the mute of winamp (or possibly any other DirectSound playback) when the game started.


lbreakout2


links:
njam 1.25
lbreakout2 2.6.3

20 October 2013

PyGI 3.10 Windows

In my attempt to update MyPaint I need to update PyGI as well as GTK. During compiling there is worrying result the glib 2.38.1 failed on 7 tests! The tests a bit different from previous versions though (in he past usually it passed all tests). GTK 3.10.2 seems missing def files and the new one isn't look any stabler than 3.6, the usual crashes still there despite major win32 fixes in cairo 1.12.16. Lastly I can't use new bindings (gir/typelib) as it always throw gmem.c overflow error during initialize in addition to that I need to comment PollFD override chunk in gi\overrides\GLib.py. Anyhow the new generated girs will still need diff/merge from those linux version...

So here is the new binaries using older typelibs (from pygi aio 3.4.2). This means no new features at python level, plus bugfixes and probably new bugs in the runtime. Currently only bare gtk included if new typelibs become usable I will add others.

pygi-aio-3.10_win32.7z (python 2.6 unsupported)

EDIT: rev2 and further revisions goes here https://sourceforge.net/p/pygobjectwin32/files

19 July 2013

The Moluccas 0.8

Version 0.8 is here. I now called it Moluccas (not to be confused as some kind of mollusca).  It can be grabbed at https://sourceforge.net/projects/tumagcc/files/0.8/

The installer is M08.exe and you can pick up which 7z packages to install (categorized) but at least "base" is mandatory. Put all in the same folder and you're ready to install. There is brief overview of what's inside in each package at the link above. It still lack of documentation though only man included.

Enjoy my biggest OSS Collection with build environment!
All suggestions are welcome.

Main changelog:

- Fixes many typos and silly mistakes when tested in Windows 7
- All executable flagged with LAA
- Simplified startup: run conemu to start (old mode console, no longer supported though possible)
- Isolation: this version use ReactOS's cmd completely so it can be run independently of Windows' cmd.
- Installation speedup: Installer will use all cores (1 core/package)
- Explorer integration is disabled to provide zero host modification during startup (can be enabled by invoke molumenu). But many gui apps still write registry entries especially MFC based one.
- Fix integration with MSVS 2010 or (later?)
- Lots of manual tweaking in GUI apps to make it tight and blend in
- Small fixes in mingw headers and xtraposix libraries

27 June 2013

Node.js with posix path support

It was Mat Sutcliffe who sent me a patch to compile node.js with mingw last weekend, if I recalled node.js used to be compilable with mingw via scons but apparently they switch to gyp entirely and mingw support became broken since then. I though it was a bit weird to sent it to me, but it turn out the process would involve msys python (needed by gyp to work properly).

The patch itself is a win-win solution as it will build native win32 binary but with support for posix path (MSYS and CYGWIN) via generic mount mechanism. He further explain why he choose mount over cygpath, that is because node.js operate asynchronously so by using mount path would settled once rather repeatedly as with cygpath.

This is binary of node.js 0.10.12 (built as ./configure --gdb --without-etw --without-perfctr)
nodejs-0.10.12.7z
original patch for mingw by Mat -> replace msysmnt with mount
modified patch for mingw-w64
python msys

The functionality is implemented in path.js which is bundled inside the executable. So actually you could modify (if you wish) that part (look for mingwToWindowsPath resolvedPath) with your favorite hex editor if you don't want to recompile. Just make sure you don't add and reduce the string block length. Or if you think mingw is such mundane task feel free to apply patch only to path.js and then compile it with M$VS as usual :-)

How to build with mingw:
1. extract the source file for node.js homepage
2. download python for msys and extract to msys installation
3. download one of appropriate patches (above) put in source tree
3. start mingw, navigate to source tree and apply patch
4. ./configure [your options] (make sure that python for msys is the active one)
5. python tools/gyp_node -f make
6. LINK=g++ make -C out BUILDTYPE=Release V=1

Notes:
- I'm not sure about etw and perfctr whether those compilable with mingw but both don't compile out of box. 
- The download is contain official installation hierarchy with node.exe replaced. Since it's not installer (it make no sense anyway) I'll assume you know what to do next ;-)

Enjoy!

16 June 2013

Pinpoint, another approach for presentation

Previously I've tried fluxus for live presentation using a basically game engine + scheme scripting. Due to unresolved issue and the need to learn new language, I'm giving up and looking for much simpler alternative despite I still consider fluxus as a novel apps with no equal alternative.

Pinpoint is small, light and opengl accelerated presentation tool with a kind of magicpoint approach (you write down tagged text representation). It's similar to OSG's Present3D which is between pinpoint and fluxus in term of features, but Present3D require you to write a not-that-readable XML file instead which is nasty without the help of WYSIWYG editor. Pinpoint is simple, it has no advanced timeline/layer like in office software and geared for quick and dirty presentation. Pinpoint also feature extendable transition FX system (powered by clutter) by writing your own FX via loadable json file.

Here you go:

Static build win32, patched to make it more standalone :-)
download: pinpoint and sample+patch

notes:
- to test just drag and drop introduction.pp to pinpoint.exe
- no video support (I'm still figuring out how to build gst-ffmpeg statically) seems played but not rendered by cluttersink
- image support: png, jpg, gif
- basic FX are bundled in the executable, if you make new fx put the json file alongside the executable
- export: pdf only
- pinpoint.exe has console window, pinpointw.exe doesn't
- if you want to compile it yourself, please use gnome libraries released circa 2011 and avoid cairo 1.12.x

see their homepage to learn how to write a presentation file https://live.gnome.org/Pinpoint
Enjoy!


20 April 2013

SHC 3.8.9 MSYS port

To continue previous post, I actually port shc-3.8.9 quite long time ago for fun. But now I want to see if it can act as a wrapper for shellscript (bash/perl) under plain cmd box. And boom it failed :-))

SHC is actually an encryptor not compiler, with time trial feature (not tested). I don't quite remember anymore how I patched this little tool. But as usual MSYS is lacking this and that so it need bandage or cutoff :)

SHC however does need compiler (msysdev-gcc) to build its decryptor along the launcher itself. I have tested it under bash and it works fine. Under cmd box things are bit vague, it seems like:

decryptor -> look for shell (based on shebang?) -> found, sh launched -> ...WTF?... -> launch new cmd.exe session (again) instead

Hmmm

anyway it works for MSYS :-p

Download: http://osspack32.googlecode.com/files/shc-3.8.9.7z

Note make sure msysdev-gcc is ready and always use the -T option of shc

A Simple BAT to EXE Wrapper

I'm looking for a straightforward way to execute bat file inside bash and vice versa (execute shellscript in cmd box). At first I thinking about an encrypter that store content of batch file as string that later feed into shell invocation. But that's appear to be daunting to me right now :-D

I look around sourceforge and codeplex for existing solution, as expected there are several project based on 7z sfx but all of them (sorry if I missed) popped up new cmd window and can't work when called from PATH environment (aka different Curernt Directory).

So I decide to take 7zip SFX source code and apply some patches:

- To have 3 predefined environment variables replacement at RunProgram:
   %%T=temp directory where bat file extracted (supplied by oficial 7zip)
   %%S=path where sfx module located that is the exe file (similar to 7zsfxmod)
   %%W=path of current directory where sfx called (this is what I need)
- Assign CreateProcess's ApplicationName as COMSPEC environment
- Disabling progress bar, thus no need to set Progress="no"
- Redirect IO and prevent popped up windows as described in SO question here
- Finally, Change the sfx's submodule from gui to console using editbin or postw32 (of freepascal)

And it works :) (for my case)

Here you go:
http://osspack32.googlecode.com/files/7zSDcon.sfx

the patched main.cpp of SFXsetup (CPP) and the example converted bat (my old app Cabit, a Cabinet archiver):
http://osspack32.googlecode.com/files/cabit.exe
it use config file:

;!@Install@!UTF-8!
RunProgram="/c cd /d %%W && %%T\\cabit.bat "
;!@InstallEnd@!

Meaning after extraction run cabit.bat under the corrected working directory. Also note the extra space after the bat filename is important otherwise argument will not passed.
Then as usual do copy /b  7zSDcon.sfx+config.7z+cabit.7z cabit.exe

Unfortunately Igor Pavlov haven't publish the source code of his super small sfx (only 27kb) otherwise it would be neater.

I might gonna make sfxmaker or sort of with PE resource/icon insertion ability. Should be easy using wrc and linkres2exe tools.

02 April 2013

Stardict console native version

Console version of StarDict http://sdcv.sourceforge.net/

The application itself is quite old but still usable (suitable for non-unicode and non-html dicts). Here is single executable native version sdcv.exe

example:

Enter word or phrase: tuma
Found 3 items, similar to tuma.
-->The CMU Pronouncing Dictionary
-->tuma

'tu:m\u0259

-->Kamus Besar Bahasa Indonesia, Edisi III (2005)
-->tuma

tu.ma
[n] kutu (di kepala dsb)

-->P\u0101li-English Dictionary (Pali Text Society)
-->tuma

(pron.–adj.) [most likely apostrophe form of \u0101tuma =att\u0101, Sk. \u0101tman self; cp. alsoSk. tman oneself. See Oldenberg, KZ. XXV.319. Less likely=Sk. tva one or the other (Kern, Toev. s.
 v.). Expl d) by Com. to A III.124 as esa.] oneself, himself, etc.; every or anybody (=quisque) ya\u1e43 tumo karissati tumo va tena paññ\u0101yissati (quid quisque faciat) Vin II.186=A III.124; Sn 890 (cp. \u0101tum\u0101na\u1e43 V.888), 908; Pv III.2 (4) (=att\u0101na\u1e43 PvA 181).

Enter word or phrase:

Download: http://osspack32.googlecode.com/files/sdcv.exe

you'll need to set environment variable STARDICT_DATA_DIR pointing to your dic folder (of Stardict) or use --data-dir option.

Enjoy!

oh and to quit press Ctrl-d not the usual Ctrl-c

27 February 2013

Zenity 3.6.0 Portable

In Windows we can use WSH to interact with console/batch processing task, or for simple case "net send" or "msg" will suffice. Then I found zenity, a modern version of cdialog which curses based.

This tool use GTK as its gui to bridge console I/O with modern dialog window for many purpose. Its template (glade ui) can be customized too. I found it a good match for bash though I haven't try it with batch cmd (I dont see a reason why it won't work).

Here a slightly modified build (make it more Windows way as usual).

http://osspack32.googlecode.com/files/zenity.exe
modified src: http://osspack32.googlecode.com/files/zenity-3.6.0_src.7z

notes:
- consequently as this is static build, no locales/translation included (English only), but it's possible to add
- zenity.ui  is embedded in the executable, to override it put zenity.ui alongside zenity.exe (see source for zenity.ui file)
- icons are different from original version as I force it to be stocked

Enjoy!

Guide/examples are here http://help.gnome.org/users/zenity/stable/index.html.en

Edit:
Hmm I think, I have an example...
"runas" which allow to do "UAC" ala commandline usually assume you know the username of the admin account (as it don't ask you), making it uninteractive. With zenity we could do something like this:

for /f "usebackq" %s in (`zenity --entry --text="This operation need admin account, please enter username:" --hide-text`) do runas /env /noprofile /user:%s "notepad \"D:\dokumen\rahasia.txt\""
Assuming zenity.exe is avaliable in "PATH" such as C:\Windows, above example will popup for username albeit we will then need to type password from runas console, ha ha (for security reason I guess)

Edit:
It turned out to be pointless to make it static build, it still need schema file and icon db for displaying file dialog :( sorry

16 February 2013

GTK 3.6.4 DevPack

This is actually just a re-post of PyGI AIO (see main page). Since building PyGI consequently need to build the whole things and that because PyGI have poor documentation (actually it means to be that way, so you're forced to read C documentation instead), so I build the important part of this, devhelp. Which make your life way easier (it's a kind of CHM in concept), then gedit (not my choice of editor though), then for po translation we need gtranslator too and of course glade! Yeah most are not available for Windows yet but now you could try it

There we go, a complete suite guys! BUT this of course really is PyGI oriented. a.k.a all runtime has been linked to msvcr90.dll using my mingw toolchain (special). Basically it will potentially crashed when mixed with generic dll (linked to msvcrt.dll) so you've been warned!, however it you use complete GTK c runtime package from OpenSuSe or Fedora it should work fine.

As usual this build, I think is the most feature complete yet smallest available on the net (OK that's a brave claim ha ha), no really it's (just as all of my build here, is extremely complete one). Ok maybe not smallest as possible cause I use dwarf2 gcc which have redundant debug sections than sjlj.

As you know GTK-3 is still not production ready (I even found 3.6 to be worse than 3.4 in some case). This however should not prevent you to give it a try :)

GI for windows itself is credit to Dieter Verfaillie for his yet uncommitted patch (more than a year ago) which still relevant today, although GIR generation remain unreliable and messy process under Windows. Also thanks to Helge too for pointing many issues.

Downloads:
http://code.google.com/p/osspack32/downloads/list (look for pygi-aio-3.4.2)

Overtime you will (i'm sure you will) encounter binding errors and stuff. You could fix it without having recompile everything. Just edit (say use gedit) the gir file (located in share\gir-1.0) save the edited gir alongside g-ir-compiler and invoke: "g-ir-compiler -o [binding-name].typelib [binding-name].gir" then copy the typelib into site-packages\gtk\lib\girepository-1.0 and overwrite. As a hint you could grab linux gir version and compare the error part.

I also have static build vala 0.18 to join the party though I don't remember anymore why I did that build:
http://code.google.com/p/osspack32/downloads/detail?name=vala-0.18.7z&can=2&q=

Oh yeah I'm getting nearer to release the next Tuma MinGW, it should be the biggest toolchain available too.