Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Apr 2014, 03:07
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
pUPnGO - 6Mb ISO - Basic Building Block Puplet
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 32 of 58 [868 Posts]   Goto page: Previous 1, 2, 3, ..., 30, 31, 32, 33, 34, ..., 56, 57, 58 Next
Author Message
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Wed 02 Nov 2011, 12:10    Post subject:  

technosaurus: Guess we need multiple select menu and I haven't done any decent for console only. Possible for dialog/Xdialog. Also might need some dynamic change of choices depending on what users choose (limit choices of apps if diet libc chosen as example, but could also be choice of apps within a package - package textutilities have a lot of apps and would be nice if one could choose only some of them). Maybe I am making things too complicated...

nooby:
Your always welcome... I did make versions of pUPnGO with newer kernels (2.6.33.2 from lupo and 2.6.35.7 from snow) and essentially (and by purpose) everything else in pUPnGO except kernel/drivers was the same (only zdrv and initrd holds kernel-dependent stuff).
But its just a building block - and not a lot of people seems to see any advantage in using my approach as a basis for more feature rich systems.

I use P412 kernel because it gives a decent small size and works on old/new hardware. If I could have smaller sized kernel with same functionality using newer kernels I would use them.

PANZERKOPF: Thanks - I will look at that one - using xredit at the moment but...its ugly! Just compiled and did a small test: It nice! Its a "biggie" but you also get C-library lookup as far as I can see - and a lot more. So much functionality using X11/Xau/Xdmcp only.
Update: Compiled well with uclibc+tinyX11 and bin was only 55K larger than the dynamic linked bin. Attached pet holds the static version + all other needed files. Expands to approx. 1300K on disk.
Its really cool. Thanks!
xcoral-3.47-i486.pet
Description  Static build of xcoral-3.47
pet

 Download 
Filename  xcoral-3.47-i486.pet 
Filesize  423.82 KB 
Downloaded  113 Time(s) 

Last edited by goingnuts on Thu 03 Nov 2011, 01:26; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
PANZERKOPF

Joined: 16 Dec 2009
Posts: 280
Location: Earth

PostPosted: Wed 02 Nov 2011, 15:23    Post subject:  

Small puzzle game.
Smaller than "Hello Word" in C Smile
Uses Xlibs but main code is written in pure x86 assembly.
puzzle.asm.gz
Description 
gz

 Download 
Filename  puzzle.asm.gz 
Filesize  7.84 KB 
Downloaded  100 Time(s) 

_________________
SUUM CUIQUE.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Tue 08 Nov 2011, 06:19    Post subject:  

I got to thinking about adding many apps to the mcbs and the multiple if strcmp ... will start to take some time and add size

I wanted to do a switch case, but you can only do 1 character with it or an integer etc... so I found a way to convert the strings

change this:
Code:
echo 'int  main ( int argc, char** argv ){
#define _(x1,x2,x3,x4)  (((((((x4)<<8)|(x3))<<8)|(x2))<<8)|(x1))
switch ( _(argv[0][0],argv[0][1],argv[0][2],argv[0][3]) ) {' >main.c

and for the applets, just use the first 4 letters as such:
Code:
echo 'case _('j','w','m','\0')   :  return(jwm_main(argc, argv));' >>main.c


since _() is a macro all of the applet names get defined at compile time as a single value instead of an array of characters the only thing that gets checked at runtime is some simple math on arg0 and 1 comparison instead of X

Did I miss anything important?
I know busybox must do something similar because there was a recent post for fixing swapon and swapoff, so need to mention that in comments I guess (its an easy fix with another switch case if we ever get names that close)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2478
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Wed 09 Nov 2011, 09:06    Post subject: menu for console only.  

goingnuts wrote:
technosaurus: Guess we need multiple select menu and I haven't done any decent for console only. Possible for dialog/Xdialog. Also might need some dynamic change of choices depending on what users choose (limit choices of apps if diet libc chosen as example, but could also be choice of apps within a package - package textutilities have a lot of apps and would be nice if one could choose only some of them). Maybe I am making things too complicated...

This example of a menu in initrd might be of interest for you?
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Wed 09 Nov 2011, 15:54    Post subject:  

PANZERKOPF: Cute little thing! Reminded me of AsmLibx.

technosaurus: Haven't tried your code yet but looks attractive. Maybe missing the symlink- and instruction part. Below example of my current content in main_new.c (for a single app build):
Code:
#include <stdio.h>
#include <string.h>
int symlink(const char *path1, const char *path2);
char  *basename(char *);

int meh_main(int argc, char ** argv);

int main(int argc, char ** argv) {
if(!strcmp(basename(argv[0]), "mcb_meh") && (argc == 1)) {
   fputs("mcb_meh multicall binary (build 2011-11-09).\n", stdout);
   fputs("Usage: [function] [arguments]...called via symlink to mcb_meh.\n", stdout);
   fputs("Use [mcb_meh --install] to install all the symlinks.\n", stdout);
   fputs("\n", stdout);
   fputs(" Currently defined functions:\n", stdout);
   fputs(" meh\n", stdout);
}

else if(!strcmp(basename(argv[0]), "meh")) {
    return(meh_main(argc, argv));
    }

else if(!strcmp(basename(argv[0]), "mcb_meh") && strcmp(argv[1], "--install") == 0) {
    fputs("Installing symlinks...",stdout);
   
symlink(basename(argv[0]), "meh");
    fputs("done\n",stdout);
    }
    if(argc > 1 && !strcmp(argv[1], "--install") == 0){
    fputs(basename(argv[0]),stdout);
    fputs(": ",stdout);
    fputs(basename(argv[1]),stdout);
   fputs("...function not found.\n",stdout);
    }
    return(0);
}


L18L Thanks for the reference - its was more a multi-choice select function for CLI I meant - like:

(X) I want coffe
(X) I want sugar
( ) I want milk

An idea for the initrd-CLI menu: Include a static build of dialog to get more GUI-like menus - might also be implemented for savefile select?
dialog.gz
Description  rename to dialog - upxed static build of dialog-1.1-20071028 - 104K
gz

 Download 
Filename  dialog.gz 
Filesize  103.03 KB 
Downloaded  92 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Wed 09 Nov 2011, 19:18    Post subject:  

goingnuts wrote:

technosaurus: Haven't tried your code yet but looks attractive. Maybe missing the symlink- and instruction part.

yes that was intentional, I figured that would be best put into a script, but it might be nice to have it list the applets, so the script could be generic.

[ "$JWM" ] && APPLETS="$APPLETS $JWM"

echo 'case _('a','p','p','l') : return(printf("$APPLETS"));' >>main.c

then the script is something like this
Code:
#!/bin/sh
DIR=`dirname $0`
cd $DIR
for $x `applets` ; do ln -s mcb $x; done

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Sat 19 Nov 2011, 14:30    Post subject:  

Attached static builds (uclibc+tinyX11) of Xvesa [560K] and Xfbdev [544K]. Shipped upxed. I have run with the Xvesa for a couple of weeks now and it seems solid and stable. For the Xfbdev you need a kernel with framebuffer support and pass vga=ask or vga=785 to kernel at boot (ex: puppy pfix=ram vga=ask).
Fontpath compiled to "/usr/X11R6/lib/X11/fonts/misc/" and builds contain no build-in fonts. Patched with fix for black background and mouse-scroll.
xvesa_xfbdev_191111.tar.gz
Description  static builds of Xfbdev & Xvesa
gz

 Download 
Filename  xvesa_xfbdev_191111.tar.gz 
Filesize  525.58 KB 
Downloaded  94 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Sun 20 Nov 2011, 05:00    Post subject:  

If you would like to exercise the TinyX11-lib your self and compile Xvesa/Xfbdev I have posted the source for above builds and the used uclibc - both as pet-files - here.
Update: Also posted source and build script for additional libs (libjpeg, libpng, giflib, libPropList and libopenssl) as well as a collection of sources for applications that can be build with TinyX11 (9menu-1.8, calctool-2.4.9.orig, NDL , pupslock-0.1, wmix-3.2, asmem-1.9, meh-0.3, pmmon5, wmcpuload-1.0.0 and wmnet-1.05)
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Mon 28 Nov 2011, 23:54    Post subject:  

@goingnuts - excellent work on the new MCBs,

I went through a bunch of X11 text editors and none of them compare with the older (3.x) version of minimum profit with the ncursesw backend -
Amazingly it actually looks better than most X-only editors and will do text highlighting, search/replace, block copy/paste, regular expressions, macros, autoindent... could probably backport spellcheck - v5 just uses the aspell binary
(there is a gtk1 backend too, which ends up being smaller than PDcurses since it uses an Xaw backend)

here is a basic template for defaulttext{editor,viewer}
[ $DISPLAY ] && rxvt -e mp --mouse $@ || mp $@

this could be a preferred method for doing the default* apps, since they could be used in a console only version as well (maybe with a little tweaking of bg & fg colors depending on the mode?) dialog could maybe be Xdialog with a wrapper, but not 100% sure how to get stdout/err back

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Tue 29 Nov 2011, 15:02    Post subject:  

@technosaurus: Thanks!
I would have liked to do a mcb of Xvesa and Xfbdev as they only differs a few Kb libraries but it seems that the main-function in some way detects which libs are included and in which order... Confused

I did make a mcb_curses holding dialog/retawq/aumix/htop/mp with a decent size. If any interests in exercising this I can post it here...

I have been messing with building gtk 1.2 on top of tinyX11/uclibc with some success although my fight with libtool has not ended yet. Not being very skilled in gtk its a slow process - and although apps builds fine - some segfaults for unknown reasons. Status is a working Xdialog-2.3.1, gtkedit-0.1 and gtkdiskfree-1.6.5. emelfm-0.9.2 builds but has trouble setting its conf files. Fm-0.2 builds but I haven't found much fun with it as a file manager. Started out trying to build ROX-Filer-1.2.2-12 but cant get tinygdk-pixbuf-0.21.0 running yet - also miss fontconfig and other needed stuff for this.
All the gtk builds ends up 800-1000K in size (as standalone) - but if they could be mcbized I guess one could create a descent collection of must have apps with a total size 1200-1800K.
Back to top
View user's profile Send private message Visit poster's website 
PANZERKOPF

Joined: 16 Dec 2009
Posts: 280
Location: Earth

PostPosted: Tue 29 Nov 2011, 18:11    Post subject:  

goingnuts wrote:
and although apps builds fine - some segfaults for unknown reasons.

In my experience, some gtk1 apps crash with segfault when needed fonts (hardcoded) are not present in current system. They work properly after editing sources or making font aliases in current system.

_________________
SUUM CUIQUE.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Wed 30 Nov 2011, 15:05    Post subject:  

PANZERKOPF: Thank you for the hint!
Turns out that emelfm is so convinced that its plugins is present at first run that it does not check if they are - and segfaults. Thats a bug. Fixed in attached build. Plugins wont work in a static build (they are shared objects) but seems to be unneeded as you can use normal function calls instead.

It still have some suicidal behavior if you try to change font to some of the listed types (in pUPnGO). Might be that my approach by having all fonts in one directory is the problem...

Seems to me that gtk-apps are developed in a more mature environment than pUPnGO. Although all dependencies are fulfilled they might fail because of missing "application dependencies". Ex. emelfm needs "file" present to show File Type, free, df and others. And source code do not respond informative if missing...

For file type I found the attached hexd/file-script in mulinux - modified it a bit (source code included below) and its a low resource replacement working for ROX-Filer/emelfm and from console. Guess the file types recognized could be expanded by adding info to the script. Needs dd and the included hexd.

hexd gives you the following additional tools:
Code:
BinToHexText  : show code in hex + ascii.   User can edit the hex code.
HexTextToBin  : translate hex code derived from BinToHexText to binary code.
BinToHexOnly  : show code in hex with no spaces or linefeeds.
BinToTextOnly : show code as text, and dots for what can't print.
PrintText          : called by the text output functions, shows printable chars


Also included in attached archive is the static build of emelfm-0.9.2...(400K upxed)
Update 121211: Removed attachment view for better one...

Last edited by goingnuts on Mon 12 Dec 2011, 16:06; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Sat 03 Dec 2011, 07:44    Post subject:  

technosaurus: It took me a little time to do the test of gtk version of mp: Its really a nice and tiny replacement for geany!

So included it (gtk only) in the first successful gtk-mcb build: dillo-0.8.6, emelfm-0.9.2, Xdialog-2.3.1 and mp-3.3.13 in one 1644K bin (676K upxed). The included mcb_gtk is "self-configuring" as it will create needed dirs for emelfm/dillo and some rudimentary config files (if you put mcb_gtk in /usr/bin and run command: mcb_gtk --install) but it is shipped with directory structure, symlinks and config-files.

Did a ssl version of dillo also but could not read gmail anyway so removed it again. Have fun with these 4in1 must have gtk1 apps.
b]Update 121211:[/b] Removed attachment view for better one...

Last edited by goingnuts on Mon 12 Dec 2011, 16:06; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
PANZERKOPF

Joined: 16 Dec 2009
Posts: 280
Location: Earth

PostPosted: Sat 03 Dec 2011, 09:33    Post subject:  

goingnuts wrote:
PANZERKOPF: Thank you for the hint!
Seems to me that gtk-apps are developed in a more mature environment than pUPnGO.

Yes, build "oldschool" apps in new environment is sometimes problematic.
Quote:

For file type I found the attached hexd/file-script in mulinux - modified it a bit (source code included below) and its a low resource replacement working for ROX-Filer/emelfm and from console. Guess the file types recognized could be expanded by adding info to the script. Needs dd and the included hexd.

I guess that busybox hexdump can be used instead of hexd.

_________________
SUUM CUIQUE.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Sat 03 Dec 2011, 17:50    Post subject:  

goingnuts wrote:

Did a ssl version of dillo also but could not read gmail anyway so removed it again. Have fun with these 4in1 must have gtk1 apps.
I wonder if it is just a user agent issue... If not, there is sylpheed-1.0.x

I wish Google would commit to an api (not just mail)

With what you have so far, I am guessing we could put together a loaded initramfs in ~3mb or have a kernel image with X built into the kernel image in 4mb.

I can post my older version when I get home Monday, but I finally got it to start aterm devpts had to be mounted and SHELL exported as /bin/sh unless busybox is built with the built-in bash as ash alias. From there the "normal" boot process can happen in an open terminal(s)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 32 of 58 [868 Posts]   Goto page: Previous 1, 2, 3, ..., 30, 31, 32, 33, 34, ..., 56, 57, 58 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1197s ][ Queries: 13 (0.0263s) ][ GZIP on ]