PDA

View Full Version : Machina Engine DevPascal - IDE for Free Pascal



FelipeFS
24-03-2012, 08:13 PM
This is a simple project, but usefull. I started this because I wanna a better interface than the oficial FPC.exe. The page of the project is a post in my blog: http://pixeldeveloper.blogspot.com.br/2012/03/medevpascal-interface-for-free-pascal.html

The main feature is a multi-document interface. And, from the IDE, the user will be able to configure the compiler.

[Screenshots]:
Initial screen:
764
Screen with open file:
765
Preferences screen:
766

Thank you for your attention!

Andru
24-03-2012, 08:27 PM
That would be cool to have something simpler than Lazarus and with same(and greater) functionality for code editing and debugging, so I will watch progress of this project :)

PS: there was one DevPascal (http://www.bloodshed.net/devpascal.html) long time ago.

Cybermonkey
24-03-2012, 09:13 PM
Looks good, I hope this is going to be multi platform.

LP
24-03-2012, 10:31 PM
Sounds like a good idea.

May I suggest for the editor to facilitate some code typing techniques that are currently present in Delphi, like when you type "begin" and then hit enter, it automatically adds "end", thus saving some amount of your time. This is a single feature I loved since the release of Delphi 2006.

FelipeFS
24-03-2012, 11:05 PM
Andru (http://www.pascalgamedevelopment.com/member.php?673-Andru): I knew I had heard this name before!

Cybermonkey (http://www.pascalgamedevelopment.com/member.php?74944-Cybermonkey): It is a goal. I'm using Delphi to develop this but I will convert the code to Lazarus, and then compile for others platforms. Just for now, it is fow Windows.

Lifepower (http://www.pascalgamedevelopment.com/member.php?112-Lifepower) : I am working on this! I like this feature too. Another feature I will put is that when you click [Left Mouse Button + Ctrl] in a word, and then the editor cursor goes to the respective implementation or prototype of a procedure/function or variable.




Thank you for your replies guys!

FelipeFS
25-03-2012, 06:42 AM
You can download the current version from my Skydrive - (Win32):
https://skydrive.live.com/redir.aspx?cid=bbf7f0cd6062d52e&resid=BBF7F0CD6062D52E!178&parid=BBF7F0CD6062D52E!176&authkey=!AOj2J0kJHEuj1eE (https://skydrive.live.com/redir.aspx?cid=bbf7f0cd6062d52e&resid=BBF7F0CD6062D52E%21178&parid=BBF7F0CD6062D52E%21176&authkey=%21AOj2J0kJHEuj1eE)

Some features were implemented:
- Auto indentation;
- Like Lifepower said before, the automatic closing block "end";

Features to be implemented:
- Browser for general issues(class/variables/procedures/functions);
- Auto complement(To make the prodoction faster - you will need just create the prototype of a procedure/function, and then, the full body of the function will be automatically created);
- Two options of window border
The standard(Windows border style);

The custom(the border style you see in the screenshots);


I want to know what do you think. Where should I put the Brower(left side(embbed with the "manager") or right side of the screen);

Please, test it. I don't know if any DLL will be needed. I need to know if it worked correctly on your computers.

WILL
25-03-2012, 11:29 AM
Hey Felipe, thanks for posting this. We met on the Game Development Facebook group the other day. :)

I was going to make a news post seeing as this is a new project and I like to post things as I discover them. When I have time. :(

Please keep us informed. I had the idea years ago to make a Game Developer's Edition of Lazarus, so this is a nice thing to hear about for me. I believe I came up with the idea then other people lack of interest and my lack of time killed the idea shortly after. It would be great if you could bundle all the major API wrappers with it so that you really only have to add them to your uses clause in your code and away you go. That was my big idea with the game dev edition concept. You would have to update which version of the new wrappers you put into it, but at least you were guaranteed that you have a working set with your IDE and compiler.

My big breath holder is what debugger are you using? AND how does it function? I have found that GDB does not work well with Lazarus ports to Mac (lots of issues that I don't think are fully fixed), but work perfectly fine with Windows and maybe Linux.

Not that there is much selection out there for debuggers (new Pascal debugger project anyone?) however it would be nice to see better debugger support for open source / freeware dev tool projects.

code_glitch
25-03-2012, 12:36 PM
Wow, bloodshed devpas... now that brings back memories!

I especially like how this resembles geany in many ways. As much as I like geany, I find its code completion a bit clunky and the fact it does not auto-complete from accross many files or add the 'object heirachy' like it does on other languages is a bit of a downer. If you have any plans to add that into your IDE, you'd win a fan for life :)

AirPas
25-03-2012, 01:50 PM
looks good , if you want to know the dll's needed , use peid for example

FelipeFS
25-03-2012, 04:53 PM
WILL (http://www.pascalgamedevelopment.com/member.php?144-WILL): I am still thinking about which debugger to use. For now, I'm thinking about GNU Debugger. But, I will leave the debugger tool for the last, since it is the hardest thing to implement. I suppose that I can use the GND externally, like I'm using Free Pascal. What I'm doing is executing the program by command line from my IDE, and redirecting the output messages to my IDE.

code_glitch (http://www.pascalgamedevelopment.com/member.php?1691-code_glitch): Yes, it will have a Object Hierarchy(or Browser). I just asked in the facebook where should I put this browser(together with the "manager frame", or in a new frame on right side of the screen?).

AirPas (http://www.pascalgamedevelopment.com/member.php?18951-AirPas): Thank you.

News/Information:
Done - The automatic inclusion of the keyword "end" when click [Enter] was implemented. This is the smart auto-indentation.
Done - For syntax highligh, I'm using Synedit.
Doing - I'm working on the auto-complementation tool.
Doing - Browser for classes/variables, procedures/functions.
Not Done - The program does't have already a Syntax analysis(or parser), but will have. I have created a parser months ago for my Game Engine, and it is working perfectly. I will just include the parser on this project.

code_glitch
25-03-2012, 05:49 PM
Any download links, or SVN repositories we should be looking at for the code under development?

FelipeFS
25-03-2012, 06:24 PM
code_glitch (http://www.pascalgamedevelopment.com/member.php?1691-code_glitch): For now, the project is still closed-source. Because the parser I'm using is inside the unit of my Game Engine. I will make a new unit, just with the parser. Then I'll make it open-source.

I have posted the link for download before: https://skydrive.live.com/?cid=bbf7f0cd6062d52e&id=BBF7F0CD6062D52E!178

UPDATE: The browser is working! See the screenshot: [Link] (https://lh6.googleusercontent.com/-FKFv5c_WKm8/T2-B5FqeKaI/AAAAAAAABG0/mmqLv92RkL4/s1024/DevPascal004.PNG)

Andru
26-03-2012, 07:36 AM
I just asked in the facebook where should I put this browser(together with the "manager frame", or in a new frame on right side of the screen?).
I like to see nothing on left side, only line numbers and code :) But many others put something there. So, provide possibility to configure environment, and everybody will be hapy :)

Your project works on my computer at work with Windows 7. But there are some bugs/etc.:
- custom caption not a good idea, because people expect maximizing of window when they double click on it, and custom theme looks not good, I prefer to see what I configured in system
- window doesn't minimize after clicking on icon in taskbar
- as I understand editor support UTF-8, but only if there is a BOM code at start of file, it will be a good idea to have option for default encoding somewhere in preferences

About the compiler preferences - take them from Lazarus, because there they placed good :)

FelipeFS
26-03-2012, 04:22 PM
Andru: Thank you for your answer! The custom caption will be optional. So, the user will be able to change between the custom and the standard caption style.
I will take a look to the design of "Lazarus Preferences" window.

as I understand editor support UTF-8, but only if there is a BOM code at start of file, it will be a good idea to have option for default encoding somewhere in preferences
It is the first time I'm dealing with this issue. I wasn't even thinking about this issue.
Do you think this will solve:
Instead of use the component SaveDialog, I will put SaveTextFileDialog, which allows to choice between the formats. And, according to the selected format, I will use the function

TStrings.SaveToFile(Name : String; Encoding : TEncoding);
?

Andru
26-03-2012, 05:42 PM
Do you think this will solve:
Instead of use the component SaveDialog, I will put SaveTextFileDialog, which allows to choice between the formats. And, according to the selected format, I will use the function
It was not about saving the file, it was about opening and editing :) Here is an example (http://ompldr.org/vZDVwcQ) of file which is encoded as UTF-8, but without a BOM bytes at start. Correct version of it should looks like:


program demo;

begin
// Here should be a Russin text
writeln( 'Вот тут вот русский текст :)' );
end.

FelipeFS
26-03-2012, 06:49 PM
Thanks Andru for your help! I think the problem was finally solved!
I was loading the file directly using the function TWideStrings.LoadFromFile(String);

Instead of that, I'm using now the class TStreamReader:
- First I load the file using TStreamReader.Create(FileName, TEncoding.UTF8);
- This way, the IDE will always assume that the file is a UTF8.
- As far I tested, even if the file is not UTF8, the file is loaded correctly;
- After load in the TStreamReader, I call the function TWideString.Text := TStreamReader.ReadToEnd;

I have a new idea for Layout managment. Since I'm not working with the docking system provided by Delphi, I will create a new form(borderless) which will show the possible layouts combination:
773
Then, you will just select the layout, or make any of the frames visible/invisible.

code_glitch
26-03-2012, 08:59 PM
Woah, this is indeed looking good :) Looking forward to future releases with great anticipation now. Can't wait for the source to be able to compile it for linux (if at all possible due to delphi roots), although wine does a very good job making the exe run.

FelipeFS
28-03-2012, 08:27 PM
Some changes - Instead of use a lot of components to make the options, the options will be put inside a table(TValueListEditor - with some custom events):
774775
Inside of that yellow box, there will be tips for each selected option.

AirPas
28-03-2012, 08:45 PM
i am sure there will be a alot of people loving this IDE

FelipeFS
31-03-2012, 07:31 PM
"Good News Everyone! I have just invented a way that allows the user toggle between the prototype methods and its implementation automatically" -Professor Hubert J. Farnsworth

- This feature is not fully implemented. There are still some bugs(actually, exceptions to be made), because of that, the program may crash if the method does not have a pair. What you can do is toggle between the methods that have a owner class.
In Delphi, you can use this feature holding CTRL+Mouse Left Button, on my IDE, you right click in the word, and choice the menu option "Find complementation".
I'm trying to make a shortcut like in Delphi.

-Another feature I will make is a toolbar to help to format the code(This toolbar is above the text editor, and it will be possible to make it invisible).

[Download Link] (https://skydrive.live.com/redir.aspx?cid=bbf7f0cd6062d52e&resid=BBF7F0CD6062D52E!180&parid=BBF7F0CD6062D52E!176&authkey=!AKf8Ct8ilU1qEuA)

Darthman
12-04-2012, 05:39 AM
I think that typically most IDE have save problems. First of all - design. I mean lack of design. Both visual and usability.
At this point I try to develop IDE for HLSL shaders. And it's quite difficult I say.
Some time ago I use my own component for code edit and in the end it was terrible in usability (however it looks very nice).
Then I changed it with SynEdit and it was disaster in both visual and usability.
Now I write my new component for it. It's not completed yet and not all features works properly (Actually I working on that), but looks perfect.

What I want to say? You must create really comfortable editor. More to say it must be not just clone of the existing ones. Try not to copy it, old IDEs have a lot of senseless solutions.

And by the way - you doing a great job man. Keep going!

FelipeFS
20-05-2012, 09:47 AM
Thinking about make the project open-source already. But, I'm reading some articles about licensing(GLP or LPGL), so anyone will be able to help with the project.

Also, I'll make a documentation to make easy for developers understand the code.

This is it, I'm not with time to work with the project at this moment(working more with my game engine). But it is still, and will continue, alive.
:)

FelipeFS
01-06-2012, 03:32 PM
I'm trying to use the compiler externally, so I'm using a unit which I can compile using the FreePascal IDE, but I'm not getting it to compile using command line. These are the commands:

FPC -Rdefault
-Sc -Sg -Si -Sh -SIcom -vv -vw -vl
-FuD:\FPC\units\i386-win32\
-FuD:\FPC\units\i386-win32\*
-FuD:\FPC\units\i386-win32\rtl\
-FuD:\FPC\units\i386-win32\lcl\
-FuD:\FPC\units\i386-win32\lcl\*
-FuD:\FPC\units\i386-win32\lcl\units\i386-win32\
-FuD:\FPC\units\i386-win32\lcl\interfaces\win32\
-FuD:\FPC\units\i386-win32\lcl\units\i386-win32\win32\
-FuD:\Arquivos\Desenvolvimento\Programação\Projetos \
-FiD:\FPC\units\i386-win32\lcl\include\
-FiD:\Arquivos\Desenvolvimento\Programação\Projetos \
-FlD:\FPC\units\i386-win32\lcl\*
-FoD:\Lazarus\lcl\units\i386-win32\
-FoD:\Lazarus\lcl\* -FoD:\Lazarus\lcl\units\*
-TWin32 -g- -p- -b- -Mfpc -XS -Cp80386 -Op80386
D:\Arquivos\Desenvolvimento\Programação\Projetos\M EGameEngine.pas

I recieve this message:
control(935,27) Error: Identifier not found "TPopupMenu"

Does anyone know what the problem is?

FelipeFS
06-06-2012, 08:43 PM
Hello, everybody. Some updates:


1# - It's possible to change the theme of the editor[Image Original Size] (https://lh5.googleusercontent.com/-frGzMc6NUgI/T8-96TKAZmI/AAAAAAAABMI/Wmf_vQWV09A/s1024/ME001.PNG):
https://lh5.googleusercontent.com/-frGzMc6NUgI/T8-96TKAZmI/AAAAAAAABMI/Wmf_vQWV09A/s600/ME001.PNG



2# - The browser can show the functions and procedures of each class:
https://lh3.googleusercontent.com/-JNm3HwrKNJM/T8-96TCKrWI/AAAAAAAABMA/oG3sPSTDZNA/s800/ME002_Browser.PNG

3# - All FPC options(command line options) are already manageable by the IDE;

4# - In the preferences window you can change the theme and set all the FPC options:
https://lh4.googleusercontent.com/-vJ5LNGH0QyQ/T8-96avjkyI/AAAAAAAABME/QwkANPNdS_Y/s800/ME003_PreferencesEditor.PNG


QUESTION: I'm thinking about put a option where the IDE would load ALL units which are in a "standard directories" and parser them. This way, I could put an autocomplete tool in the editor, like this:
http://www.tmssoftware.com/advmemo5.gif

But, to do this, the programmer will need the source-code(the .pp file) of each unit.

Do you think it is a good idea? Also, anyone knows anything about my last post?

pitfiend
07-06-2012, 02:59 AM
QUESTION: I'm thinking about put a option where the IDE would load ALL units which are in a "standard directories" and parser them. This way, I could put an autocomplete tool in the editor, like this:
http://www.tmssoftware.com/advmemo5.gif

But, to do this, the programmer will need the source-code(the .pp file) of each unit.

Do you think it is a good idea?

I think you could create a database with all that definition stuff, that way you don't need the source code. This also allow to use other language provided the right declaration database.

FelipeFS
07-06-2012, 03:14 AM
It's really something like that I have in mind. But, when the user add another source-code, the program will need to parser and add the new stuff in the data-base(which will be a XML tree).

pitfiend
07-06-2012, 03:51 AM
As I see it, it's a two step process. First, the bigger, you have a database for the standar functions, procedures and classes. Second, you parse the user sources to add her new classes, functions and procedures. The second step can be done when you parse the code for highlights for example.

FelipeFS
28-06-2012, 08:31 PM
I'm solving some memory leaks, and I have made some improvements in the user interface inspired by the new VS 2011 interface - and thinking about change the icon colors to grayscale like in VS 2011, because, let's admit, that gray interface is good because don't do a visual mess:

871

New tabs styles:
http://2.bp.blogspot.com/-mN1DOzcSHWU/T-y3oJbtvGI/AAAAAAAABNk/iCcBw5UGPXo/s800/MEDevPascalUITab001.PNG

http://2.bp.blogspot.com/-dJ8WzReGvgo/T-y3oHtnnhI/AAAAAAAABNc/ZiWmGZjZy4s/s800/MEDevPascalUITab002.PNG

http://1.bp.blogspot.com/-DlVFEOSdUbE/T-y3o4s5_pI/AAAAAAAABOA/1-mUFUBUzq0/s800/MEDevPascalUITab003.PNG

http://1.bp.blogspot.com/-Qj4wB3xohwI/T-y3owxwh6I/AAAAAAAABNw/ZG7DPxU-iDI/s800/MEDevPascalUITab004.PNG

http://1.bp.blogspot.com/-922N0W1gN4U/T-y3pBvp77I/AAAAAAAABN8/YeWaGY3zx0Y/s800/MEDevPascalUITab005.PNG

Super Vegeta
28-06-2012, 09:43 PM
Looks nice. Hope to see this around soon. :)

de_jean_7777
29-06-2012, 06:48 AM
Looks great. Always nice to fix memory leaks.

AirPas
29-06-2012, 02:13 PM
can you tell us when this IDE will be ready to use ?
i know its not easy , but i think this will be the only alternative to lazarus

good luck

FelipeFS
30-06-2012, 04:51 PM
It's hard to tell, but I hope to release a usable(not stable) version until the end of July. =)

FelipeFS
12-07-2012, 07:46 PM
Hello guys, I'm releasing a beta for Win32. I ask your for ideas, for example I have two ideas now:


Create a design-mode, which will allows create code in real-time using diagrams;
Create the historic, which will list the backups;
For a distant future, make possible the creation of plugins(I have an idea on how to accomplish that);


The ideas can be about anything to make the coding easier and faster.
Also, check for bugs, particulary bugs related to text-format(Unicode, UTF-8, ANSI/ASCII). And, since it's a beta, create a backup of the files that you will open with the IDE.



Source-Code:
The source-code is included. You need to install the package ProPackIDE, which contains some custom components.

Known bug:

The option to toggle between the prototype and implementation of a method - sometimes it doesn't work;


Help:
If you are good with conversion, I would appreciate the converson of the package ProPackIDE to Lazarus code, this would accelerate the release of the Linux and MacOS versions. Also, I will put a list of contributors for the project.




[DOWNLOAD LINK - SOURCEFORGE] (https://sourceforge.net/projects/medevpascal/files/MEDevPascal-Win32/)

FelipeFS
12-07-2012, 08:42 PM
Some tips:



There are a fullscreen-mode(press F11);
For a better fullscreen, you can hide the Manager, Browser, Messenger and status bar. It will give you much more space;
When clicking "Save" or "Save As...", you will save the active file, not the file of the selected tab;
To compile a file, you must save it first. The IDE don't do that automatically - because it is not stable, so I don't want to create chances to anyone lose its data.

code_glitch
17-07-2012, 01:30 PM
Starting to look good there Felipe. Though I'm not sure if its a WINE issue or the code itself but hitting tab for an indent doesnt type in the editor, instead it follows the 'next object' behaviour of other GUIs. Though for me, the moment it gets auto-completion it'll definitely be a contender for my favourite IDE spot :)

FelipeFS
21-07-2012, 02:29 PM
Thank you code_glitch! This problem was solved!

And I started to implement the auto-completion, but right now I'm trying to migrate to Linux Ubuntu, and will take some days to bring some updates...