Page 1 of 2

How do I use the devx.sfs module?

Posted: Sun 06 Dec 2009, 02:02
by scraginagmu
Ok...I know I'm dumb...well, if my wife says it, it must be true...but how the heck do ya program in puppy?
I am told that the appropriate devx module, when installed, turns puppy into a "complete programming environment"
Ok...what is that? Never mind...I don't care...I just want to know that once I click on the module and it says "Success!"...that suddenly I will have in the Menu a "Programming" tab, and at least one or two menu entries that say "C++ is Here"...or "Puppy Basic" or "Python", fer goodness snakes, but after I do that, I see no Menu difference or change in the Desktop icons, or anything.

So I figure that maybe the programs are in the folders that appear from booting the devx module, but...geez...I just can't find anything that WORKS...in those folders...not even a console program, but maybe I gave up too soon, or was looking in the wrong spots, I don't know

So then I figure, well maybe I gotta load the devx module and then reboot in order to see the change in Menu, and so I go to the bootmanager program and click on "choose which sfs files to load at bootup" or something and it says to put the devx module in the /mnt/home folder, so I do and it says it can't find any new modules and doesn't load anything...I know I have the right version of devx for my version of puppy...but it jist don't werk!!

Honest to whoever, I am so frustrated...

I just want a nice clear Menu item that brings me to a nice GUI, and in it a nice text box that allows me to enter my not-that-nice code, and then has a nice "Run Program" and/or a "Compile" button or something like that...or...how do you do it?

Please pardon me dumping on you very patient, talented and nice people.

Thanks

Re: How do I use the devx module?

Posted: Sun 06 Dec 2009, 02:23
by ttuuxxx
scraginagmu wrote:Ok...I know I'm dumb...well, if my wife says it, it must be true...but how the heck do ya program in puppy?
I am told that the appropriate devx module, when installed, turns puppy into a "complete programming environment"
Ok...what is that? Never mind...I don't care...I just want to know that once I click on the module and it says "Success!"...that suddenly I will have in the Menu a "Programming" tab, and at least one or two menu entries that say "C++ is Here"...or "Puppy Basic" or "Python", fer goodness snakes, but after I do that, I see no Menu difference or change in the Desktop icons, or anything.

So I figure that maybe the programs are in the folders that appear from booting the devx module, but...geez...I just can't find anything that WORKS...in those folders...not even a console program, but maybe I gave up too soon, or was looking in the wrong spots, I don't know

So then I figure, well maybe I gotta load the devx module and then reboot in order to see the change in Menu, and so I go to the bootmanager program and click on "choose which sfs files to load at bootup" or something and it says to put the devx module in the /mnt/home folder, so I do and it says it can't find any new modules and doesn't load anything...I know I have the right version of devx for my version of puppy...but it jist don't werk!!

Honest to whoever, I am so frustrated...

I just want a nice clear Menu item that brings me to a nice GUI, and in it a nice text box that allows me to enter my not-that-nice code, and then has a nice "Run Program" and/or a "Compile" button or something like that...or...how do you do it?

Please pardon me dumping on you very patient, talented and nice people.

Thanks
usually I compile live
- I make a folder in root called devx
- I then click on the devx, it will open up
- I then hold the left button of mouse and highlite all the folders in the devx and drag them into the devx folder in root and select "copy"
- I then open a terminal in root and type
dir2pet /root/devx
at that point a gui will open and just hit the enter button like 5 times or so until you hit the end of the script.
then click the new pet and install it, it should take about 10min+ because it checks for missing deps.

another way is, if you have a frugal install, copy the devx.sfs to the same location as your frugal install and restart your pc, it will ask you on bootup if you want the devex loaded, click it over and reboot.
ttuuxxx

Posted: Sun 06 Dec 2009, 06:12
by Pizzasgood
The devx_xxx.sfs doesn't come with an IDE, so you won't see any changes in your menu entries. If you want to write a program, you just open your favorite text or code editor, write the program, and then compile it from the commandline. I believe Geany can be configured to let you do that from within it, but I've never bothered with that. If the code in question is C (or C++) you compile it with gcc (or g++). But if it's more than just a small project you'll want to create a Makefile so that you can compile it by just running 'make'.

I think somebody packaged the Anjuta IDE for Puppy.

Perl and Python scripts are run by just running them - from the commandline if they are a commandline program, or optionally by clicking if they're a gui program or a noninteractive commandline program.




As for actually installing the devx_xxx.sfs file, unless you use a full-hd install, follow ttuuxxx's second set of directions and stick it in /mnt/home/. If you have a full-hd install, you'll have to either follow his first set of instructions, or alternately (and much more quickly) do this:

Click the .sfs file
Open a terminal window inside the window it pops up (you can either press the back-quote key, or right-click -> window -> terminal here)
run this:

Code: Select all

cp -a * /
That will take a while, but nowhere near as long as ttuuxxx's method. The downsides are that you can't uninstall it this way, and you don't get a handy .pet package that you could archive to reuse at a later date. So if those sorts of things matter to you, go with his way. Especially, if you intend to compile software to package it and upload to the forum, you'll want to follow his method to create a .pet, so that you can boot with pfix=ram, install the .pet, and then compile. (By compiling in a clean environment it is easier to keep your dependencies straight.) But that doesn't matter if you just want to learn to program.


But if at all possible, use his second method. It's much easier, and it uses less disk space (the data stays compressed).



You can verify whether it worked like this:

Code: Select all

which gcc
That should return the path to gcc if it worked. Otherwise it doesn't output anything. Example of a working installation:

Code: Select all

# which gcc
/usr/bin/gcc

Posted: Sun 06 Dec 2009, 06:33
by Pizzasgood
but how the heck do ya program in puppy?
Let's say I have the following C program in the file main.c:

Code: Select all

#include<stdio.h>

int main(){
    printf("Puppy Linux FTW\n");
    return(0);
}
I can compile it like this:

Code: Select all

gcc -o main main.c
The executable will be named main, which is defined by the '-o main' option. (If you leave that out, it would be named a.out.) You run it like this:

Code: Select all

./main
Which should produce this output:

Code: Select all

# ./main 
Puppy Linux FTW

Posted: Sun 06 Dec 2009, 14:33
by sikpuppy
Since the default text editor (Geany) in Puppy is these things:

1) A GUI
2) A front end to compile programs (there is even a big COMPILE button).
3) A front end to build executables.

Among other things...

Then, sorry to be dense, but wasn't that what the OP wanted in a nutshell?

Posted: Mon 07 Dec 2009, 10:17
by dejan555
Pizzasgood wrote: Click the .sfs file
Open a terminal window inside the window it pops up (you can either press the back-quote key, or right-click -> window -> terminal here)
run this:

Code: Select all

cp -a * /
That will take a while, but nowhere near as long as ttuuxxx's method.
This usually ends up in system hanging during not being able to overwrite some symlinks that point to busybox, there are several such files, so I use this method in my sfs installer:

Code: Select all

yes n | cp -ai * /
There are several sfs installers you can use, mine is here, trio's installer also has some more usefull features.

Posted: Thu 10 Dec 2009, 03:33
by 8-bit
Maybe I am just dense or lazy.
Take your pick.
But I first installed the SFS installer to Puppy.
When I wanted to have access to the devx. sfs and kernel source sfs packages, I used the SFS installer.
That installer also make an entry for Puppy Package manager that can be used to uninstall the SFS.
I have never had any problems with using devx that way and that is on a frugal install.
No waiting, no reboot. Once it is installed, you have access to make, and gcc without rebooting and other than a few empty directories, the uninstall using Puppy Package manager seems to go just as smooth.

So, tell me why my way will not work?

Posted: Sun 13 Dec 2009, 06:17
by Pizzasgood
Well, as you can see, it does work. I've never said it won't. (What doesn't work is doing the frugal method in a full install.)

The most significant difference is probably that it uses more disk space. 278 MB vs 79 MB, in the case of devx_421.sfs.

Posted: Tue 15 Dec 2009, 06:09
by 8-bit
Pizzasgood,
I read your little message and it brought back school memories.
When I was going to school, I read that Leonardo D. would write his notes mirror image to protect them.
So I taught myself to write longhand mirror image cursive.
I even submitted a school paper written that way.
When you read it using a mirror, it was very legible.
Typed text is just not the same.

Posted: Mon 28 Dec 2009, 03:44
by bipll
BTW.

Code: Select all

# uname -a
Linux puppypc 2.6.31.5 #2 SMP Sun Dec 13 13:31:57 EST 2009 i686 GNU/Linux
# ls /mnt/home/devx_431.sfs
/mnt/home/devx_431.sfs
# gcc
bash: gcc: command not found
That's after the proposed reboot.
I'm feeling like something went wrong, but I can't tell what by just looking around...
Any ideas? :shock:

Posted: Mon 28 Dec 2009, 07:00
by dejan555
Are you running 4.3.1 frugal install?

Posted: Mon 28 Dec 2009, 08:40
by bipll
Humph, it appears, at 6 AM I somehow missed the BootManager stage... kewl...

Posted: Thu 13 Feb 2014, 01:14
by Les Kerf
sikpuppy wrote:Since the default text editor (Geany) in Puppy is these things:

1) A GUI
2) A front end to compile programs (there is even a big COMPILE button).
3) A front end to build executables.

Among other things...

Then, sorry to be dense, but wasn't that what the OP wanted in a nutshell?
Sorry to drag up such an old thread, but I have been searching the forum and reading about compiling for two weeks now, and this thread asks about the same question that I have.
I have downloaded and installed the appropriated devx.sfs for my Lucid 528.005. It brings up a GUI that is utterly meaningless to me, so I tried Geany, which does indeed have a big fat Compile button THAT IS GREYED OUT! I am trying to do the "Hello world" thing in C but have been thus far unable to figure out how to actually USE a compiler, or even recognize one when I see it.

A friend at work says he will help me to learn C, but am loathe to have him install a compiler on Windows for me, when I suppsedly can do this in Puppy.

Please help a clueless noob!
Les

Posted: Thu 13 Feb 2014, 06:53
by dejan555
If devx is properly loaded (type gcc or make in console to check if command exists) you can compile from terminal, change to directory where your hello.c program is and type

Code: Select all

gcc hello.c -o hello

Posted: Thu 13 Feb 2014, 13:33
by Les Kerf
dejan555 wrote:If devx is properly loaded (type gcc or make in console to check if command exists) you can compile from terminal, change to directory where your hello.c program is and type

Code: Select all

gcc hello.c -o hello
Ok, this is the part I have been missing.

How do I go about creating this hello.c program, and where should I put it?

Do I create a text file using Geany? Then save it to /root?

I do believe the devx file is properly loaded.

I know this stuff seems obvious to the pros, but I have never done much of this before. I did do the bash tutorial by BruceB, but this is somewhat different.

Thanks for the help,
Les

Posted: Thu 13 Feb 2014, 13:58
by dejan555
Les Kerf wrote: I am trying to do the "Hello world" thing in C but have been thus far unable to figure out how to actually USE a compiler, or even recognize one when I see it.
I thought you were already writing code in geany? You can name it anynthing you want, I used hello.c as example and you can save it to /root or anywhere else you want, but then you need to navigate to directory where you saved it in console (when you click console icon on desktop it starts in /root)

You should learn some basic linux commands and be somewhat comfortable with console.

Posted: Sat 15 Feb 2014, 12:08
by Les Kerf
Sorry for the double post.

Posted: Sat 15 Feb 2014, 12:27
by Les Kerf
SUCCESS! One small step for mankind, one giant step for Les. :D
dejan555 wrote: I thought you were already writing code in geany?

Ummm... not really. I said that I tried.
dejan555 wrote: You should learn some basic linux commands and be somewhat comfortable with console.
I did complete the tutorial in this forum by BruceB about bash scripting, which was all done in console. Just a beginning, but now that you have given me the key I can start the engine and commence learning how to drive the car.

Thanks for the help,
Les

Posted: Sat 15 Feb 2014, 18:23
by gcmartin
Please, no one get offended with this, but, I can see the problem here.

What we have is a classic one!
A user who has one mission. And a group of knowledge workers who only see it thru their prism.

Let me offer an idea (and it is an idea ONLY)
Why not take one (of maybe each of these pathways presented) and post a soup to nuts for anyone who is NOT PUPPY LInux knowledgible and NOT geany knowledgible to setup the DEVX successfully, go to Geany, create a program (by sharing that if the program or script is done a "particular" way, it will cause the screen to format to allow a simple compile (with the Compile button lit).

This is what I think the newbies are asking.

This way, the complexity is reduced significantly. Further in newbie use, we just might gleen further ideas to even simplify its use, as they report back to this thread their sucesses and suggestions.

So,
How to insert the DEVX into a system, then scenario about Geany as an aid in compiling, all in a single post, could go a long way to educating a user to be a contributer in Puppyland. We do have some partial pieces already here in this thread. Adding either to those post or creating a newer one might be just the proper pill.

In essence, this equates to a tutorial (maybe with screen pops) that can be lifted and place for every new to Puppy user to see.

This may already be present somewhere in Puppy forum. ... someone's webpage somewhere....Maybe a title of "Introduction to Setting Up Puppy Linux for simple programming with Geany Editor"

Hope this helps everyone.

Posted: Sat 15 Feb 2014, 19:15
by tlchost
gcmartin wrote: Let me offer an idea (and it is an idea ONLY)
Why not take one (of maybe each of these pathways presented) and post a soup to nuts for anyone who is NOT PUPPY LInux knowledgible and NOT geany knowledgible to setup the DEVX successfully, go to Geany, create a program (by sharing that if the program or script is done a "particular" way, it will cause the screen to format to allow a simple compile (with the Compile button lit).
Actions speak much louder than words....perhaps you could start the ball rolling with the first soup to nuts ?