WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)

User projects written in or related to FreeBASIC.
Post Reply
rdhays82604
Posts: 14
Joined: May 19, 2011 11:43

Re: WinFBE FreeBASIC Editor for Windows

Post by rdhays82604 »

Paul

I noticed that line 19 in the AfxCtl.inc file was commented out.
Is this by design?
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

rdhays82604 wrote:Paul

I noticed that line 19 in the AfxCtl.inc file was commented out.
Is this by design?
You should uncomment it and point it to "windowsxx.bi"
rdhays82604
Posts: 14
Joined: May 19, 2011 11:43

Re: WinFBE FreeBASIC Editor for Windows

Post by rdhays82604 »

OK - Thanks :)
VANYA
Posts: 1839
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: WinFBE FreeBASIC Editor for Windows

Post by VANYA »

PaulSquires wrote:
Hi VANYA,

I would love to get this working for you. Hopefully you can help me because I do not have access to a Windows machine that uses Cyrillic. The editor allows you to use UTF-8. You can change the setting under "View \ Environment Options \ Code Editor" and tick the box for "Enable Unicode (UTF-8 encoding). You can also change that setting by simply clicking on the StatusBar where you see the word "ANSI". It will toggle to "UTF-8 (Unicode)".

You can also specify a codepage to use for your selected editor font. "View \ Environment Options \ Colors and Fonts".

If I knew what needed to be done to make this work for you then I will certainly modify the editor to get it working.
Hi Paul!

Settings: "View \ Environment Options \ Code Editor" work. That is the second question closed, Russian characters are displayed in the editor.
However, the first question to be not resolved. I don't know how you have implemented getting file paths. On examining the code I will take a very long time. I was looking for on command Command() , but she meets just once and how Command() connected with the rest of the code I did not understand.

At this point, if I upload a file with a Russian name, via the command line, editor crashes. If you download via the menu "Open", the file is downloaded, but when you compile the following occurs:

Image

In the title bar name is displayed correctly, but in the compilation window path distorted. That is, transfer the name via the command line is not implemented correctly.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Thanks VANYA, I will work through the source code today to see where the problem occurs. I have an idea of where it happens during the compile process so hopefully I can fix it quickly. I will post again with the fixes.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Hi VANYA, i am having a hard time testing fixes because I use an English locale version of Windows. I did try creating a file in Windows using Russian characters that I copied from somewhere on the internet. The filename was called "СредняАзиdoc.bas". I found that some of FB's functions did not work well with these characters even when it was placed in a WSTRING. For some reason MID seemed to fail and trying to read from the file using BINARY mode gave an error that the file could not be found. I switched to using Windows FileSystem Object via COM to read and write the file and that seemed to work well.

Next problem was trying to get the file to compile. The editor creates a batch file and feeds it to the FBC compiler via a call to ShellExecuteEx api. Because the batch file contains unicode characters I needed to save the batch file as unicode (I tried UTF8, UTF16, and UTF32). Unfortunately, the Windows cmd.exe program does not play well with unicode batch files. I even tried changing the codepage (via chcp in the batch file) but I could not get success.

I have uploaded new EXE's to the GitHub repository for you to try. You may have better success than I did given that your computer is native Russian.
I coded these text EXE's to not delete the batch file or the compiler log file. You should look at them to see if the filenames are correct in them. You will know those files because they begin with underscores "_".

Thanks,
OSchmidt
Posts: 49
Joined: Jan 01, 2016 12:27
Contact:

Re: WinFBE FreeBASIC Editor for Windows

Post by OSchmidt »

PaulSquires wrote: Next problem was trying to get the file to compile. The editor creates a batch file...
Unfortunately, the Windows cmd.exe program does not play well with unicode batch files.
An alternative to batch-files (with regards to Unicode-support) might be to write the
UTF8-content into *.vbs-Files instead (when these contain an UTF8-BOM, the WScript-
engine supports Unicode-String-Literals without problems).

Olaf
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: WinFBE FreeBASIC Editor for Windows

Post by sancho2 »

I had a chance to look at the new upload.
Very nice improvement. It seems much more fluid to work with.

I tried the declare file method and that works. I tried tripping it up with multiple types of procedures and parameters and it didn't fail. It did allow a programmers error to become a declare.

Code: Select all

Declare Sub sub sub test() as INTEGER moo mooo mooo
But I wouldn't think it would be necessary to weed out syntax errors.

It will be very handy in a medium to large project.
I do prefer my tool for when I don't want a file attached to the code.
So my question is do you plan to add a customizable TOOLS menu similar to what FBEdit has?
VANYA
Posts: 1839
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: WinFBE FreeBASIC Editor for Windows

Post by VANYA »

Hi Paul!

Yes, this problem is related to CMD.exe. You can solve the problem, If the first file bat chcp 1251, but this is a private decision (and not very good). Have to use the only editor with English catalogs.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Thanks VANYA, yesterday I try using the chcp method as described in places on the internet but it did not help solve the problem (well, at least I couldn't get it to work). I might try using pipes to see if that helps. I will also look at Windows Script Host like Olaf points out above - that idea had not occurred to me at all. Sounds interesting.

sancho - thanks, a customizable Tools menu sounds like a good idea. I have it FireFly and it works well to add user defined tools that can be automated before/after compiling or invoked at any time via a menu option or user defined hot key.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Version 1.2.3 released on GitHub repository: https://github.com/PaulSquires/WinFBE/releases

If you decide to experiment with the included sample projects or use the built in code templates, you will first need to copy the "Afx" folder found under the "src" folder to your FBC's installation's "inc" folder, otherwise the compiler will throw errors saying that it can not find certain include files.
deltarho[1859]
Posts: 4315
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: WinFBE FreeBASIC Editor for Windows

Post by deltarho[1859] »

Hi Paul

No big deal but 'Save Declares File...' has just pulled out a Sub in an ASM block: Declare Sub eax, ecx

I say no big deal because it is easily removed.
Jonge
Posts: 130
Joined: Jul 17, 2012 17:51
Location: Norway
Contact:

Re: WinFBE FreeBASIC Editor for Windows

Post by Jonge »

Are you planning to add "CamelCase" keywords for the editor?

I'm glad you seem to be working on the autocomplete function now which I find extremely use full in a editor. That was something that I really liked about FBedit, though with all the new features in FB and no updates for FBedit's parser makes the function pretty useless now.

Edit:
I also miss "Bold" and "Italic" settings for fonts...
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Version 1.3.0 uploaded:
https://github.com/PaulSquires/WinFBE/releases

Way too many internal changes to list. Biggest changes are ability to handle multiple open projects and brand new Find/Replace dialogs that function very similarly to those found in the VSCode editor.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: WinFBE FreeBASIC Editor for Windows

Post by PaulSquires »

Small regression fixed whereby duplicate functions showing in Function List.
https://github.com/PaulSquires/WinFBE/releases
Version 1.3.1
Post Reply