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:

#586 Post by technosaurus »

for the ultra-minimalist window managers, I already posted mcwm (though it is a bit outdated now), its by far the lightest when statically compiled due to using xcb instead of X11 (X11 doesn't statically link well though tinyx11 gets us a bit closer)... and it has an ISC license ... some others xcb window managers are i3, uuwm, uwm (based on jwm) there is even a composite manager called unagi

Edit:
several pages back we were trying to find a way to use a running instance of a multicall binary to run new "applets" rather than spawning a whole new instance (the way ROX-Filer does) I think we had everything except the mechanism to get new args into the running process. ---Solved (I think, see the notes on apipe).

Code: Select all

#include <stdio.h>

void argsfromstdin(void){	/* TODO accept a function pointer to run ac, av */
char s[255],  av[255][255];
unsigned char i=0, pos=0, ac=0;
enum quotes_t{QUOTED=0,UNQUOTED}quotes=UNQUOTED;

//open a file ./apipe and store its file descriptor in variable apipe
//use mkfifo /tmp/apipe to create it ... or you can use stdin
//FILE * apipe = fopen("/tmp/apipe","r");;
fgets(s,255,stdin);

while (i<strlen(s)) {
	/* '!'=33, 'ÿ'=-1, '¡'=-95 outside of these are non-printables */
	if ( quotes && ((s[i] < 33) && (s[i] > -1) || (s[i] < -95))){ 
		av[ac][pos] = '\0';
		if (av[ac][0] != '\0')	ac++;
		pos = 0;
	}else{
		if (s[i]=='"'){  /* support quoted strings */
			if (pos==0){
				quotes=QUOTED;
			}else{		/* support \" within strings */
				if (s[i-1]=='\\'){
					av[ac][pos-1] = '"';
				}else{	/* end of quoted string */
					quotes=UNQUOTED;
				}
			}
		}else{			/* printable ascii characters */
			av[ac][pos] = s[i];
			pos++;
		}
	}
	i++;
}
/* TODO accept a function pointer to run ac, av */
#ifdef DEBUG
#include <string.h>
#define write1(s) write(1, s, strlen(s))
while (ac-->0) {write1(av[ac]);write1("\n");}
#endif

}

int main(int argc, char *argv[]){
argsfromstdin();
}
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:

#587 Post by goingnuts »

technosaurus: Had not seen your update - would be cool if it works!

The latest post about window managers reminded me that I had a static build of conky lying around.

Also found that gxine-0.2.1 is gtk1..now I only need to get a static uclibc xinelib build... :roll:
Attachments
snap0002.png
(6.7 KiB) Downloaded 1394 times
conky-1.3.0-486.tar.gz
static build conky
(93.5 KiB) Downloaded 375 times

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#588 Post by PANZERKOPF »

About GetGUI:
I modified somewhat, now it can recognize Dialog/Xdialog syntax and following
options:
--title
--backtitle
--ok-label
--yes-label
--cancel-label
--no-label
--no-cancel
--default-item
--password
--msgbox
--inputbox
--yesno
--menu
--menubox
--radiolist
--checklist
--combobox
--fselect
Getgui's native options are not broken (I hope). Some default values are changed for my own needs (default fonts, button color etc..).
Also, a program name is changed to "xgetgui" to avoid copiright conflicts.
Attachments
xgetgui-0.1a.tar.gz
(151.28 KiB) Downloaded 369 times
SUUM CUIQUE.

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

#589 Post by technosaurus »

PANZERKOPF wrote:About GetGUI:
I modified somewhat, now it can recognize Dialog/Xdialog syntax and
...
Getgui's native options are not broken (I hope). Some default values are changed for my own needs (default fonts, button color etc..).
Also, a program name is changed to "xgetgui" to avoid copiright conflicts.
I went through and fixed most of the syntactical build errors, and tweaked the font and border settings so it isn't so fugly. Still needs a lot of cleanup though ... mainly how the functions and variables are declared... also made a build script.

Edit @PANZERKOPF, btw most of the fixes were not your code - just legacy stuff and from ripping chunks out of ploticus ... also I added the list of widgets to the --help (though I didn't put any order to them or descriptions or formatting)
Attachments
xgetgui-T.tar.gz
(153.31 KiB) Downloaded 339 times
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:

#590 Post by goingnuts »

PANZERKOPF: Really nice! If only we could add scrolling to the menu and file select windows it would be close to perfect. I did try to contact the developer about this but never got any contact...

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#591 Post by PANZERKOPF »

technosaurus wrote: I went through and fixed most of the syntactical build errors, and tweaked the font and border settings so it isn't so fugly. Still needs a lot of cleanup though ... mainly how the functions and variables are declared... also made a build script.
Edit @PANZERKOPF, btw most of the fixes were not your code - just legacy stuff and from ripping chunks out of ploticus ... also I added the list of widgets to the --help (though I didn't put any order to them or descriptions or formatting)
Thanks!
goingnuts wrote:PANZERKOPF: If only we could add scrolling to the menu and file select windows it would be close to perfect.
I agree but seems this is not possible without completely rewriting an internal toolkit.
Unfortunately I have poor experience with X toolkits :(
P.S.
Another crazy idea about GTK1:
It is possible to make it UTF compliant or that is same as reinventing a wheel?
This idea was born when I found a clone of Athena Widget: Xaw3Dxft.
It supports UTF and Xft so If someone can improve Athena, why another one can't improve gtk1?
SUUM CUIQUE.

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

#592 Post by technosaurus »

PANZERKOPF wrote:...
Another crazy idea about GTK1:
It is possible to make it UTF compliant or that is same as reinventing a wheel?
This idea was born when I found a clone of Athena Widget: Xaw3Dxft.
It supports UTF and Xft so If someone can improve Athena, why another one can't improve gtk1?
Gtk-xcb fits the bill (the one on sourceforge, not the one in gtk's git tree). It was forked right before the cairo dependency and uses xcb as the backend (will need updated for newer versions though). Ideally I would like to update it to work with pango-1.24.5 and latest xcb libs, and add maybe some widgets/functions.
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].

justauser
Posts: 28
Joined: Wed 09 Nov 2005, 21:24

Take a look at tinycore

#593 Post by justauser »

If you are looking for interesting ideas about a minimalist distribution take a look at tinycore


http://distro.ibiblio.org/tinycorelinux/welcome.html


[/url]

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

Re: Take a look at tinycore

#594 Post by nooby »

justauser wrote:If you are looking for interesting ideas about a minimalist distribution take a look at tinycore

http://distro.ibiblio.org/tinycorelinux/welcome.html
I know too little but I would be surprised if these two ahve the same goal?
Goingnuts will know though.
I use Google Search on Puppy Forum
not an ideal solution though

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

Re: Take a look at tinycore

#595 Post by goingnuts »

justauser wrote:If you are looking for interesting ideas about a minimalist distribution take a look at tinycore
Thanks...I haven't followed too close the development of TC since I made this special version of pUPnGO: pUPnGO_V412_080211.iso running TC as topping. TC definitely is an interesting distro...but sort of lost interests after spending a short time on their forum...

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

#596 Post by technosaurus »

Ditto on the toxic-caustic forum... That is what TC stands for right? I once had several hundred posts, but the constant mis-moderation convinced me it was as much of a lost cause as DSL (the main dev's former project), so I made sure to post all my relevant topics here (before removing all of my posts there). Tcl also stopped being simple a long time ago ... Puppy too, but I know puppy and like simple... so I try to make it simpler... Pupngo was already simpler, so I help out here when I can and the other more spotlight oriented devs cherry-pick from here and it slowly filters into mainline (not all, by any means... my init/xinit combo written in c is way oversimplified for a "standard" linux desktop but gets a basic gtk1 desktop in a 2mb kernel image). We test out these insane "impossible" ideas where experts would say it can't be done... It's a good thing we aren't "experts".
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].

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: Take a look at tinycore

#597 Post by L18L »

justauser wrote:If you are looking for interesting ideas about a minimalist distribution take a look at tinycore


http://distro.ibiblio.org/tinycorelinux/welcome.html


[/url]
Did take a look back too ... :shock:
i understand that not worth powder and shot
quoted from
http://forum.tinycorelinux.net/index.ph ... l#msg71186 :)

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

#598 Post by greengeek »

technosaurus wrote: other more spotlight oriented devs cherry-pick from here and it slowly filters into mainline (not all, by any means.... We test out these insane "impossible" ideas where experts would say it can't be done... It's a good thing we aren't "experts".
It is fascinating watching what you guys have been doing. I am glad you are happy to be in the engine room, and that you have stuck with Puppy. It is so annoying when some projects get overtaken by "ego", but that isn't happening here. Watching these posts is like taking a peek into the inventors back shed. Thanks.

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#599 Post by Aitch »

Watching these posts is like taking a peek into the inventors back shed. Thanks.
Aye to that...my sentiments entirely....great stuff, I'm an avid reader! :D

Aitch :)

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

#600 Post by goingnuts »

Did take a look back too ...
:) ...They have "Hero Member"´s too - did not find any heroine there though :wink:

Ohh and that wbar - looks so cool - even began to build a static version - starting with imlib2 and then remembered why I did not succeed in the past: wbar is cc/c+ or whatever. :cry:

But found another Easter-time-killer: beaver - quite mature editor with some syntax highlight and more modern mouse response that the gtk-version of mp. Attached a static build of beaver - only had to disable a font-style-setting to avoid segfaults in the static build bin.
Attachments
snap0000.png
running pupngo+beaver
(42.83 KiB) Downloaded 403 times

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

X11-tiny almost builds with musl

#601 Post by Ibidem »

I'm playing around with getting X11-tiny to work with musl[1].
Mostly it's a matter of substituting the right CC, -I.../include, and so on.
(musl provides a wrapper known as musl-gcc that's fairly effective at building stuff properly, without changing things behind your back--usually, make CC=musl-gcc is enough).

So far, build fails on Xfbdev and Xvesa but builds the libraries. I think this is just missing vm86 stufff.

[1] Musl is a libc that's aimed at minimizing footprint while providing a fully standard library with stable ABI--see http://www.etalabs.net/musl/
libc. I've gotten static busybox 1.18.5 binaries at around 800-900k, IIRC-don't reember whether that was stripped.

Code: Select all

ls -l libc.a
-rw-r--r-- 1 root root 1553870 2012-04-03 16:17 libc.a
And there are no extra libraries, unlike glibc.

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

#602 Post by goingnuts »

Ibidem: Sounds good - I did try to use musl as well but think I was not patient enough...
If you can get Xvesa build using musl and tinyX11 it will be very interesting to compare the size of the final bin with the one obtained using uclibc.

I have been looking for a GUI front end for minimp3 for some time. Started to build one myself using the gtkdialog1 backport...But today I was looking for some other stuff at amigos comprehensive collections of gtk1 goodies - and found xhippo.
Even though designed for mpg123 and friends it can use a symbolic link to minimp3 (named mpg123...).
We might spice the GUI up a bit - I think it could use some image-buttons - but might be another day. Attached a pet with a static build of xhippo.
Attachments
snap0001.png
and the thing running as it is now
(120.13 KiB) Downloaded 980 times

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

#603 Post by technosaurus »

I have done builds with eglibc, uclibc, dietlibc and musl. Of those, uclibc is by far the most coverage for its size (eglibc is not much smaller than glibc ... just better and will compile with -Os without my glibc-Os patch, but now that Ulrich Drepper is out of the lead, I suspect sanity to prevail and a remerge ala Xorg and compiz) The only issue with all of these is the lgpl or gpl (dietlibc) license that makes our multicall binary strategy legally problematic ... so I am planning to build from here:
http://code.google.com/p/gentoo-bionic/downloads/list
at one time bionic did not have wchar support, but I think that may no longer be the case (gtk need wchar) ... and then rob's toybox to replace busybox and we can build the whole system as a multicall binary without having to think too much about the boring stuff.
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

#604 Post by Ibidem »

There's a bit of sed to change the compiler to musl-gcc; it's also critical to change some of the includes.
When building tinyX11, I kept getting errors like "could not find Cl".
I figured out that the command line is too long: using echo *.o |xargs ${CMD} instead of ${CMD} file1.o file2.o ... fixes this.
__[gu]id_t need the leading underscores removed for proper behavior.

And there's one show stopper ATM: no sys/{vm86,io}.h is provided. That may be on the way, though.
musl is currently LGPL with BSD parts, but Rich Felker decided that 0.9.0 will be BSD-licensed.
musl has wchar and co.
I'm working on adding _BSD_SOURCE macros to the headers, partly so that toybox will build without -D_GNU_SOURCE (see Rob's comments about defining _ALL_HAIL_RICHARD_STALLMAN)
One big advantage over uclibc is a stable abi-you can take nonthreading binaries linked to 0.7.x and run them with 0.8.7 or later. This makes for easier upgrades on any nonstatic system.

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

#605 Post by technosaurus »

I will try to provide a patch for those (either by adapting from a bsd or bionic) if/as soon as rich changes this: http://git.etalabs.net/cgi-bin/gitweb.c ... NG;hb=HEAD
Sounds like Rob (or someone on his behalf) put a bee in his bonnet ... it really wasn't filling any unfilled niche as a smaller lgpl licensed c library, but as BSD it could really gain some steam. I didn't have great success with the musl gcc wrapper before, so I ended up rewriting it (a native compiler would be better if you could point me to one or even the tools to build it properly) ... now to find a smaller BSD-ish replacement for jwm than enlightenment16 (currently looking at windwm 1.4, but it is not a full replacement) I am probably going to convert my sdialog program over to build with libagar instead of (or in addition to) gtk, so we have a permissively licensed gtkdialog/yad/zenity/xdialog replacement.

If all goes well with musl that will render most of my idea to combine all of the essential lgpl libraries into a single shared library moot (though I still may combine v1.2.x of glib,gtk* & gdk*) This would reduce the size (both library size -due to optimizations and ram usage -due to less dirty pages and elf garbage ) as well as speed up starts since less libraries will need to be dynamically loaded.
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].

Post Reply