1. Eugtk 2 s paths

Hi

Downloaded and installed eugtk 2 august 22, and installed it on my newly
upgraded (SuSE 7.1 to 9.1) systems. Previous eugtks, 1 and 2 had worked great
but hadn't updated it for a while.

Tried to run the demos, and first there was no path to the wrappers. gtk2
includes put into ~/euphoria/include/gtk2.

No problem, just update the demos before running them, so in front of
wrapper.gtk, I put gtk2/, eg include gtk2/wrapper.e.

Then got no paths to the other included gtk includes when running a demo.
Further investigation turns out that all the includes include files without
using the path, ie

wrapper.e has the line
include controls.gtk

Ok, I thought, there is no path to the includes in the include. I had to
change them all. So I chucked this together.

include file.e
include wildcard.e

sequence x,file, p1, p2
integer fp, pos
object line

file = {}
p1 = {}
p2 = {}
pos = 0

x = dir(current_dir())

for i = 1 to length(x) do
    file = {}
if  x[i][D_NAME][1] != '.' and compare("convert.exu", x[i][D_NAME]) != 0
    then
	
	puts(1, "Scanning " & x[i][D_NAME] & "\n")
	
	--read in file
	fp = open(x[i][D_NAME], "r")
	while 1 do
	    line = gets(fp)
	    if atom(line) then exit end if
	    file = append(file, line)
	end while
	close(fp)
	
	--check file for gtk matches
	for j = 1 to length(file)  do
	    if wildcard_match("*ude *.gtk*", file[j]) = 1 then
		puts(1, "  Match found - " & file[j])
		pos = match("ude ", file[j])
		p1 = file[j][1..pos+3]
		p2 = file[j][pos+4..length(file[j])]
		file[j] = p1 & "gtk2/" & p2
		puts(1, "    Replaced with - " & file[j])
	    end if
	end for
	
	--check file for dlg matches
	for j = 1 to length(file)  do
	    if wildcard_match("*ude *.dlg*", file[j]) = 1 then
		puts(1, "  Match found - " & file[j])
		pos = match("ude ", file[j])
		p1 = file[j][1..pos+3]
		p2 = file[j][pos+4..length(file[j])]
		file[j] = p1 & "gtk2/" & p2
		puts(1, "    Replaced with - " & file[j])
	    end if
	end for
	
	
	--write out file
	fp = open(x[i][D_NAME], "w")
	for k = 1 to length(file)  do
	    puts(fp, file[k])
	end for
	close(fp)
    
    end if

end for


this adds gtk2/ to all the gtk and dlg includes. Run it in the gtk2 include
directory, but only run it once, make sure you have your back up archive to
hand.

The demos run fine now, providing you add gtk2/wrapper. to that first vital
include in the demo.

Now, I'm just curious. Getting something to work is half the fun for me,
but am I doing something wrong. You obviously made a conscious change here
Irv, and should I just be dumping all the includes into the base include
directory?
Is this a change made to allow win32 compatability? Or should I have changed the
path somewhere along the line? If so how?

Anyway, its working now, and as long as you remain consistent with naming
and style, I'll be able to update as I go.

Good work BTW, nice, smooth, pretty and fast. Oh, and your website was down
again earlier today.

Chris




http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/

new topic     » topic index » view message » categorize

2. Re: Eugtk 2 s paths

Chris Burch wrote:
> 
> Hi
> 
> Downloaded and installed eugtk 2 august 22, and installed it on my newly
> upgraded (SuSE 7.1 to 9.1) systems. Previous eugtks, 1 and 2 had worked great
> but hadn't updated it for a while.
> 
> Tried to run the demos, and first there was no path to the wrappers. gtk2
> includes put into ~/euphoria/include/gtk2.
> 
> No problem, just update the demos before running them, so in front of
> wrapper.gtk, I put gtk2/, eg include gtk2/wrapper.e.

<snip>

> Now, I'm just curious. Getting something to work is half the fun for me,
> but am I doing something wrong. You obviously made a conscious change here
> Irv, and should I just be dumping all the includes into the base include
> directory?
> Is this a change made to allow win32 compatability? Or should I have changed
> the
> path somewhere along the line? If so how?

Actually, I was urged to remove the gtk2/ prefix by several people, 
who showed me that declaring EUINC=$HOME/euphoria/include/gtk2
in .bash_profile was a better way.
 
So all the GTK library files go into $HOME/euphoria/include/gtk2, 
which keeps from cluttering up the base include directory.

> Anyway, its working now, and as long as you remain consistent with naming
> and style, I'll be able to update as I go.

> Good work BTW, nice, smooth, pretty and fast. Oh, and your website was down
> again earlier today.

Thanks for reporting that, my ISP is in the middle of a change, 
the new address seems to be: http://databrook.com/users/irvm/
but who knows? I'll have to wait until they get things sorted out.

Irv

new topic     » goto parent     » topic index » view message » categorize

3. Re: Eugtk 2 s paths

>From: irv mullins <guest at RapidEuphoria.com>
>Reply-To: EUforum at topica.com
>To: EUforum at topica.com
>Subject: Re: Eugtk 2 s paths
>Date: Wed, 22 Sep 2004 14:46:33 -0700
>
>posted by: irv mullins <irvm at ellijay.com>
>
>Actually, I was urged to remove the gtk2/ prefix by several people,
>who showed me that declaring EUINC=$HOME/euphoria/include/gtk2
>in .bash_profile was a better way.
>
>So all the GTK library files go into $HOME/euphoria/include/gtk2,
>which keeps from cluttering up the base include directory.
>

    Why not change the include lines to use the gtk2/ prefix? You don't eve=
n=20
need to do any work; the program to change them has been written already. I=
=20
find this would be better for two reasons: 1) You don't need to clutter you=
r=20
include folder, just add in one extra folder instead of several files; and=
=20
2) you don't need to change your EUINC, no rebooting/logging in again/etc.=
=20
This also follows the GTK C headers convention in which all files are in a=
=20
GTK folder in the include folder (though I don't know if you use the same=
=20
filenames anyway).

>Irv
>

~[ WingZone ]~
http://wingzone.tripod.com/

s=20
to offer.=20
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=10=
34&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines=20
  Start enjoying all the benefits of MSN=AE Premium right now and get the=
=20
first two months FREE*.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Eugtk 2 s paths

Elliott S. de Andrade wrote:
> 
>     Why not change the include lines to use the gtk2/ prefix? You don't eve=
> n=20
> need to do any work; the program to change them has been written already. I=
> =20
> find this would be better for two reasons: 1) You don't need to clutter you=
> r=20
> include folder, just add in one extra folder instead of several files; and=
> =20
> 2) you don't need to change your EUINC, no rebooting/logging in again/etc.=
> =20
> This also follows the GTK C headers convention in which all files are in a=
> =20
> GTK folder in the include folder (though I don't know if you use the same=
> =20
> filenames anyway).

I think the reason people requested removal of the hard-coded prefix 
was because of problems with Windows. 

Irv

new topic     » goto parent     » topic index » view message » categorize

5. Re: Eugtk 2 s paths

>From: irv mullins <guest at RapidEuphoria.com>
>Reply-To: EUforum at topica.com
>To: EUforum at topica.com
>Subject: Re: Eugtk 2 s paths
>Date: Wed, 22 Sep 2004 15:43:00 -0700
>
>posted by: irv mullins <irvm at ellijay.com>
>
>Elliott S. de Andrade wrote:
>
>I think the reason people requested removal of the hard-coded prefix
>was because of problems with Windows.
>

  I don't see what the problem would be. Anyone care to explain? Perhaps it=
=20
is because Rob said the
/ working was just an anomaly of Windows. The interpreter would think file.=
e=20
and me/file.e were
different. I have nothing wrong with this, but Rob said it was only because=
=20
of the Windows "bug"
that me/file.e was opened. I know if he changed it, all he was going to do=
=20
was make the interpreter
think file.e and me/file.e were the same (but i don't think some well-verse=
d=20
people were approve).
So, maybe I brought this point up for nothing, or maybe I've explained it s=
o=20
well that those people
who didn't want the prefix won't mind it anymore, who knows...

>Irv
>

~[ WingZone ]~
http://wingzone.tripod.com/

=20
get-togethers.=20
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=10=
34&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines=20
  Start enjoying all the benefits of MSN=AE Premium right now and get the=
=20
first two months FREE*.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Eugtk 2 s paths

>   I don't see what the problem would be. Anyone care to explain?
>   Perhaps it,s because Rob said the / working was just an anomaly of
>   Windows...

fyi, the Win Api docs state, ( in Filename Conventions ):
Use the backslash (\), the forward slash (/), or both to separate components in
a path. No other character is acceptable
as a path separator.

In other words, in Euphoria-speak:
  ".\\SubFolder\\SubsubFolder\\" , and
  "./SubFolder/SubsubFolder/" , will always be the same, in Windows.

new topic     » goto parent     » topic index » view message » categorize

7. Re: Eugtk 2 s paths

Elliott S. de Andrade wrote:
> 
> >posted by: irv mullins <irvm at ellijay.com>
> >
> >I think the reason people requested removal of the hard-coded prefix
> >was because of problems with Windows.
> >
> 
>   I don't see what the problem would be. Anyone care to explain? 
> Perhaps it is because Rob said the / working was just an anomaly of 
> Windows. The interpreter would think file.e and me/file.e were
> different. I have nothing wrong with this, but Rob said it was only 
> because of the Windows "bug" that me/file.e was opened. I know if he 
> changed it, all he was going to do was make the interpreter think 
> file.e and me/file.e were the same (but i don't think some well-versed
> people were approve).  So, maybe I brought this point up for nothing, 
> or maybe I've explained it so well that those people who didn't want 
> the prefix won't mind it anymore, who knows...

Those Windows issues aside, I prefer to update my EUINC to add paths 
than to have to hard code paths.  This allows more flexibility in 
general.  I mostly develop in a Win2K environment, so mostly I don't 
have to log out before those changes take effect.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

8. Re: Eugtk 2 s paths

Hi

I've just run the convert program (posted yesterday) on the gtk2 includes
on my windows machine - the demos now work fine, provided you add gtk2/wrapper.e
as the first include in the demo program.

I think the point here is that '/' works in windows and linux, whereas '\\'
will only work in windows. And if you're writing on windows box for a linux
one, you'll have to use '/' anyway.

This also leaves the point of the euinc variable moot - ie it doesn't matter
whether its present or not, the way I've done it the programs will work
whether you have this set or not. Also programs written for GTK2 will work
on any machine whether the euinc variable is set or not, if you make that
first include gtk2/wrapper.e (after all, correct me if I'm wrong, the search
path order for includes is current dir / include folder / euinc folder).

Anyway, I don't mind whether you change it or not, just don't change the style
as the convert program makes certain assumptions. (dangerous, I know, thats
what backups are for!)


http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/

ps - I've deliberately left a capitalisation, can anyone spot it, and a 
grammatical error too - lol)

Chris

new topic     » goto parent     » topic index » view message » categorize

9. Re: Eugtk 2 s paths

Just a clarification, for Irv, and anyone...
... slash (/), or backslash (\), in Windows, OK,
*but*,   !!
*neither* of these will work if you're trying to 'drag-and-drop' your .exw onto
exw.exe, or it's shortcut.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Eugtk 2 s paths

>From: Wolf <wolfritz at KING.IGS.NET>
>Reply-To: EUforum at topica.com
>To: EUforum at topica.com
>Subject: Re: Eugtk 2 s paths
>Date: Thu, 23 Sep 2004 09:51:13 -0400
>
>Just a clarification, for Irv, and anyone...
>... slash (/), or backslash (\), in Windows, OK,
>*but*,   !!
>*neither* of these will work if you're trying to 'drag-and-drop' your .exw=
=20
>onto
>exw.exe, or it's shortcut.
>

  I don't understand. What's wrong with drag-on-dropping it? It seems to=
=20
work fine for me.

~[ WingZone ]~
http://wingzone.tripod.com/

=20
get-togethers.=20
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=10=
34&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines=20
  Start enjoying all the benefits of MSN=AE Premium right now and get the=
=20
first two months FREE*.

new topic     » goto parent     » topic index » view message » categorize

11. Re: Eugtk 2 s paths

>From: Matt Lewis <guest at RapidEuphoria.com>
>Reply-To: EUforum at topica.com
>To: EUforum at topica.com
>Subject: Re: Eugtk 2 s paths
>Date: Thu, 23 Sep 2004 03:49:26 -0700
>
>posted by: Matt Lewis <matthewwalkerlewis at yahoo.com>
>
>Elliott S. de Andrade wrote:
> >
> > >posted by: irv mullins <irvm at ellijay.com>
> > >
> > >I think the reason people requested removal of the hard-coded prefix
> > >was because of problems with Windows.
> > >
> >
> >   I don't see what the problem would be. Anyone care to explain?
> > Perhaps it is because Rob said the / working was just an anomaly of
> > Windows. The interpreter would think file.e and me/file.e were
> > different. I have nothing wrong with this, but Rob said it was only
> > because of the Windows "bug" that me/file.e was opened. I know if he
> > changed it, all he was going to do was make the interpreter think
> > file.e and me/file.e were the same (but i don't think some well-versed
> > people were approve).  So, maybe I brought this point up for nothing,
> > or maybe I've explained it so well that those people who didn't want
> > the prefix won't mind it anymore, who knows...
>
>Those Windows issues aside, I prefer to update my EUINC to add paths
>than to have to hard code paths.  This allows more flexibility in
>general.  I mostly develop in a Win2K environment, so mostly I don't
>have to log out before those changes take effect.
>

   The EUINC thing also affects Linux. You need to login again for it to=
=20
take effect. I use XP, so I know what you mean about not needing to reboot.=
=20
But, as Chris said, it makes it easier to distribute your program with GTK=
=20
that way. You don't need the user to change their EUINC. Everything can be=
=20
in one folder, but the 135 GTK files don't need to be in the root clutterin=
g=20
it up. This doesn't just pertain to zipped up programs (like for the
archive, since most people haven't included GTK, AFAIK), but also helps if=
=20
you're transporting your work to another computer. No setup is required. Yo=
u=20
can just unzip, or copy, and run.

>Matt Lewis
>

PS. Can't the forum do auto-wrap, or, something like that? I tried adding=
=20
manual new-lines at the end of the richedit window thing, but that didn't=
=20
work. I then copied a different message to an editor so I could add newline=
s=20
at 78 characters. Then the "=20"s went away. I don't suppose there's
anything that could be done to fix this? I don't like having to copy my
message to an editor and then manually add new-lines every time I want to=
=20
send a message.

~[ WingZone ]~
http://wingzone.tripod.com/

  Start enjoying all the benefits of MSN=AE Premium right now and get the=
=20
first two months FREE*.

new topic     » goto parent     » topic index » view message » categorize

12. Re: Eugtk 2 s paths

On Thu, 23 Sep 2004 19:35:46 -0400, Elliott Sales de Andrade
<quantum_analyst at hotmail.com> wrote:

>Everything can be
>in one folder, but the 135 GTK files don't need to be in the root cluttering
>it up.
If you say

	include gtk/gtk.eu

then subsequent includes should look in that folder first.
I think this would be a great improvement to Eu.
It is not difficult, I've done this in posetf, works a treat. If I get
my grubby paws on the Eu-in-Eu version of 2.5, this will be the first
thing I change.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

13. Re: Eugtk 2 s paths

On Fri, 24 Sep 2004 02:04:18 +0100, Pete Lomax
<petelomax at blueyonder.co.uk> wrote:
> On Thu, 23 Sep 2004 19:35:46 -0400, Elliott Sales de Andrade
> <quantum_analyst at hotmail.com> wrote:
> 
> >Everything can be
> >in one folder, but the 135 GTK files don't need to be in the root cluttering
> >it up.
> If you say
> 
>         include gtk/gtk.eu
> 
> then subsequent includes should look in that folder first.

Which subsequent includes?
Inside gtk.eu, yes, they should look in the gtk folder first.
Once it gets out of that file, the next include call should go back to
how it was before.


-- 
MrTrick

new topic     » goto parent     » topic index » view message » categorize

14. Re: Eugtk 2 s paths

Elliott S. de Andrade wrote:
> 
> 
>    The EUINC thing also affects Linux. You need to login again for it to
> take effect. I use XP, so I know what you mean about not needing to 
> reboot. But, as Chris said, it makes it easier to distribute your 
> program with GTK that way. You don't need the user to change their 
> EUINC. Everything can be in one folder, but the 135 GTK files don't 
> need to be in the root clutterin it up. This doesn't just pertain to 
> zipped up programs (like for the archive, since most people haven't 
> included GTK, AFAIK), but also helps if you're transporting your work to 
> another computer. No setup is required. You can just unzip, or copy, 
> and run.

Yes, the second place I develop is a Linux box.  However, I still prefer
to leave path names out of the include statement.  As far as distribution
goes, my feeling is that people can either properly install a library so
that it's in their EUINC path, or they can dump any required libs into
the same directory.  That's what I like to do.   In general, I try to 
avoid hard coding things like paths.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

15. Re: Eugtk 2 s paths

Pete Lomax wrote:

> On Thu, 23 Sep 2004 19:35:46 -0400, Elliott Sales de Andrade
> <quantum_analyst at hotmail.com> wrote:
>
>> Everything can be
>> in one folder, but the 135 GTK files don't need to be in the root cluttering
>> it up.
> If you say
>
> 	include gtk/gtk.eu
>
> then subsequent includes should look in that folder first.
> I think this would be a great improvement to Eu.

Me too! All include paths should be interpreted relative to the path of
the file, that contains that include statement. This is much more
flexible and intuitive than the way it works currently.
It has been talked about this point before on this list, but before
it falls into oblivion, it's good to mention it again. :o)

> It is not difficult, I've done this in posetf, works a treat. If I get
> my grubby paws on the Eu-in-Eu version of 2.5, this will be the first
> thing I change.

Regards,
   Juergen

-- 
A: Because it considerably reduces the readability of the text.
Q: Why?
A: Top posting.
Q: What is annoying in e-mail and news?

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu