SEAL Forum Index SEAL
The SEAL Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Technology Preview 3
Goto page 1, 2  Next
 
Post new topic   Reply to topic    SEAL Forum Index -> Seal 3.0 Development
View previous topic :: View next topic  
Author Message
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Sun Jul 28, 2002 5:51 pm    Post subject: Technology Preview 3 Reply with quote

This should have been earlier, but made some cool additions ::

ChangeLog 2.65
-----------------------------
+New Linked List Code sfcList
+Use dmalloc for memleaks
+Compiles under DJGPP (!!)
+New registry format (!!) No more binary woes.
+A small skin sample
+Fixed relative cood system bugs
+Fixed mouse focus bugs
+Fixed SModule support for DOS.
+Registers exit functions properly
+Changed widget system from 2 level inheritance to multilevel.
+First screenshot
+Fixed serious bugs in the EventLoop.
+Font API, now loads TTF fonts.
+Basic Virtual FileSystem support. Broken.
+New widgets: PushButton, CheckBox, ListBox
+Fixed tons of memory leaks. Pushed sfcList to limits.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Sun Jul 28, 2002 6:02 pm    Post subject: Reply with quote

I spent a lot of time on sfcList, it should be bug free and with no memory leaks. Almost all the lists depend on this. So this was important.

The widgets are know relatively place wrt parent, so you have
x->set_xywh( 20,20, w,h) and its at an offset of 20,20 from 0,0 of the parent. In effect, all toplevel windows are at an offset of x,y from 0,0 of the desktop.

The registry is now an indented INI file. Cool. There were some bugs with it. I have fixed what I could, it works ok. And its not a performance hog (gprof says so). I have to send the fixes to the original author.

The skin file is also the an indented INI file. See skin.h It s WIP, it only strectes the bitmap, will have to make it work like the old seal.

On my system DJGPP (GCC 3.1) compiles everything neatly. It stops at DXLLOAD.CC. It need a lot of work to port to GCC 3.x, will do that later. You ppl can do it too.

All memory with lists is now taken care by sfcList, other leaks have to be fixed. I will compile with a memory profiler next time.

Next, I need to write some small app (calc or text editor) for just demo sake.

I think there are some bugs with the Seal 2.0 font system .See the notes in the file.

OK, this was posted at 5am, and my download of bombay dreams is over. I can hardly see now.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Mon Jul 29, 2002 12:45 am    Post subject: Reply with quote

your site is down at the moment

i really hope I can compile this one, i've had problems compiling you earlier releases...

great work (i think )
Back to top
View user's profile Send private message Visit poster's website
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Mon Jul 29, 2002 4:15 am    Post subject: Reply with quote

I dont think my server has gone down any time in the past. maxi-web.net is pretty stable.

Great. Can you post a transcript of your build errors. I would love it. I would love it more if you feed me with patches.

BTW, if you do not have bash, (from the BIN utils, ithink) use m.bat to compile, it should work. I dont know, I have bash.

otherwise you can compile by hand.

go into the src directory

gcc -c *.cc *.c -I../include/ -O2 [lib]

where lib is -DDLX if you want to use DLX, and -DSXL or SXL.

SXL compiles with out any errors, but you cant make programs

Do this with sdk/ stk/ and sfc/ folders

gcc -o seal.exe src/*.o sdk/*.o stk/*.o sfc/*.o -lallettf -lalleg

thats it.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
orudge
Administrator


Joined: 07 Oct 2001
Posts: 1332
Location: United Kingdom

PostPosted: Mon Jul 29, 2002 5:24 am    Post subject: Reply with quote

Yay, a new version! When I get back on my other system, I will have a play around with this and write some code myself.
_________________
Owen Rudge
http://www.owenrudge.net/

Currently Playing (last time I was online, anyway):
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Mon Jul 29, 2002 9:27 am    Post subject: Reply with quote

oh. it didn't go too well here's the errors i got when I tried to compile the src\ directory (with -DDLX):

Code:

__gfs.cc:30: dmalloc.h: No such file or directory (ENOENT)
dlxload.cc: In function `void _DefaultError(long int, char *)':
dlxload.cc:336: `ERR_INFO' undeclared (first use this function)
dlxload.cc:336: (Each undeclared identifier is reported only once
dlxload.cc:336: for each function it appears in.)
dlxload.cc:336: implicit declaration of function `int seal_error(...)'
dlxload.cc:337: implicit declaration of function `int DEBUG_printf(...)'
dlxload.cc: In method `CDLX::CDLX(char *, void *)':
dlxload.cc:1210: `SealApiVersion' undeclared (first use this function)
dlxload.cc:1242: `uLong' undeclared (first use this function)
dlxload.cc:1242: parse error before `='
dlxload.cc:1245: `compsize' undeclared (first use this function)
dlxload.cc:1267: `final' undeclared (first use this function)
dlxload.cc:1268: `Bytef' undeclared (first use this function)
dlxload.cc:1268: parse error before `)'
dlxload.cc:1276: `comp' undeclared (first use this function)
dlxload.cc:1278: confused by earlier errors, bailing out
In file included from ../include/sdk/sdk.h:39,
                 from main.cc:32:
../include/sdk/stkWidget.h:108: invalid use of undefined type `class stkWidget'
../include/sdk/stkWidget.h:76: forward declaration of `class stkWidget'
../include/sdk/stkWidget.h:108: parse error before `)'
../include/sdk/stkWidget.h:111: invalid use of undefined type `class stkWidget'
../include/sdk/stkWidget.h:76: forward declaration of `class stkWidget'
../include/sdk/stkWidget.h:111: parse error before `)'
../include/sdk/stkWidget.h:216: syntax error before `*'
main.cc: In function `void SealInfo()':
main.cc:43: `VER_MAJOR' undeclared (first use this function)
main.cc:43: (Each undeclared identifier is reported only once
main.cc:43: for each function it appears in.)
main.cc:43: `VER_MINOR' undeclared (first use this function)


I have no idea where all those things are supposed to be declared. I can't find them anywhere in the sources in the package. Strange.

I'm doing this on DOS with gcc 2.952 (maybe I need 3.1??)
Back to top
View user's profile Send private message Visit poster's website
axis



Joined: 03 Nov 2001
Posts: 20
Location: Uruguay

PostPosted: Mon Jul 29, 2002 11:46 am    Post subject: Reply with quote

Guys, would you mind posting DOS binaries?
I would like to see the preview
TNX
Back to top
View user's profile Send private message Visit poster's website
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Mon Jul 29, 2002 12:18 pm    Post subject: Reply with quote

Ok,

delete that file __gfs.cc. its obselete code.

As I said earlier, the errors were with dlxload.cc. Somebody fix this.

`VER_MAJOR', `VER_MINOR are defines in the makefile, you could use -DVER_MAJOR=2 -DVER_MINOR=65. Basically you arent using the makefile. The above directives should fix it.

gcc -c "foo.c" -DVER_MAJOR=2 -DVER_MINOR=65 -DDLX

I think the two defines are used only in main.cc, you might as well uncomment it if it doesnt work.

The use of undefined class is odd. Are you sure you are using the include directive with gcc (-I) It has to reflect the correct path. Edit stkWidget.h and add a
Code:

class stkWidget;

before the first use of stkWidget in the header. That should fix it. Tell me if it works for you. Ill patch the code.

What about the source files in sdk, stk and sfc directories ? Did they compile ? Keep us posted.


I am using gcc 2.96 myself.

About binaries, allegro programs do not work on my XP machine, so I do not want to distribute binaries that may not work. I am willing to give out binaries for redhat 7.2, but who needs binaries of a _real_ OS.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
BadSector
Administrator


Joined: 24 Oct 2001
Posts: 328
Location: Greece, Samos

PostPosted: Mon Jul 29, 2002 4:14 pm    Post subject: Reply with quote

i fixed the dlxload.cc file, but i have bad news for you: neither dlxload.cc can use C++ classes. It can only use simple C. Anyway i tried to make a null application (an app that does nothing, because SEAL needs an app to be passed as argument in order to start) but crashed...

about the dlxload.cc fix: i just commented out all things that was using "unknown" stuff and removed the comment of "zlib.h", becuase uLong and Bytef and other stuff was defined there....
_________________
main(){printf("Hello, world!n"); return 0;}
Bad Sector - http://www.bsector.cjb.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Mon Jul 29, 2002 4:21 pm    Post subject: Reply with quote

after banging my head in the wall and trying to compile it all night i've finally given up... only that "undefined" class error remains (and the DLX stuff). I tried to do the changes to stkWidget.h you suggested... didn't change a thing.

i'm downloading DJGPP right now, and i'm going to reinstall it to see if that helps (i'm desperate! )

when i compiled the sfc\ directory i got the same errors as with src\, and nothing else. with stk\ and sdk\ i got those errors aswell as one zillion errors in gstring.h. i will post some of those errors as soon as i figure out how to redirect the error messages to a file...

well well. i'll keep trying. am i really the only one around here with DJGPP installed?!?! come one people!

EDIT: Re-installing DJGPP didn't help much... same old errors.
Back to top
View user's profile Send private message Visit poster's website
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Mon Jul 29, 2002 6:04 pm    Post subject: Reply with quote

Code:

   i fixed the dlxload.cc file, but i have bad news for you: neither dlxload.cc can use C++ classes. It can only use simple C. Anyway i tried to make a null application (an app that does nothing, because SEAL needs an app to be passed as argument in order to start) but crashed...


This is _great_ news. I mean progress. Except for the crash (urgh).

Do you remember uniforms, BS ? About three years back I had a look, wasnt it written in c++ ?? c++ with DLX ? I dont remember. I guess its possible. The sample programs with dlx2.9x are in cpp.

Unless seal 2.0 has made a lot of changes. I think Stencl initially had made a lot of changes. I dont know any of this stuff. You are the guy.

You will also find files with underscores. They are the original sources. I have the zip file myself. Can send it to anyone if needed. Can the original be fixed ?

So, you were able to compile the sources. Thats great. Can I have patches ??

That crash I think i know the reason, null apps not supported. It needs something to draw, something to eat on.

FK : This is very new for me. Are you sure you are using -I properly. Ill write a batch file tommorow to do all the stuff. I use DJGPP (3.1) and it shows no error except for dlx..

I think this is all great news. Now, I can happily go to sleep.

To redirect the errors or any output use redir.exe from the /bin folder in DJGPP.See the usage for details.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
BadSector
Administrator


Joined: 24 Oct 2001
Posts: 328
Location: Greece, Samos

PostPosted: Mon Jul 29, 2002 11:09 pm    Post subject: Reply with quote

(snippet from -original unchanged as-distributed by nanosoft, etc- DLX 3.0's library template):
Code:

#include <dlx.h>
DLX_FN void LibMain(int a)
{
        if(a==0) // initialize
        {
                LIBCONSTRUCT
        } else if(a==1) { // exit
                LIBDESTRUCT
        } else if(a==2) { // second load?
        } else if(a==3) { // pre-unload?
        }
} DLX_EF
DLX_FN void myroutine()
{
} DLX_EF
long myvar;
DLX_FN void entry()
{
} DLX_EF


as you can see all to-be-exported functions are starting with DLX_FN and ending with DLX_EF. DLX_FN and DLX_EF are actually extern "c" { and } if _cplusplus_ is defined (compiling C++ code).

Also even if Uniforms were under C++, it's applications were simple C... or not? Ok, i'm note that sure. But note this: when i first came to SEAL i asked Florian Xavier why Michal stopped Uniforms. He answered me that because newer DJGPPs were incompatible with the version that Michal used to make Uniforms. These days i didn't understood how a could be *that* incompatible, but now it's possible to think that the "incompatibility" was in the exported symbols and not in code. But i don't have the old version of DJGPP that Michal used in order to prove that.


Ok, except the dlxload.cc i changed also ftype, or ctype (No!), or something like that who had a use of a font functiond ending with _ex2. I commented that out. I also commented out everything that dlxload.cc was saying that is missing. I noticed that actually this "everything" was missing because zlib.h was commented out. So i uncommented it. Anyway, if you decide to not comment out the missing stuff, you'll need zlib.a (which i think comes with DJGPP, but i'm not sure).

And maybe this crash came because i commented out much stuff

I talked with a friend who know better how those compilers work and he told me that C has many standard definitions for this stuff, but C++ is more "free". There isn't any standard for the ABI so every implementation does what it likes in order to produce binary code.
_________________
main(){printf("Hello, world!n"); return 0;}
Bad Sector - http://www.bsector.cjb.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Tue Jul 30, 2002 2:11 am    Post subject: Reply with quote

Ok, that ftype.[cc,h] is actually a wrapper over AllegTTF from Doug. Ill provide the source next time and link directly to it. At present I use the library file.

So what do you think ? Dump the DLX file from Seal 2.0 nad start afresh from The DLX 3.0 sources ??

I think it wouldnt be very hard to make dlx work with the code, because finally I dont link with the c++ libraries. That means I dont use asingle function from C++, not even cout. OK, dlxload.cc uses c++ and so I have to link cpp libs just for that.

So its all C Code in a class member.

What about modifications to sxl ? BTW, I like the neatness of SXL, just drop it in and compile, except I made two modifications to the source to remove the warnings, I think reaching end of non-void function. Try compiling with -Wall.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Tue Jul 30, 2002 5:12 am    Post subject: Reply with quote

Earlier you said that you used gcc 2.96, and I thought I should get the closest to it and i got 2.953. But then I realised that 2.96 was that unstable version of 3.0 that redhat included, stupidly enough. So, I downloaded gcc 3.1 and it worked fine. It compiled just fine after I had commented the stuff in ftype.cc that BadSector also did.

So, now I have a working seal.exe, however I can't compile the test.cc... it gives me hundreds of "undefined reference to: 'blablabla'" in the linking process, when I do like this:

Code:
gpp -c test.cc -I.\include
gpp -o test.so test.o


Is that because of the unworking DLX stuff?


And another thing. Since this is going to be compiled on DOS you should probably avoid using filenames longer than 8.3 (stkWidget.h)...
Back to top
View user's profile Send private message Visit poster's website
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Tue Jul 30, 2002 8:23 am    Post subject: Reply with quote

Dude,

you are almost there.

use

Code:

gpp -c -shared test.cc -I.\include
gpp -o -shared test.so test.o


And, its gcc 2.96 on linux and 3.1 DJGPP. I compile with both. Cant run on SEAL under Windows XP, just a blank screen. So I cant really test.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    SEAL Forum Index -> Seal 3.0 Development All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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


Powered by phpBB © 2001, 2005 phpBB Group