pUPnGO - 6Mb ISO - Basic Building Block Puplet

A home for all kinds of Puppy related projects
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#751 Post by technosaurus »

goingnuts wrote:@technosaurus: Some scripts and application reads rgb.txt direct - if not present they might fail...
should be easy enough to patch those, but I may take a look in the xserver code to see what it uses to send the colors, I've been meaning to see how hard it would be to port xfbdev to xcb anyhow
I am trying to get a working version of ImageMagick - I have static builds of 3.6, 4.2.9, 5.2.2 and 6.8.6-9 - increasing in size from 700Kb to 4400Kb for "display". But running "display" is unstable with all versions.
unstable how? doesn't "display" just do the same thing as meh/feh with support for a few extra formats?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#752 Post by goingnuts »

ImageMagick display can do image editing (annotations, oilpaint, sharpen etc) ...leftclick in the imagewindow and a menu pops up with all the possibilities. Unstable in the sense that the menu pops up but only "now-and-then" you can use it.

Further tests shows that icewm, xfce and fvwm do not give the problem so its likely to be a jwm-issue...

Attached quick implementation (from jwm commit da207c3) fix it but I don't like patching jwm for a problem only seen in ImageMagick...

Found hints to jwm here

Slight update: The quick patch does not solve everything - haven't expected that anyway. The jwm-762 solves everything concerning ImageMagic but adds unwanted stuff too: Apps writing to root background cant be seen anymore and the sticky windows are back in pager. Besides that is seems to run ok. Attached a static linked version of jwm-762.

I would have liked to patch ImageMagic instead but cant find my way in its code. So I will let it rest as is for now. Version 4.2.9 seems to do more than just the basic things needed to work with xvidcap-1.0.19 so made a multi call binary of all the tools (animate combine convert display identify import mogrify montage xtp) which ends up 1391Kb linked static and 517Kb upxed. Not small enough to post here but I have created a pet-package for download ImageMagick-4.2.9.pet here [591K].
Also attached patch used to facilitate the mcb-build.
Note: Build without tiff-support...
Attachments
ImageMagic.png
ImageMagic-4.2.9 running in exp-pupngo with jwm-762
(121.47 KiB) Downloaded 821 times
ImageMagick-4.2.9_mcb01.diff.gz
fake .gz
(5.65 KiB) Downloaded 295 times
jwm.gz
fake .gz - static linked jwm-762
(192.31 KiB) Downloaded 294 times
jwm_2.0.1_IM_try.diff.gz
(5.79 KiB) Downloaded 286 times

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#753 Post by goingnuts »

Further blah on xvidcap...
Seems that Xt is used alone until version 1.0.19. After that gtk2 is introduced but Xt is kept until version 1.1.3 and removed from 1.1.4 and from there and on becomes more gnomish.
I did not succeed embedding ffmpeg in 1.0.19 but can do it with 1.1.3. Choose not to as it seems better to be able to choose which version of ffmpeg we want for other usage. A static linked version of xvidcap-1.1.3 with a slightly modified ppm2mpeg +a static linked ffmpeg-0.4.8 and its corresponding ffplay + ImageMagic-4.2.9 can be downloaded here - [xvidcap-1.1.3_plus_ffmpeg_0.4.8_plus_IM-4.2.9.pet/2Mb]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#754 Post by amigo »

I wasn't able to compile either 1.0.19 or 1.1.3 -even with your png patch. Are you probably using png12? I have png14 here after finding and patching several progs/libs which were written for png12.

I finaly got 1.0.19 compiling by deleting the mng_write_sig from xtomng.c. The program runs but i don't know yet if it works.

After a simple './configure' command, here's the errors when trying to build 1.1.3pl1:

Code: Select all

Making all in src
make[2]: Entering directory `/home/amigo/Downloads/xvidcap/xvidcap-1.1.3-p7/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -DVERSION=\"1.1.3\"     -g -O2 -MT xvidcap-mngutil.o -MD -MP -MF ".deps/xvidcap-mngutil.Tpo" \
          -c -o xvidcap-mngutil.o `test -f 'mngutil.c' || echo './'`mngutil.c; \
        then mv -f ".deps/xvidcap-mngutil.Tpo" ".deps/xvidcap-mngutil.Po"; \
        else rm -f ".deps/xvidcap-mngutil.Tpo"; exit 1; \
        fi
mngutil.c:36:13: error: conflicting types for 'png_save_uint_16'
/usr/include/png.h:2823:1: note: previous declaration of 'png_save_uint_16' was here
mngutil.c: In function 'mng_write_sig':
mngutil.c:49:2: warning: 'sig_bytes' is deprecated (declared at /usr/include/png.h:1255)
mngutil.c:50:3: warning: 'sig_bytes' is deprecated (declared at /usr/include/png.h:1255)
make[2]: *** [xvidcap-mngutil.o] Error 1
make[2]: Leaving directory `/home/amigo/Downloads/xvidcap/xvidcap-1.1.3-p7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/amigo/Downloads/xvidcap/xvidcap-1.1.3-p7'
make: *** [all] Error 2

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#755 Post by technosaurus »

amigo wrote:

Code: Select all

mngutil.c:36:13: error: conflicting types for 'png_save_uint_16'
/usr/include/png.h:2823:1: note: previous declaration of 'png_save_uint_16' was here
I assume one was unsigned short and the other an equivalent typedef'd uint type

BTW, I'm taking a grad school class where I have to pick an open source project to do "non-programming" work for. I have it narrowed down to 1 of:
libxcb (mostly documentation )
netsurf/nsfb (testing, bug reporting and documentation)
musl-libc (documentation, testing)
toybox (documentation, testing)
(any other projects I'm interested in would involve code contributions)

any feedback? I'm leaning toward xcb because it lacks the documentation required to port major toolkits from x11 ... perhaps a replacement for tinyX11?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#756 Post by goingnuts »

I am using png-1.2.46 and gcc-3.4.3. Used same patch for 1.1.3 as for 1.0.19 to get pass the conflicting png errors. patch for building xvidcap-1.3.0 in P412
Last edited by goingnuts on Mon 09 Sep 2013, 15:57, edited 2 times in total.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#757 Post by goingnuts »

BTW, I'm taking a grad school class where I have to pick an open source project to do "non-programming" work for. I have it narrowed down to 1 of:
libxcb (mostly documentation )
netsurf/nsfb (testing, bug reporting and documentation)
musl-libc (documentation, testing)
toybox (documentation, testing)
(any other projects I'm interested in would involve code contributions)

any feedback? I'm leaning toward xcb because it lacks the documentation required to port major toolkits from x11 ... perhaps a replacement for tinyX11?
@technosaurus: xcb seems to be a very good choice...

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#758 Post by goingnuts »

xplanet compiles fine as a static linked bin. It gets quite big so cant post package here.
But again I hit the problem with rootwindow being total covered by other apps. In P412 its ROX who prevent a range of applications which write to rootwindow. ROX-1.2 seems not to do this.
jwm newer than 2.1 seems to do the same - covers up rootwindow - and I haven't been able to spot where in the ChangeLog this happened...
Would be so nice if jwm would allow rootwindow to be seen - and same thing for ROX above gtk1.2 versions.
xdesktopwaves mentioned in some post back contains code for writing to backdrop if needed.
Anyway the xplanet is a cool toy for having a more dynamic wallpaper.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#759 Post by amigo »

Thanks for the xvidcap patch -sorry I hadn't seen the recent replies. xplanet is nice.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#760 Post by goingnuts »

No problem - the patch will not work if embedded ffmpeg is chosen.
Also think that for convenience it should be compiled with that feature enabled to be able to capture and create video in one operation and it does not remove the feature of doing videos from images. I will update my xvidcap-package in near future...

I have to confess I have been wrong about jwm covering rootwindow :oops: Some snapshots might have had this behavior but a lot of them works fine.

I have just compiled latest jwm (868) and must say: I am impressed!
xplanet, conky, mplayer, xdesktopwaves, xvidcap etc. just works! And the sticky windows in pager is also gone. Bravo! :)

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#761 Post by goingnuts »

Here is a link to xvidcap-1.1.3.pet compiled with embedded ffmpeg for easy creation of screen-cast videos.
And here is a video of my present pupngo2013 draft made with it.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#762 Post by greengeek »

Can't wait to have a go with it. Looks interesting. (The yt vid stopped for me at 11.33 with an "unknown error" so I will try again later)

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#763 Post by Ibidem »

goingnuts wrote:Dragging up the original pupngo thread to continue blabla on more basic things...
Back in tinyXlib testing - got stuck with xdesktopwaves. It compiles ok but refuse to run as it cant translate color #406080 and other colors in same syntax. Adding "64 96 128 #406080" to rgb.txt helps a lot but seems to be an unusual hack.
So updated GetColor.c, Xcmsint.h, LookupCol.c, ParseCol.c. Added cmsCmap.c, Cmap.h, Cv.h, CCC.c, cmsColNm.c, XRGB.c, cmsInt.c, cmsGlobls.c, CvColW.c, LRGB.c, CvCols.c, cmsProp.c, HVCGcC.c, XYZ.c, uvY.c, xyY.c, Lab.c, Luv.c, HVC.c, cmsTrig.c, cmsMath.c, AddDIC.c, HVCMxC.c, HVCMxVC.c to X11lib which solves the problem.
BUT adds 20-30K to every binary linked against the new libX11. And most applications does not use the added functions at all. I do compile with "-Wl,--gc-sections,--sort-common,-s" but seems that the new functions are "glued" in...

SO: Are there any way to map the internal dependency of the functions in a library from source-code? If so this could be used to evaluate the consequences of adding functionality or to put in conditions when to use and when not to use...

The obvious solution to xdesktopwaves is to patch the source to use names from rgb.txt and bypass all above additions - but there might be applications that really benefit from the added functions...
Could you provide source for the latest changes? I've seen similar issues with urxvt.

To your question, cxref is the tool I'm aware of.
It looks like you may want to use
-xref -func -html
See http://www.gedanken.org.uk/software/cxref/

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#764 Post by goingnuts »

@Ibidem: Thanks for the cxref-link
Present tinyXlib-source is here - solved the color problem with settings at compile time - view changelog for details - but as it adds to size I recompile xlib for the (few) apps that needs this addition - and most of the time live well without it.

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#765 Post by Ibidem »

goingnuts wrote:@Ibidem: Thanks for the cxref-link
Present tinyXlib-source is here - solved the color problem with settings at compile time - view changelog for details - but as it adds to size I recompile xlib for the (few) apps that needs this addition - and most of the time live well without it.
Thanks. It's working nicely...urxvt is working, etc.
In fact, I'm typing this from links2 with the X driver, running under tinyxserver.
I'm using mwm for window manager at present.

I wanted to mention that I found cxref because I'd noticed a c??? command in POSIX that did something vaguely like what you wanted, so I looked in the POSIX manpages and found cxref, and then looked it up.
But when I'd just about finished typing it up, I hit the <- key by accident. With links, that means it's gone...

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#766 Post by goingnuts »

Ibidem wrote:...
Thanks. It's working nicely...urxvt is working, etc.
In fact, I'm typing this from links2 with the X driver, running under tinyxserver.
I'm using mwm for window manager at present.
...
Good! Any links for the sources of urxvt & mwm? I would like to test as well.

Found cflow-2.0 which will give:

Code: Select all

# ./cflow 9menu.c  
/root/bin/prcg: cannot redefine: 
/root/bin/prcg: cannot redefine: 
1       main {9menu.c 236}
2               strrchr {}
3               args {9menu.c 167}
4                       strcmp {}
5                       getenv {}
6                       getcwd {}
7                       strlen {}
8                       malloc {}
9                       sprintf {}
10                      putenv {}
11                      printf {}
12                      exit {}
13                      usage {9menu.c 476}
14                              fprintf {}
15                              exit {}
16              usage ... {13}
17              fopen {}
18              fprintf {}
19              exit {}
20              fgets {}
- there seems to be newer project with same name but lower version number - haven't tested though.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#767 Post by technosaurus »

there is also cscope
http://cscope.sourceforge.net/
and its tk frontend cbrowser
http://sourceforge.net/projects/cbrowse ... owser/0.8/
(many versions of emacs support cscope too)
... and the defacto
http://www.graphviz.org/
or a qt3 alternative:
http://sourceforge.net/projects/bouml-n ... /0/4.22.2/
which is now ported to qt4 and renamed douml
and lxr (written in perl)
or opengrok (in java)

there is also silentbob which requires ruby to build ... wtf, screw that! Do this.
g++ -Os -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -I$PWD/gclib/include -I$PWD/include gclib/src/*.c* sblib/src/*.c* silentbob/src/*.c* -o sbob -Wl,-O4,--gc-sections,-s

This geany gdb wrapper plugin could be helpful too:
http://git.geany.org/geany-plugins/tree/scope
Last edited by technosaurus on Sat 02 Nov 2013, 15:18, edited 1 time in total.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#768 Post by Ibidem »

goingnuts wrote:
Ibidem wrote:...
Thanks. It's working nicely...urxvt is working, etc.
In fact, I'm typing this from links2 with the X driver, running under tinyxserver.
I'm using mwm for window manager at present.
...
Good! Any links for the sources of urxvt & mwm? I would like to test as well.
Mwm is the "Motif Window Manager": it's part of the Motif source code that was recently relicensed as LGPL. I grabbed the source from git://git.code.sf.net/p/motif/code
I passed --disable-shared when building Motif; I had to run autogen.sh on a Debian box, since autoconf requires so much crap.
For urxvt see:http://dist.schmorp.de/rxvt-unicode/

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#769 Post by goingnuts »

Thanks - the "all-pink" has gone. Do you have application and icon name set? urxvt is calling XmbTextListToTextProperty to set the name, XmbTextListToTextProperty is in tinyX11lib but name is not set. That means in older jwm if application is minimized, jwm crash if pointer is over taskbar/un-named...

Could you pass your config flags for urxvt? I would like to get the transparency to work but have to disable to get the thing compile...

Update: Below patch will set app&icon name if/when XmbTextListToTextProperty fails:

Code: Select all

--- ./src/main.C.01	2013-02-17 00:51:51.000000000 +0000
+++ ./src/main.C	2013-11-02 20:30:32.000000000 +0000
@@ -917,6 +917,8 @@
 void
 rxvt_term::set_title (const char *str)
 {
+	XStoreName(dpy, parent, str);	// Set windowname for tinyXlib
+	
   set_mbstring_property (XA_WM_NAME, str);
 #if ENABLE_EWMH
   set_utf8_property (xa[XA_NET_WM_NAME], str);
@@ -926,6 +928,7 @@
 void
 rxvt_term::set_icon_name (const char *str)
 {
+	XSetIconName(dpy, parent, str);	// Set windowname for tinyXlib
   set_mbstring_property (XA_WM_ICON_NAME, str);
 #if ENABLE_EWMH
   set_utf8_property (xa[XA_NET_WM_ICON_NAME], str);

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#770 Post by Ibidem »

goingnuts wrote:Thanks - the "all-pink" has gone. Do you have application and icon name set? urxvt is calling XmbTextListToTextProperty to set the name, XmbTextListToTextProperty is in tinyX11lib but name is not set. That means in older jwm if application is minimized, jwm crash if pointer is over taskbar/un-named...

Could you pass your config flags for urxvt? I would like to get the transparency to work but have to disable to get the thing compile...

Update: Below patch will set app&icon name if/when XmbTextListToTextProperty fails:

Code: Select all

--- ./src/main.C.01	2013-02-17 00:51:51.000000000 +0000
+++ ./src/main.C	2013-11-02 20:30:32.000000000 +0000
@@ -917,6 +917,8 @@
 void
 rxvt_term::set_title (const char *str)
 {
+	XStoreName(dpy, parent, str);	// Set windowname for tinyXlib
+	
   set_mbstring_property (XA_WM_NAME, str);
 #if ENABLE_EWMH
   set_utf8_property (xa[XA_NET_WM_NAME], str);
@@ -926,6 +928,7 @@
 void
 rxvt_term::set_icon_name (const char *str)
 {
+	XSetIconName(dpy, parent, str);	// Set windowname for tinyXlib
   set_mbstring_property (XA_WM_ICON_NAME, str);
 #if ENABLE_EWMH
   set_utf8_property (xa[XA_NET_WM_ICON_NAME], str);
I had guessed that the all-pink was thanks to the color stuff, due to the errror messages I got.
Didn't check name/resources.

I disabled everything (--disable-everything or some similar option). So no transparency here.

Post Reply