Cd to Directory

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Cd to Directory

Steve Starr
I am useing Gambas 1.0.11 and i am trying to:

SHELL "cd /root/Projects/PkgManager/build/" FOR READ
SHELL "./wolfpkg"

Or

SHELL "cd build" FOR READ
SHELL "./wolfpkg"

But neather of these code snipets work i am not able to cd to another
dir as root or any ohter user?

Thanks :)


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Cd to Directory

Pablo Vera
You don't need to "cd", you simply run it like this:

   SHELL "/root/Projects/PkgManager/build/wolfpkg"

or

   SHELL "/root/Projects/PkgManager/build/wolfpkg" FOR READ

depending on what the "wolfpkg" executable does.

Saludos,
Pablo Vera

Steve Starr wrote:

> I am useing Gambas 1.0.11 and i am trying to:
>
> SHELL "cd /root/Projects/PkgManager/build/" FOR READ
> SHELL "./wolfpkg"
>
> Or
>
> SHELL "cd build" FOR READ
> SHELL "./wolfpkg"
>
> But neather of these code snipets work i am not able to cd to another
> dir as root or any ohter user?
>
> Thanks :)
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Cd to Directory

Rob Kudla
In reply to this post by Steve Starr
On Mon September 12 2005 18:55, Steve Starr wrote:
> SHELL "cd build" FOR READ
> SHELL "./wolfpkg"
> But neather of these code snipets work i am not able to cd to
> another dir as root or any ohter user?

The SHELL command does just what it says.... starts a shell and
executes your command in it.  So you're not changing the directory
for your program, you're changing it for the shell.... when then
immediately exits.

Maybe try this?

SHELL "cd build && ./wolfpkg" FOR READ

Rob



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Cd to Directory

Rob Kudla
In reply to this post by Pablo Vera
On Mon September 12 2005 19:14, Pablo Vera wrote:
> You don't need to "cd", you simply run it like this:
>    SHELL "/root/Projects/PkgManager/build/wolfpkg"
> or
>    SHELL "/root/Projects/PkgManager/build/wolfpkg" FOR READ
> depending on what the "wolfpkg" executable does.

Well, if the "wolfpkg" executable reads files from relative pathnames,
it might very well be need to run from that directory.  To this day I
can't figure out how to run Azureus without CD'ing to its directory,
for example.

Rob



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Creating excutibles in version 2

Scott-2-2
Hi,

    I'm new to Gambas, I use to program simple programs in QBasic
before.  I read through a few tutorials and I am very pleased with
Gambas so far, except for one thing.

    Is version 2 able to create executables yet or am I doing something
horribly wrong?  I have tried several times using very simply programs.  
With the Project/Make executable it looks like it saves a executable
file, but one is never saved.  I have done a complete search of my file
system using find and can't find any files it creates.  With the
Project/Make Installation Package I go through the simple wizard that
ask you to put the description and select the categories and the
distribution.  I have tried all four on there and come up with the same
error "The package build has failed"

    If anybody can help me, I would greatly appreciate it.  This is the
only thing stopping me from trying to design some decent programs.

--
Your friend,
Scott

http://www.bmts.com



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Rob Kudla
On Mon September 12 2005 17:46, Scott wrote:
>     Is version 2 able to create executables yet or am I doing
> something horribly wrong?  I have tried several times using very
> simply programs. With the Project/Make executable it looks like it
> saves a executable file, but one is never saved.  I have done a

The Gambas IDE itself is a Gambas executable, in versions 1 and 2.  If
Project/Make Executable isn't making an executable, there must be a
problem with the Gambas archiver (/usr/bin/gba) or maybe you somehow
don't have write permission to the project directory, which wouldn't
make a lot of sense.

What distribution are you using?  Did you get Gambas through official
packages, unofficial packages, or by building from source?

Rob



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Scott-2-2
Rob Kudla wrote:
On Mon September 12 2005 17:46, Scott wrote:
  
    Is version 2 able to create executables yet or am I doing
something horribly wrong?  I have tried several times using very
simply programs. With the Project/Make executable it looks like it
saves a executable file, but one is never saved.  I have done a
    

If Project/Make Executable isn't making an executable, there must be a 
problem with the Gambas archiver (/usr/bin/gba)
I can't seem to find the gba, that could be the problem.  How do I get it?  It does not seem to be part of a package.
What distribution are you using?
Kubuntu v5.04, actually I originally installed Ubuntu v5.04 from disk then added Kubuntu.
Did you get Gambas through official 
packages
I got it from a repository through synaptic.  It is version 1.9.20 from linex.org.  I was thinking about getting the version one that comes in the standard repository if version two does not work, but I was hoping to learn and get use to version two instead of learning version one then re-learning version 2.
Rob
  
Thank you for the help.
-- 
Your friend,
Scott

http://www.bmts.com
Reply | Threaded
Open this post in threaded view
|

Re: Cd to Directory

Steve Starr
In reply to this post by Rob Kudla
This worked.
SHELL "cd build && ./wolfpkg" FOR READ

What i was trying to do was use the

IF Dialog.OpenFile() THEN RETURN
  TextBox1.Text = Dialog.Path

to load a compressed file then load wolfpkg in to textarea

####this is the wolfpkg script
#!/bin/bash
# Maintainer: Steve Starr <[hidden email]>

name=sqlite
version=3.2.5
release=1

pkg=/opt/build

    rm -r $pkg
    mkdir $pkg
    wget $source
   
    tar -xvzf $name-$version.tar.gz

    cd $name-$version
    ./configure --prefix=/usr
    make
    make prefix=$pkg/usr install

the compressed package and wolfpkg script are then copyed to the build dir
and the wolfpkg script was ran but when i was adding a
source=(http://www.comtuxaps.com/packages/source/$name/$name-$version.tar.gz)
into the wolfpkg script the compressed file was being downloaded to my
project dir instead of the build dir were i excuted the wolfpkg script
and i would end up building the package in the project dir instead of
the build dir.

I am working on a package builder for my personal linux distro.

Thanks rob for the solution :)

On 9/13/05, Rob Kudla <[hidden email]> wrote:

> On Mon September 12 2005 19:14, Pablo Vera wrote:
> > You don't need to "cd", you simply run it like this:
> >    SHELL "/root/Projects/PkgManager/build/wolfpkg"
> > or
> >    SHELL "/root/Projects/PkgManager/build/wolfpkg" FOR READ
> > depending on what the "wolfpkg" executable does.
>
> Well, if the "wolfpkg" executable reads files from relative pathnames,
> it might very well be need to run from that directory.  To this day I
> can't figure out how to run Azureus without CD'ing to its directory,
> for example.
>
> Rob
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Rob Kudla
In reply to this post by Scott-2-2
On Mon September 12 2005 19:56, Scott wrote:
> I can't seem to find the gba, that could be the problem.  How do I
> get it?  It does not seem to be part of a package.
> I got it from a repository through synaptic.  It is version 1.9.20

Oh, OK.  It would be called /usr/bin/gba2 under 1.9.x.  Check that?

Rob



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Re: Cd to Directory

Rolf Schmidt-3
In reply to this post by Steve Starr
Hi Steve

[ ]

> ####this is the wolfpkg script
> #!/bin/bash
> # Maintainer: Steve Starr <[hidden email]>
>
> name=sqlite
> version=3.2.5
> release=1
>
> pkg=/opt/build
>
>     rm -r $pkg
>     mkdir $pkg
Shouldn't you change into your $pkg directory befor you download and unpack?
>     wget $source
>
>     tar -xvzf $name-$version.tar.gz
>
>     cd $name-$version
>     ./configure --prefix=/usr
>     make
>     make prefix=$pkg/usr install
[ ]

Greetings
Rolf

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Scott-2-2
In reply to this post by Rob Kudla
Rob Kudla wrote:
Oh, OK.  It would be called /usr/bin/gba2 under 1.9.x.  Check that?
  
Ok, I did that and I found the gba2 in the /usr/bin like it should.
-- 
Your friend,
Scott

http://www.bmts.com
Reply | Threaded
Open this post in threaded view
|

Re: Cd to Directory

Benoît Minisini
In reply to this post by Pablo Vera
On Tuesday 13 September 2005 01:14, Pablo Vera wrote:

> You don't need to "cd", you simply run it like this:
>
>    SHELL "/root/Projects/PkgManager/build/wolfpkg"
>
> or
>
>    SHELL "/root/Projects/PkgManager/build/wolfpkg" FOR READ
>
> depending on what the "wolfpkg" executable does.
>
> Saludos,
> Pablo Vera
>
> Steve Starr wrote:
> > I am useing Gambas 1.0.11 and i am trying to:
> >
> > SHELL "cd /root/Projects/PkgManager/build/" FOR READ
> > SHELL "./wolfpkg"
> >
> > Or
> >
> > SHELL "cd build" FOR READ
> > SHELL "./wolfpkg"
> >
> > But neather of these code snipets work i am not able to cd to another
> > dir as root or any ohter user?
> >
> > Thanks :)
> >

If you really needs to 'cd', you can use:

SHELL "(cd cd /root/Projects/PkgManager/build/; ./wolfpkg)" FOR READ

Regards,

--
Benoit Minisini
mailto:[hidden email]


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Rob Kudla
In reply to this post by Scott-2-2
On Tue September 13 2005 05:16, Scott wrote:
> Rob Kudla wrote:
> > Oh, OK.  It would be called /usr/bin/gba2 under 1.9.x.  Check
> > that?
>
> Ok, I did that and I found the gba2 in the /usr/bin like it should.

If you go to a shell prompt and cd to your project directory and type
"gba2", does it make an executable?  If not, does it throw an error
and if so, what error?

Thanks...

Rob



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Scott-2-2
Rob Kudla wrote:
> If you go to a shell prompt and cd to your project directory and type
> "gba2", does it make an executable?  If not, does it throw an error
> and if so, what error?
>  
    It does neither.  It just goes to the next line and looks like it
did something, but no new files have been produced.  I have attached a
screen shot if this list allows them.

--
Your friend,
Scott

http://www.bmts.com


snapshot2.png (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Rob Kudla
On Tue September 13 2005 08:58, Scott wrote:
>     It does neither.  It just goes to the next line and looks like
> it did something, but no new files have been produced.  I have
> attached a screen shot if this list allows them.

It came through, thanks.  Could you try the following two things while
sitting in your project directory?

1. "gba2 -v"

2. "strace gba2"

The second one will produce a lot of output, so you may need to use
the "script" command to capture that output to a file.  

Rob



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Scott-2-2
Rob Kudla wrote:

> O
> It came through, thanks.  Could you try the following two things while
> sitting in your project directory?
>
> 1. "gba2 -v"
>
> 2. "strace gba2"
>
> The second one will produce a lot of output, so you may need to use
> the "script" command to capture that output to a file.  
>  
I did that and attached the script.

--
Your friend,
Scott

http://www.bmts.com


typescript (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Rob Kudla
On Tue September 13 2005 09:52, Scott wrote:
> > 1. "gba2 -v"
> > 2. "strace gba2"
> I did that and attached the script.

Oh, I just went back and looked at your screenshot.  The executable is
being written... it's named "Note.gambas".  This is a Gambas 2
behavior, if I remember right... by default, the executable has
".gambas" appended to its name.  You can rename it to whatever you
want before distributing it.  What happens if you run "./Note.gambas"
while sitting in that directory?

Rob



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Scott-2-2
Rob Kudla wrote:
> Oh, I just went back and looked at your screenshot.  The executable is
> being written... it's named "Note.gambas".  This is a Gambas 2
> behavior, if I remember right... by default, the executable has
> ".gambas" appended to its name.  You can rename it to whatever you
> want before distributing it.  What happens if you run "./Note.gambas"
> while sitting in that directory?
>  
    It works :) I thought about that before and when I clicked on the
file in Konqueror it just asked me which program to run it from, so I
thought it was one of the files created for Gambas.

    This is good, at least I can make some sort of executable to give
out, thank you very much, but unless I am wrong the Gambas program is
required as a dependency in the same was Java is required for jre
files.  I still would like to be able to create the packages so there
will be less dependencies.

--
Your friend,
Scott

http://www.bmts.com



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Rob Kudla
On Tue September 13 2005 10:40, Scott wrote:
>     It works :) I thought about that before and when I clicked on
> the file in Konqueror it just asked me which program to run it
> from, so I thought it was one of the files created for Gambas.

Yes, Konqueror sees "#!" at the beginning of the file and prompts you
to run it instead of just obeying the "#!".  I don't know why it does
that, but making the interpreter into a library and putting a real
executable stub into the Gambas executables would fix it.

>     This is good, at least I can make some sort of executable to
> give out, thank you very much, but unless I am wrong the Gambas
> program is required as a dependency in the same was Java is
> required for jre files.  I still would like to be able to create
> the packages so there will be less dependencies.

Yeah, there's no way to make completely stand-alone executables in
Gambas yet, and I imagine it'll be some time before it's possible.  
When it is possible, the executable will be huge, since it will need
to include the interpreter and all the components the program uses...
basically, the size of a VB program's setup.exe.  I wrote a tiny
program in Tcl and used "freewrap" to make a standalone executable of
it.... it barely fit on a floppy disk, and Tcl is nowhere near as
complex as Gambas.

Rob



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Creating excutibles in version 2

Scott-2-2
Rob Kudla wrote:
to run it instead of just obeying the "#!".  I don't know why it does 
that, but making the interpreter into a library and putting a real 
executable stub into the Gambas executables would fix it.
  
Ok, thanks.
Yeah, there's no way to make completely stand-alone executables in 
Gambas yet
Oh, I did not mean complete stand alone executables.  I meant making a RPM or DEB package using the project/Make installation package...  It does not seem to work and gives me an error message.
-- 
Your friend,
Scott

http://www.bmts.com
12