Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GUI: Proof of concept with wx-c.dll
#21
Quote:just a simple question. do you guys actuly read all the code in those huge posts?.

I do. :o

1.) Copy, paste, and compile the code :barf:

2.) Read through the code... :???:

3.) ...and learn :oops:

:wink:
Reply
#22
one suggestion, there's devcpp devpaks ( i send dumbledore the link ) on the wxwidgets site there's a link to "how to use wxwidgets in devc++" or something. from what i can tell there's already precompiled .a and dlls in there so you could just use that and write a wrapper around the crap, so you'd get rid of the .net framework
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply
#23
The .net framework is not needed when using wx-c.dll (i don't have the framework installed), forget about a new wrapper.

Btw, i'm writing a small C parser (in FB :P) to translate the wx-c's .cxx to .bi (only the prototypes), so translating by hand now may be, well, worthless ;)

I will work on it when i release the FB v0.12, i got #define's with arguments working, i need to do more tests.. cya..
Reply
#24
eh? then why wouldn't it run on my windows 98 machine? :/

nice idea with the auto converter, i'm sure it'll be handy.
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#25
Quote:one suggestion, there's devcpp devpaks ( i send dumbledore the link ) on the wxwidgets site there's a link to "how to use wxwidgets in devc++" or something. from what i can tell there's already precompiled .a and dlls in there so you could just use that and write a wrapper around the crap, so you'd get rid of the .net framework

I have devC++ and MinGWStudio installed (besides other stuff...).
The wx libs are preinstalled with MinGWStudio and a simple 'wxMinimal' exe is about 1.2Mb in size, compiled as release (compiled as debug 17Mb).

Because I don't have experience with wx, I don't know if 1.2Mb is the real minimum that can be done.
Suppose it is. :barf:
Reply
#26
Quote:The .net framework is not needed when using wx-c.dll (i don't have the framework installed), forget about a new wrapper.
All I can say is that on WinXP it works without .NET installed.
Maybe on Win98 there are some Windows dll's missing...

Quote:Btw, i'm writing a small C parser (in FB Tongue) to translate the wx-c's .cxx to .bi (only the prototypes), so translating by hand now may be, well, worthless Wink

I will work on it when i release the FB v0.12, i got #define's with arguments working, i need to do more tests.. cya..
8)

The bad thing about wx-c is that OpenGL is not implemented yet and it could be difficult to make lillo's gfx lib work with wx.
Reply
#27
According with tdump, wx-c.dll has imports from the following dll's:

KERNEL32.DLL
ADVAPI32.dll
COMCTL32.dll
comdlg32.dll
GDI32.dll
MSVCR71.dll
ole32.dll
SHELL32.dll
USER32.dll

Problem in 9x is probably with msvcrt71, as everything else is pretty standard.

Compiling wx-c statically won't be possible with FB as FB doesn't include the c++ initialization that calls the static construtors (and when finishing the static destructors), i guess wxW gotta many of them.

OpenGL apps use to have their own GUI's anyway, unless they always run in windowed mode.
Reply
#28
Blargh, I'm working on an h2bi utility... really crappy right now, though - originally written (and almost working) in VB-DOS, but with FB, some things are broken, and I'm too lazy to fix them right now... Smile
Reply
#29
ok, i was missing the msvcr71.dll, now fsw's test works, but mine doesn't. probably because i'm screwing up the menus. (what is wxmenubase? it's not in the wx docs but is in the wx.net docs)
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#30
v1c:
this should work most of the time for converting the cxx prototypes. (note: most of the time. sometimes it's pretty bad, such as line 517 of the output Cry ) hope it helps you get yours working faster, maybe you could merge some of the code if it's general-purpose enough :wink:
Code:
declare function c2qbtype$(ty$)
cls
print "teh uber 1337 cxx -> bi converter!!"
line input "root dir?",rootdir$
shell "dir "+rootdir$+"*.cxx/b > files.txt"
open "wx-c.bi" for output as #3
open "files.txt" for input as #1
while not eof(1)
   line input #1, filename$
   open rootdir$+filename$ for input as #2
   print rootdir$+filename$
   while not eof(2)
      line input #2, lineoftext$
      lineoftext$=trim$(lineoftext$)
      if instr(lineoftext$,"/*") then comment=comment+1
      if instr(lineoftext$,"{")>0 and instr(lineoftext$,"}")=0 then
         nest=nest+1
      elseif instr(lineoftext$,"(")>0 and instr(lineoftext$,"}")>instr(lineoftext$,"{") and instr(lineoftext$,"}")>0 then
         lineoftext$=trim$(mid$(lineoftext$,1,instr(lineoftext$,"{")-1)+mid$(lineoftext$,instr(lineoftext$,"}")+1))
         if instr(lineoftext$,"WXEXPORT")>0 then
            lineoftext$=trim$(mid$(lineoftext$,instr(lineoftext$,"WXEXPORT")+9))
         end if
         'print lineoftext$
      end if
      if instr(lineoftext$,"#if") then ifs=ifs+1
      if instr(lineoftext$,"#")=0 and instr(lineoftext$,"//")=0 and comment=0 and nest=0 and lineoftext$<>"" and instr(lineoftext$,":")=0 and instr(lineoftext$,"extern")=0 and instr(lineoftext$,"typedef")=0 and instr(lineoftext$,"class")=0 and instr(lineoftext$,";")=0 and ifs=0 then
         if instr(lineoftext$,"(") and instr(lineoftext$,")")=0 then
            while instr(lineoftext$,")")=0
               line input #2, dummy$
               lineoftext$=lineoftext$+" "+trim$(dummy$)
            wend
         end if
         printlin$="declare function "
         funcname$=trim$(mid$(lineoftext$,instr(lineoftext$," "),instr(lineoftext$,"(")-instr(lineoftext$," "))+"(")
         while instr(funcname$," ")
            funcname$=trim$(mid$(funcname$,instr(funcname$," ")+1))
         wend
         if left$(funcname$,1)="*" then funcname$=mid$(funcname$,2)
         printlin$=printlin$+funcname$
         curpos=instr(lineoftext$,"(")+1
         if mid$(lineoftext$,curpos,1)<>")" then
            do
               typ$=trim$(mid$(lineoftext$,curpos,instr(curpos,lineoftext$," ")-curpos))
               curpos=instr(curpos,lineoftext$," ")+1
               if typ$="unsigned" or typ$="signed" or typ$="const" then
                  typ$=typ$+mid$(lineoftext$,curpos-1,instr(curpos,lineoftext$," ")-curpos+1)
                  curpos=instr(curpos,lineoftext$," ")+1
               end if
               if instr(curpos,lineoftext$," ")=0 then curpos=instr(lineoftext$,"(")+1:exit do
               naame$=trim$(mid$(lineoftext$,curpos,instr(curpos,lineoftext$,",")-curpos))
               if left$(naame$,1)="*" then naame$=mid$(naame$,2)
               printlin$=printlin$+naame$
               curpos=instr(curpos,lineoftext$," ")+1
               printlin$=printlin$+" as "+c2qbtype$(typ$)+","
            loop while instr(curpos+1,lineoftext$,",")>0 and curpos>1
            typ$=mid$(lineoftext$,curpos,instr(curpos,lineoftext$," ")-curpos)
            curpos=instr(curpos,lineoftext$," ")+1
            if typ$="unsigned" or typ$="signed" or typ$="const" then
               typ$=typ$+mid$(lineoftext$,curpos-1,instr(curpos,lineoftext$," ")-curpos+1)
               curpos=instr(curpos,lineoftext$," ")+1
            end if
            naame$=trim$(mid$(lineoftext$,curpos,instr(lineoftext$,")")-curpos))
            if left$(naame$,1)="*" then naame$=mid$(naame$,2)
            printlin$=printlin$+naame$
            printlin$=printlin$+" as "+c2qbtype$(typ$)
         end if
         stuff$=mid$(lineoftext$,1,instr(lineoftext$,"("))
         typ$=mid$(stuff$,1,instr(stuff$," "))
         if instr(instr(stuff$," ")+1,stuff$," ")>0 then typ$=mid$(stuff$,1,instr(instr(stuff$," ")+1,stuff$," "))
         printlin$=printlin$+") as "+c2qbtype$(typ$)
         print #3, printlin$
      end if
      if instr(lineoftext$,"*/") then comment=comment-1
      if instr(lineoftext$,"}") and instr(lineoftext$,"{")=0 then nest=nest-1
      if instr(lineoftext$,"#endif") then ifs=ifs-1
   wend
   close #2
wend
print "done."
sleep

function c2qbtype$(ty$)
   'print ty$:sleep
   select case lcase$(trim$(ty$))
   case is = "unsigned char"
      ans$="ubyte"
   case is = "unsigned integer"
      ans$="uinteger"
   case is = "const char*"
      ans$="string"
   case is = "char*"
      ans$="string"
   case is = "char"
      ans$="byte"
   case is = "const char"
      ans$="byte"
   case is = "bool"
      ans$="integer"
   case is = "const bool"
      ans$="integer"
   case is = "unsigned bool"
      ans$="uinteger"
   case is = "long"
      ans$="long"
   case is = "unsigned long"
      ans$="unsigned long"
   case is = "wxstring*"
      ans$="string ptr"
   case is = "const wxstring*"
      ans$="string ptr"
   case is = "wxstring"
      ans$="string"
   case is = "const wxstring"
      ans$="string"
   case is = "const wxstring&"
      ans$="string"
   case is = "wxstring&"
      ans$="string"
   case else
      ans$="integer"
   end select
   c2qbtype$=ans$
end function
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)