Puppizard 008

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
russoodle
Posts: 707
Joined: Fri 12 Sep 2008, 17:36
Location: Down-Under in South Oz

#16 Post by russoodle »

Thank you, Iguleder....i've uploaded them to my site, so there'll be an additional d/l location for them.

There are a number of random .pets in there, so they're in a named folder to make them easier to find. The url is:
http://www.puppylinuxstuff.meownplanet. ... /Iguleder/
[i][color=Green][size=92]The mud-elephant, wading thru the sea, leaves no tracks..[/size][/color][/i]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#17 Post by jpeps »

Nice idea. I just used it to update Homebank. The GUI got stuck, but running "pur-build homebank" from the command line immediately produced a prompt requesting installation of the targz. It doesn't search for a previously installed desktop file, so created another menu entry without an icon. Since the files were updated, deleting the file left the original loading the updated version in Lucid 5.2.5. Thanks for the useful app!

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#18 Post by Iguleder »

It doesn't get stuck - Homebank has heaps of PNG files and optimizing them takes ages.

Regarding the menu entry - yes, the menu looks horrible unless you use some normal icon theme (e.g the GNOME one) with a full-featured DE or WM (Xfce, E17, etc').
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#19 Post by jpeps »

Iguleder wrote:It doesn't get stuck - Homebank has heaps of PNG files and optimizing them takes ages.
Yeah, it did. I went out to do an errand, and came back a few hours later and the original "building homebank" (or something to that effect) was still there. I closed it out, and tried running the CLI, and the installation GUI appeared.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#20 Post by Sylvander »

Could someone list the steps they've taken during the successful use of this?

So that perhaps even a non-expert like myself may be able to use it?

Some key terms may need to be explained.
e.g.
What is a "source" [I've seen "source code" mentioned in my travels]
Stripping and trimming a package->of what?
What are "Static Libraries"?

p.s. Added a link to this thread in my PC-Guide->"Puppy Linux" thread. :D
So I ALWAYS know how/where to find it.
And so will others.

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

#21 Post by nooby »

Sylvander wrote: What is a "source" [I've seen "source code" mentioned in my travels]
wiki to rescue

http://en.wikipedia.org/wiki/Source_code
In computer science, source code is text written in a computer programming language. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source code, which can then be automatically translated to binary machine code that the computer can directly read and execute.

An interpreter translates to machine code and executes it on the fly, while a compiler only translates to machine code that it stores as executable files; these can then be executed as a separate step.

Most computer applications are distributed in a form that includes executable files, but not their source code, which is only useful to a computer programmer who wishes to understand or modify the program.

The source code which constitutes a program is usually held in one or more text files stored on a computer's hard disk; usually these files are carefully arranged into a directory tree, known as a source tree.

Source code can also be stored in a database (as is common for stored procedures) or elsewhere.


The most important thing about source code is that it allows others to understand how the program is set up to achieve it's goals and if the documentation the human comments that is for us to read and the computer to ignore is that one can modify it so it suites our need. That is why we have "Free Open Source Software" FOSS so we don't have to pay incredible high sum to use that code?

QNX OS that is used now in latest RIM BlackBerry Playbook most likely is proprietary source code that you need a license to use.

Some 25 years ago I trusted the then "dogma that everybody can learn anything if one set ones mind to it and that talent was another word for hard work" so I tried to learn Assembler and C++ and all the other computer languages. It was not true. Not everybody can be a programmer.
Last edited by nooby on Sat 25 Jun 2011, 10:11, edited 1 time in total.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#22 Post by Iguleder »

Software is written in programming languages, which define a certain syntax in which software can be written. This text (i.e, code) defines the algorithm and the flow of the program. In other words, the code of a program is written in a programming language and defines what the program does.

However, computers don't speak programming langauges - they speak machine language, which consists of long sequences of 0 and 1 - 1 indicates high voltage and 0 indicates little or none.

The procedure in which a software product is converted from the human-readable programming language into machine language is called compiling; the tool that performs this operation is a compiler. In our case, it's GCC, GNU's compiler.

The compiled software (i.e in the format the computer can understand and run) is called a binary package ("binary language" is a synonym for "machine language"), while the code (the text written in a programming language) is called the source; that's the source code.

Packages come in two forms: source packages and binary packages. For example, Slackware's packages come as binary packages, after someone compiled them for you. You just install the binary package and that's it. However, each package is built using a build script which patches the source package, compiles it and turns it into a binary package.

This tool allows you to automatically download a source package and build it using a build script that comes with the tool, in order to produce a binary package on your computer and not on someone else's computer.

Regarding static libraries - there are two kinds of libraries. One called "shared libraries" - these libraries appear once on the system and each application which relies on them simply loads them. The other kind is "static libraries" - these are compiled into the package that rely on them, so each application has its little, built-in copy. This wastes space but provides a very marginal performance gain; Puppy's approach is to use shared libraries, as many as possible, because static libraries waste space.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

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

Puppy Ports 002

#23 Post by L18L »

Sylvander wrote:Could someone list the steps they've taken during the successful use of this?
simple steps I have used to get latest full featured yad:
- install pur-tools-o.2.pet (see 1st post)
- Menu > System > Puppizard
- select yad
- needed some patience
- yad 0.12.2 was offered to be installed

Really easy :)
Thank you iguleder
Edited
and thank you for your example of simple English too :wink:
edited once again
yes devx of course
Last edited by L18L on Sat 25 Jun 2011, 10:30, edited 3 times in total.

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

Re: Puppy Ports 002

#24 Post by nooby »

L18L wrote:
Sylvander wrote:Could someone list the steps they've taken during the successful use of this?
simple steps I have used to get latest full featured yad:
- install pur-tools-o.2.pet (see 1st post)
- Menu > System > Puppizard
- select yad
- needed some patience
- yad 0.12.2 was offered to be installed

Really easy :)
Thank you iguleder
Sylvander if I get it this means he already had Devs sfs installed?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#25 Post by Iguleder »

Uploaded a version with small bug-fixes and overall cleanup.

I'm also uploading a new kernel I just built (using a script, too ... hehe) ... my puplet sense tickles :wink:
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

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

pur

#26 Post by L18L »

Iguleder wrote:Uploaded a version with small bug-fixes and overall cleanup.
Now my unspoken question where to get advancecomp and optipng from in answered.

BTW, compiling from source means that compiler is using i686 if on a 686 machine. Right?

Thanks again.
Attachments
pur-0.3.png
menu > system > puppizard
(21.28 KiB) Downloaded 908 times

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#27 Post by Iguleder »

Install AdvanceCOMP and OptiPNG through Puppizard itself :)

The packages won't be ultra-stripped, so after you install them, do another round.

And regarding the i686 issue - see /usr/share/pur/profiles/default. The default CFLAGS are "safe" - i386 and size. I don't know why, many say i386 optimization makes packages uber-fast and it works well for me.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

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

#28 Post by nooby »

AJ told me that Vector Linux was compiled from Arch but done for 486 while Arch Linux themselves compiled for 686.

And you talk about 386? How come that different Devs prefer different compile targets like that?
I use Google Search on Puppy Forum
not an ideal solution though

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

pur

#29 Post by L18L »

Iguleder wrote:And regarding the i686 issue - see /usr/share/pur/profiles/default. The default CFLAGS are "safe" - i386 and size. I don't know why, many say i386 optimization makes packages uber-fast and it works well for me.
Mh, hard to believe (the uber-fast), i386 had no floating point algebra

But why not just try, measure and compare it?
Using cpufamily in /proc/cpuinfo.

Anyone else interested in investigation of this?
edited
I am trying now

Code: Select all

case $(uname -m) in
	i686)
		LIBDIR_SUFFIX=""
		CFLAGS="-march=i686 -Os -fomit-frame-pointer -pipe "
		ARCH="i386"
		;;
	i?86)
Last edited by L18L on Sat 25 Jun 2011, 12:11, edited 1 time in total.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#30 Post by Iguleder »

Just remove the CFLAGS and CXXFLAGS from /usr/share/pur/default/profile and packages will automatically build with optimizations suitable for your system.

Regarding the FPU thing - these are just optimizations, it doesn't mean your FPU isn't used.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

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

puppy ports 003

#31 Post by L18L »

Thank you,
it will take some time on my 1.5GHz, now I will logout.

Edited 2011-07-05
There are some marginal differences in size.
# pwd
/mnt/+initrd+mnt+dev_save+wary511q+warysave.3fs/root/test686/686/usr/bin
# ls -l
total 464
-rwxr-xr-x 1 root root 108724 2011-06-26 15:44 advdef
-rwxr-xr-x 1 root root 129536 2011-06-26 15:44 advmng
-rwxr-xr-x 1 root root 96448 2011-06-26 15:44 advpng
-rwxr-xr-x 1 root root 118248 2011-06-26 15:44 advzip
#
# pwd
/mnt/+initrd+mnt+dev_save+wary511q+warysave.3fs/root/test686/386/usr/bin
# ls -l
total 464
-rwxr-xr-x 1 root root 108724 2011-06-26 15:32 advdef
-rwxr-xr-x 1 root root 129472 2011-06-26 15:32 advmng
-rwxr-xr-x 1 root root 96448 2011-06-26 15:32 advpng
-rwxr-xr-x 1 root root 118052 2011-06-26 15:32 advzip
#

i386 is making smaller files :!:
Last edited by L18L on Tue 05 Jul 2011, 17:59, edited 3 times in total.

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

Puppy Ports 003

#32 Post by L18L »

jpeps wrote:
Iguleder wrote:It doesn't get stuck - Homebank has heaps of PNG files and optimizing them takes ages.
Yeah, it did. I went out to do an errand, and came back a few hours later and the original "building homebank" (or something to that effect) was still there. I closed it out, and tried running the CLI, and the installation GUI appeared.
My observation is:
pur-gui started from command line makes a messages at top of screen.
I went out too, came back and waited and waited ....
The process started after hovering the messages. It was very fast then. :)

This could be called get stuck

I would call it unexpected behavior.

SimpleWater
Posts: 94
Joined: Tue 19 Apr 2011, 11:53

#33 Post by SimpleWater »

Not to be a downer or anything, but does this method not provide more work? Would it not be easier if you could do something like "pur build http://website.org/source.tgz"? Or what about a script that makes a build script?

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#34 Post by Iguleder »

No, of course not... how can you make the computer able to understand what a sources tarball contains? How is the script supposed to determine the package in the tarball and how to build it?

And what if it needs some patching or special care to be built correctly? :idea:

And if you want a script that generates build scripts - build a robot that resembles the human brain and spirit perfectly. Then program the AI :lol:
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#35 Post by Iguleder »

Just to let you know, guys - I'm working on an improved version of the whole thing. This one is safer and smarter in many areas.

I also wrote an Opera build script, which makes a package from the official Opera installer - quite useful for keeping the system clean.

Here's what the new aterm build script looks like:

Code: Select all

#!/bin/sh

PKG_NAME="aterm"
PKG_VER="1.0.1"
PKG_REV="1"
. /usr/share/pkg/default

download() {
	# download the sources
	for file in ftp://ftp.afterstep.org/apps/$PKG_NAME/$PKG_NAME-$PKG_VER.tar.bz2 http://www.afterstep.org/data/php/desktop/icons/rxvt.png
	do
		wget $file
		[ $? -ne 0 ] && return 1
	done
	return 0
}

build() {
	# extract the sources
	tar -xvf $PKG_NAME-$PKG_VER.tar.bz2
	[ $? -ne 0 ] && exit 1

	cd $PKG_NAME-$PKG_VER

	# configure the package
	CFLAGS="$CFLAGS" ./configure $BASE_CONFIGURE_ARGS --prefix=/usr \
	                             --disable-utmp --disable-wtmp \
	                             --disable-kanji --disable-big5 \
	                             --disable-greek --disable-thai \
	                             --disable-ttygid --enable-xgetdefault \
	                             --disable-memset --disable-dmalloc \
	                             --disable-dlmalloc --disable-gdb \
	                             --disable-sigsegv --enable-transparency \
	                             --without-libefence --disable-fading \
	                             --disable-background-image \
	                             --disable-next-scroll --enable-xterm-scroll \
	                             --disable-menubar --disable-graphics \
	                             --disable-half-shadow 
	[ $? -ne 0 ] && return 1

	# build the package
	make -j $BUILD_THREADS
	[ $? -ne 0 ] && return 1

	return 0
}

package() {	
	# install the package
	make DESTDIR=$INSTALL_DIR install
	[ $? -ne 0 ] && return 1

	cd ..
	
	# create symlinks for compatibility with existing stuff that rely on rxvt
	ln -s aterm $INSTALL_DIR/usr/bin/rxvt
	ln -s aterm $INSTALL_DIR/usr/bin/urxvt
	ln -s aterm $INSTALL_DIR/usr/bin/xterm

	# create a menu entry
	mkdir -p $INSTALL_DIR/usr/share/applications
	echo '[Desktop Entry]
	Encoding=UTF-8
	Name=Aterm
	GenericName=Terminal emulator
	Comment=command line shell
	Exec=aterm
	Icon=aterm
	Type=Application
	Categories=Utility;TerminalEmulator;' > $INSTALL_DIR/usr/share/applications/aterm.desktop

	# add the icon
	mkdir -p $INSTALL_DIR/usr/share/pixmaps
	mv rxvt.png $INSTALL_DIR/usr/share/pixmaps/aterm.png
	
	return 0
}
There's a wrapper called "buildpkg" which runs the build scripts in a dedicated directory and takes care of all error handling. It also takes care of the package creation, so this code appears only once. Makes life easier.

Tomorrow I guess I'm gonna rewrite many of the build scripts in the new format and build another E17. I did a rebuild today and I see E17 improves with every revision :D
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

Post Reply