• Welcome to PlanetSquires Forums.
 

WinFBE 1.4.8 on GitHub (August 25, 2017)

Started by Paul Squires, August 25, 2017, 06:37:29 PM

Previous topic - Next topic

Paul Squires

Version 1.4.8 (August 25, 2017)
- Changed: Failed results when compiling individual module files to object files are now displayed.
- Changed: Corrected captions on save dialogbox for "Save As", "Save Declares File", "Save Project As".
- Fixed: Compiling failed in situations where spaces in file path to compiler (CreateProcess and/or FBC assembling would fail).

https://github.com/PaulSquires/WinFBE/releases
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Marc Pons

Hi Paul

I'm now able to use your nice WinFBE (under win 10)

In fact, i don't use only the 1.05 32 or 64 compilers, i"m still using the 0.24 old compiler version that gives smaller exe files in 32 bits obviously
and sometimes the prereleases 1.06

you defined 2 possible compilers  , and you've specialized them for 32 or 64bits

I think,  it could be more generic possibilities , only choice 1 or choice 2 or even more possibles choices...(i think 4 or 5 would be great, to be able to test the beta , 1.06 ...)

the only important thing is to show on the IDE what version and if 32 or 64 is selected

i'm using it in my csed-fb adaptation 

it could be done very simply , here a demo code to test (console mode)
you will get the version and if 32 or 64

'generic function to check if dll/exe is compiled for 32 or 64 bits
Private Function get_32_64(Byref spath As String) As Long
   Function = 0
   If Ucase(Right(spath , 4)) <> ".EXE" and Ucase(Right(spath , 4)) <> ".DLL" Then Exit Function

   Dim         as Long ilen
   Dim         as Long itemp
   Dim         as Long fd
   Dim         as UByte bArr(6)
   
   fd = Freefile()
   itemp = Open(spath For Binary as #fd)
   If itemp <> 0 Then Exit Function
   ilen = LOF(fd)
   If ilen < 133 Then
      Close #fd
      Exit Function
   End If
   Get #fd , 61 , bArr(0) , 6
   itemp = bArr(0) + bArr(1) * 256
   If itemp > (ilen - 6) Then
      Close #fd
      Exit Function
   End If
   Get #fd , itemp + 1 , bArr(0) , 6
   Close #fd
   If bArr(0) = 80 And bArr(1) = 69 _
And bArr(2) = 0 And bArr(3) = 0 Then
      If bArr(4) = 76 And bArr(5) = 1 Then
         Function = 32
      ElseIf bArr(4) = 100 And bArr(5) = 134 Then
         Function = 64
      End If
   End If
End Function

'get the version and 32/64 information of freebasic compiler
Private Function compiler_ver(Byref mess As String) As String
   Dim buffer            As String
   Dim sret              As String
   Dim ilen              As Long
   Dim P1                As Long
   Dim P2                As Long
Dim itemp             As Long
   Dim fu                As Long

   sret = ""
   If mess <> "" Then
fu = Freefile
itemp = Open (mess For Binary Access Read As #fu)
      If itemp = 0 Then
         ilen = Lof(fu)
         buffer = String(ilen, 0)
         Get #fu , , buffer
         Close #fu
         P1 = Instr(buffer , "FreeBASIC Compiler - Version")
         If P1 Then
            P2 = Instr(P1 , buffer , "(")
            If P2 > P1 Then
               sret = Mid(buffer , P1 + 28 , P2 - (p1 + 28) - 1)
               P1 = get_32_64(mess)
               If P1 = 32 Then
                  sret = "FreeBASIC Win32 " & sret
               Elseif P1 = 64 Then
                  sret = "FreeBASIC Win64 " & sret
               Else
                  sret = "FreeBasic Os problem : " & sret
               End If
            Else
               sret = "FreeBasic Compiler : Unknown !"
            End If
         else
            sret = "FreeBasic Compiler : Wrong File !"
         End If
      Else
         sret = "FreeBasic Compiler : No File !"
      End If
   Else
      sret = "FreeBasic Compiler : Undefined !"
   End If
   
   Function = sret
End Function

? compiler_ver( "D:\freebasic\FreeBASIC-1.05.0-win64\fbc.exe")
Sleep


the Function get_32_64 can obviously better be directly implemented on the compiler_ver function
to avoid 2 opens

i've done it like that to provide a generic function to check exe or dll for 32 or 64bits

hope can help some...


Paul Squires

Hi Marc!  Great to hear that you are on Windows 10. That's awesome. Now you can use WinFBE and all of the new tools that Jose is creating. Thanks for your code but after thinking about it, I think I will stay with the current way. I want the editor to be easy to use for new users and allowing the choice of one 32 bit and one 64 bit compiler is very straight forward and understandable for new users. I understand your need but I would say that your need for more than two compilers is the exception rather than the rule.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

After being away from the code for a couple of days, I have the design form working. The resize grab handles will be implemented tomorrow.

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Richard Kelly

Quote from: Paul Squires on August 29, 2017, 07:57:08 PM
After being away from the code for a couple of days, I have the design form working. The resize grab handles will be implemented tomorrow.

Woo Hoo! Those naysayers on the FB forum can suck eggs.....

Paul Squires

Lol,  :-)   Negative attitudes towards Windows doesn't bother me. I know that when everything is built that it will benefit a large number of programmers. The key is just to keep at it. To keep programming and building. Threads on the FB forum ask for ways to increase FB popularity... well, that can only happen by many small steps by a large number of people. I am making my small steps as is Jose, and everyone else here who develops a control, tool, library, etc.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Petrus Vorster

And a big thanks for that, because if it wasn't for the labour you and others did here, I would be the one sucking at everything.
-Regards
Peter