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 Previous  1, 2
 
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: Tue Jul 30, 2002 8:30 am    Post subject: Reply with quote

I got another idea,

if you really want to run Preview 3 on DOS, you can remove the dlx stuff and put that test.cc contents directly into src/main.cc . It should work. I used to do it this way before I got SModule working on Linux.

As I said before ftype.[cc,h] is a wrapper over AllegTTF from Doug.

FK : Now you can distribute binaries for others.
_________________
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 9:01 am    Post subject: Reply with quote

Actually i tried that first [to use -shared, that is], but it said: "unrecognized option '-shared'". But now I noticed that '-Bshareable' does the same thing and it was recognized. Although I still get errors like this:

Code:
test.o(.text+0x42):test.cc: undefined reference to `sdkApp::sdkApp[not-in-charge]()'
test.o(.text+0x6d):test.cc: undefined reference to `stkWindow::stkWindow[in-charge]()'
test.o(.text+0xce):test.cc: undefined reference to `stkWidget::set_caption(char const*)'
test.o(.text+0x119):test.cc: undefined reference to `stkPushButton::stkPushButton[in-charge]()'
test.o(.text+0x1a3):test.cc: undefined reference to `stkWidget::set_caption(char const*)'
test.o(.text+0x1c5):test.cc: undefined reference to `stkCheckButton::stkCheckButton[in-charge]()'
test.o(.text+0x249):test.cc: undefined reference to `stkWidget::set_caption(char const*)'
test.o(.text+0x26b):test.cc: undefined reference to `stkListBox::stkListBox[in-charge]()'
...
test.o(.gnu.linkonce.d._ZTV8TestAppA+0x10):test.cc: undefined reference to `stkWidget::set_xy(int, int)'
test.o(.gnu.linkonce.d._ZTV8TestAppA+0x14):test.cc: undefined reference to `stkWidget::set_wh(int, int)'
test.o(.gnu.linkonce.d._ZTV8TestAppA+0x18):test.cc: undefined reference to `stkWidget::set_xywh(int, int, int, int)'
...
c:/djgpp/lib/libc.a(crt1.o)(.text+0x404):crt1.c: undefined reference to `_main'


I'm sure it's just something stupid that I've forgotten to do or something, but I just can't figure out what!
Back to top
View user's profile Send private message Visit poster's website
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Tue Jul 30, 2002 9:54 am    Post subject: Reply with quote

I added test.cc to main.cc and now atleast I can run it and see a gray background and move the mouse cursor . But no window, no buttons, no nothing. How am I going to call that function that draws the windows etc. I tried just adding SealAppEntry(NULL, NULL); but that didn't work... it crashed when you ran seal.exe.

I guess I didn't know what "slow progress" was before I tried to compile Seal 3 Technology Preview 3

Yes, I will distribute the binaries as soon as it works. A gray screen and a mouse isn't all that interesting...
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 10:33 am    Post subject: Reply with quote

This is great news, you have got almost what I have got onmy screen, only I can use an app. An app with a button.

Give me a sec, arent you using Linux ? Have they removed -shared in 3.1x ?? I use 2.96 on mine, and -shared works.

Isnt it SealAppEntry (NULL, NULL, NULL, NULL). Try this, put the TestAppA class into main.cc and make a new instance. Then add it to wm.

Dont know why four arguments, we will find out soon

Code:

TestAppA *a = new TestAppA;
wm->app_add(a);


This code can directly go into main.cc

Quote:

I guess I didn't know what "slow progress" was before I tried to compile Seal 3 Technology Preview 3 icon_lol.gif


Its technology preview. Its powered by technology, you cant see it.

Gray screen, thats another fix I have to make to my code base. The registry entries are read after the Window Manager is loaded, so the desktop does not reflect the entry in the registry.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
lukas139



Joined: 29 Mar 2002
Posts: 293
Location: Slovakia

PostPosted: Tue Jul 30, 2002 12:01 pm    Post subject: Reply with quote

I cant get it to compile. Ganesh could you please release a totaly compilable version. I want to help with developing and since i cant get it to run i cannot.
_________________
Lukas Lipka
My Home
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Tue Jul 30, 2002 12:49 pm    Post subject: Reply with quote

Quote:
Give me a sec, arent you using Linux ? Have they removed -shared in 3.1x ?? I use 2.96 on mine, and -shared works.


No, I'm doing this in DOS. Don't know if it was removed. When I do --help it is still listed, together with -Bshareable. Although it doesn't work. If -Bshareable works in earlier releases that's probably what you should put in the makefiles.

Quote:
Isnt it SealAppEntry (NULL, NULL, NULL, NULL). Try this, put the TestAppA class into main.cc and make a new instance. Then add it to wm.


Nah it's actually two arguments. It's the "f" function that has four...

Quote:

Code:

TestAppA *a = new TestAppA;
wm->app_add(a);


This code can directly go into main.cc


I did this, and when I run it I get allegro SIGABRT stuff, and some ununderstandable stuff.

However, I have never written one single line of code is C++ (i've only been using C for a few months). So it's very likely that i've done something wrong. Here's my main.cc: http://www.student.lu.se/~kem01bha/seal/main.cc if you've got any time over, you may point me in the right direction


lukas: i'm trying to compile it for DOS, ganesh can't test-run it since he's using WinXP. Why don't you try to compile it yourself, follow this thread and learn from my mistakes
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 2:17 pm    Post subject: Reply with quote

Code:

/******************************************************************
 * SEAL 3.00 preview                                              *
 * (C) 2002, Ganesh Swami                                         *
 *                                                                *
 * Web site: http://www.iamganesh.com/                            *
 * E-mail ganesh_net@hotmail.com                                  *
 ******************************************************************/

/*
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/



#ifdef DJGPP
#define ___SXL_HOST___
#endif

#include <seal.h>
#include <sdk/sdk.h>
#include <smodule.h>
#include <stdio.h>
#include <init.h>
#include <gfs.h>

#include <sdk/wm.h>
#include <sdk/stkWidget.h>
#include <stk/widgets.h>


sdkWindowManager *wm;

void inline
SealInfo ()
{
  printf ("Running SEAL v%i.%i ", VER_MAJOR, VER_MINOR);
#ifdef ALLEGRO_I386
  printf ("on i386\n");
#endif
  printf ("On platform : %s \n\n", ALLEGRO_PLATFORM_STR);

}

class TestAppA : public sdkApp
{
   stkWindow *win;
   stkPushButton *btnOK;
   stkListBox *lbl;
   stkCheckButton *txt;

   public:   
   
   TestAppA ();
   void process();
};

void TestAppA ::process()
{
      
}   

TestAppA ::TestAppA ()
{
   win = new stkWindow;
   
   win->set_caption("About Seal");
   win->set_xywh(100,100,300,300);
   
   btnOK = new stkPushButton;
   btnOK->set_xywh(200 ,240,80,40);
   btnOK->set_caption ("OK");
   
   txt = new stkCheckButton ;
   txt->set_xywh(20,40,17,17);
   txt->set_caption ("I love seal");
   
   lbl=new stkListBox;
   lbl->set_xywh(20,130,200,100);
   lbl->line_append("line 1");
   lbl->line_append("line 2");
   lbl->line_append("line 3");
   
   win->child_add(txt);
   win->child_add(btnOK);
   win->child_add(lbl);

   wm->child_add(win);
}






int
main (int argc, char **argv)
{
  allegro_init ();
  install_timer ();
  install_keyboard ();
  install_mouse ();

  SealInfo ();

  set_window_title ("Seal");

  d_registry_init ();

  wm = new sdkWindowManager ();
  if (wm->init () == -1)
    return -1;

  d_font_init ();
  d_gfs_init ();
  d_skin_init ();

  TestAppA *a = new TestAppA;
  wm->app_add(a);

  wm->EventLoop ();
  CallExitFunctions ();
  delete wm;
  return 0;
}

END_OF_MAIN ();


Ok, this is it. Put this down as main.cc and then compile. It should work.

FK : You uncommented out everything rightly, but you still left f(NULL,NULL,NULL,NULL)

This is a function pointer to the symbol in test.cc and since you did not attach f to anything, it sigfaults. On the other hand, it segfaults at smodule_sym () because of DLX.
_________________
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: Wed Jul 31, 2002 8:20 am    Post subject: Reply with quote

I'm sorry to say that it didn't work. I got the same sigfault again.... strange. what's the conclusion? something's not working in DOS? I'm clueless.
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: Wed Jul 31, 2002 10:09 am    Post subject: Reply with quote

Is it possible for you to trace the exact line where the signal occurs.

Use something like this

Code:

#define __TRACE__ printf("line : %i , file :  %s\n" , __LINE__ , __FILE__ );


And then you can use a bunch of __TRACE__s everywhere and tell me where exactly it sigfaults.

I suspect the font system or that set_window_title() func
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
lukas139



Joined: 29 Mar 2002
Posts: 293
Location: Slovakia

PostPosted: Wed Jul 31, 2002 10:11 am    Post subject: Reply with quote

FK: Well i would if gstring.h wouldnt give me hundred thousand billion errors. Could you please send me your version?
_________________
Lukas Lipka
My Home
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Wed Jul 31, 2002 12:05 pm    Post subject: Reply with quote

ganesh: I managed to trace the crash to this line in stk\widget.cc:
Code:
x->widget->event_draw (buffer);


it's around line 317. i can't trace it any further. it doesn't seem to enter the event_draw function.

hope this helps...


lukas: I had that problem too. I don't remember how I solved it though. If I remember later I'll tell you. I didn't do any changes to gstring.h. What do you want me to send you? If you mean the SEAL.EXE binary. Well sure I can send you it. But it doesn't do anything. It's just a stub! Without an test application it does nothing! But if you still want it, just tell me...
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: Wed Jul 31, 2002 12:35 pm    Post subject: Reply with quote

lukas : Did you use the include directive ??

Use -I../include/ or whatever the directory is....

FK : Ok, I think the widget wasnt created.

Code:

assert(x->widget);


If the assertion fails, then thats BAD. I have to investigate this matter.

BTW, I tried running SEAL over XDMCP, but I only get a blank screen. It doesnt work.

Progress on DLX :
I tried to rip out the DLX code from Seal 2 and commenting out the zlib calls etc...I was able to compile dlxload.cc. Thats great.

But when I tried to a make a skeleton program in C++, it doesnt work. Dlxgen fails with something like multiple maps...

I tried forcing the compiler to treat the source to C with -xc, it works. The problem right now is with dlxgen.

I will be doing some more searching over the net for this. I think I have found atleast two more similar libs. DXE and StoneWheel.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
lukas139



Joined: 29 Mar 2002
Posts: 293
Location: Slovakia

PostPosted: Wed Jul 31, 2002 12:38 pm    Post subject: Reply with quote

Your source directory so i can try to compile it.
_________________
Lukas Lipka
My Home
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Wed Jul 31, 2002 1:43 pm    Post subject: Reply with quote

lukas: download my source tree from here: http://www.student.lu.se/~kem01bha/seal/p3dos.zip it's 449kB. This compiles for me when i run m.bat now. Note that I've made some changes to src\main.cc and \test.cc that you probably don't want. so just use the original files.

ganesh: i added that assert line right before the failing line and it stilled crashed at the same line. So I suppose the assertion works... but hey. what do i know?
Back to top
View user's profile Send private message Visit poster's website
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 Previous  1, 2
Page 2 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