[Implemented] Project Files For The PureBasic Editor

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] Project Files For The PureBasic Editor

Post by BackupUser »

Restored from previous forum. Originally posted by SoulTaker.

Fred,

Could we get Projects for the PureBasic Editor in Version 3.50

Say:

*.PBP - PureBasic Project Files.
*.PB - Pure Basic Source Files.
*.PBI - PureBasic Include Files.
*.RES - PureBasic Resource Files.

The Reource Files could be linked to the program with the PureBasic ver 3.50 Compiler?


Abit BD7-II Raid P4 1.9 gHz 384 Ram Xtasy GFroce 3 TI 200 CD-RW DirectX 9.0 Beta 3 Sound Blaster Live! XP Pro, Registered PureBasic User Version 3.40 For Windows.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

I have 'Project Management' code in my PureGUIDE (the only thing what is already finished - this project is stopped...).
The Functions are 'New Project', 'Open Project', 'Save Project' and 'Save As Project'.
I use my PureGUI Wrapper for it (automatic numbering of gadgets, memory, directories...) but it should be easy to make it 'normal'.

I could rip it out and make it suitable for the PureBasic Editor.

'New Project' = makes a new 'Project Directory' and a new 'Source Code File'
The new directory and the MainFile name are the same. Except the file has an extension.

'Open Project' = Opens a project -> switches to the directory (and it could open the main file)

'Save Project' = should save all open files from this Project. (need to be extended because the Editor can handle multiple files now)

'Save As Project' = Copies all Files from A to B and renames the Main File.
Don't forget to make a 'Save Project' first...

All Main Files have the extension *.pbg for now, because it was intended to have a GUI in the main file (but I can make *.pb out of it)

All Include Files have the extension *.pbi

There are no Project files for now, but I can make one to put some log stuff in it, or whatever you want.

BTW: Instead of the '*.res' extension for resources I would prefer '*.pbr'
Also a thought: for the include files that are only used as Header files to use *.pbh.

Tell me what you think.


Have a nice day...

Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.
Originally posted by SoulTaker
Could we get Projects for the PureBasic Editor in Version 3.50
You could probably have all the file formats you like, but what would be in them?



--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

Ok, I modified the code of PureEdit 3.41 (last source code available).
Under 'Files' there is now 'New Project' and 'Open Project'.
You will find the exe file under:

http://fsw.home.attbi.com/PureEdit.zip (The About Window now says Editor 3.41a)

YOU HAVE TO PLACE THE FILE WHERE PUREBASIC.EXE IS (for now).
If you start it you can use it as Editor with the additional 'Project' Menu Items.

Please tell me if you want more Menu Items like 'Copy Project to...' or whatever and what it should do.
Please tell me also if you don't need it at all. :)

If the majority of YOU like to have a project management build in in the editor - I will send the modified code to Danilo so he can place it in the latest source tree (if Fred agrees...).

Have a nice day...

Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by freak.

I don't like this Project management stuff.

Look, how many different extensions have been mentioned here?
*.PBP
*.PB
*.PBI
*.pbg
*.pbr
*.pbh

What do you need all this stuff for? It's all simply PB code, isn't it?
I mean, i don't want the PB Editor become like Delphi, were it creates a whole
directory of files, of which most of them you don't know what they are for. :cry:

I'd like to keep it simple:
There's a *.pb file, and if you compile that one, it runs. No needed Project files, or Header Files.

Why don't you write that Projects stuff as an external tool, which everyonewho likes it can download?

Well, but that's just my opinion...

Timo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by horst.

> Why don't you write that Projects stuff as an external tool,
> which everyone who likes it can download?

I agree. There are too many concepts of how to handle projects,
so it would be better if everyone could write or use his/her own
project handler.

> I'd like to keep it simple:
> There's a *.pb file, and if you compile that one, it runs.

Well, PureBasic should at least handle *pb and *.pbi, and both
should be associated with PureBasic on installation.

But many users may want to create their own extensions for
special purposes. I suggest that the editor offers all *.pb and
*.pb? files for opening, and the Save AS dialog should also accept
*.pb? files. Currently, when I save a file as "blah.pbi" I will
get "blah.pbi.pb"...



Horst
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by horst.

> Why don't you write that Projects stuff as an external tool,
> which everyone who likes it can download?

I agree. There are too many concepts of how to handle projects,
so it would be better if everyone could write or use his/her own
project handler.

> I'd like to keep it simple:
> There's a *.pb file, and if you compile that one, it runs.

Well, PureBasic should at least handle *pb and *.pbi, and both
should be associated with PureBasic on installation.

But many users may want to create their own extensions for
special purposes. I suggest that the editor offers all *.pb and
*.pb? files for opening, and the Save AS dialog should also accept
*.pb? files. Currently, when I save a file as "blah.pbi" I will
get "blah.pbi.pb"...



Horst
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by TheBeck.

*EDIT* I retract my statement due to the fact I do not have enough experience with PureBasic to make an educated comment here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by plouf.

Personally when i save a new program
i right click in the save requester
and create a drawer in there i throw
.pb ,images, text's needed for this program etc
so its like projects but simple :)
so i believe that if projects added should be an option since as freak said not everybody would like to mess with misc files for a simple project

Christos
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
Originally posted by horst


Well, PureBasic should at least handle *pb and *.pbi, and both
should be associated with PureBasic on installation.

But many users may want to create their own extensions for
special purposes. I suggest that the editor offers all *.pb and
*.pb? files for opening, and the Save AS dialog should also accept
*.pb? files. Currently, when I save a file as "blah.pbi" I will
get "blah.pbi.pb"...
Well horst this is because *.pbi is NOT an OFFICIAL PureBasic extension.
So this is not a bug in the editor!

If you look at my templates on Pauls resource site, I started to use this extension because I wanted to make sure, that after month of not touching code, to know wich one is the main file and so forth.

If you look at the official editor code 3.41, you will see that every file has the extension *.pb.
And if you start to work with somebody else code you start searching for the main file, and you look through the code to get an idea how the code skeleton looks like.
It's easier to have different extensions for this.


Have a nice day...

Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
Originally posted by plouf

Personally when i save a new program
i right click in the save requester
and create a drawer in there i throw
.pb ,images, text's needed for this program etc
so its like projects but simple :)
so i believe that if projects added should be an option since as freak said not everybody would like to mess with misc files for a simple project
You haven't looked at the Editor what I mentioned above, did you?

The 2 new Menu Items do exacly what you do by hand.
Create a new Project Folder and if you wish, open up the main file of one of your projects.
That's it, no extra file extension is added.
The only thing is that the main code file gets the name of the folder.

You don't have to use the Project Menu Items, the File Menu Items are still there, so nothing has changed.



Have a nice day...

Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by plouf.

You haven't looked at the Editor what I mentioned above, did you?

The 2 new Menu Items do exacly what you do by hand.
Create a new Project Folder and if you wish, open up the main file of one of your projects.
That's it, no extra file extension is added.
The only thing is that the main code file gets the name of the folder.

You don't have to use the Project Menu Items, the File Menu Items are still there, so nothing has changed.



Have a nice day...

Franco

sorry i do not was clear i have take a look at this and i mean
that i do like it this way as it is simple and i also agree
that if prokject like handling added should be this way
i.e. open like projects or like a simple .pb and
projects do not mess with misc files

Christos
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> Well, PureBasic should at least handle *pb and *.pbi, and both
> should be associated with PureBasic on installation.

I know PureBasic doesn't associate *.pbi files itself, but you can
always double-click such a file and tell Windows to open it with
PureBasic. It works -- I've tried it. And PureBasic will even
save (but not "Save As") it with that extension again.


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by SoulTaker.

The reason for a project file is for when you open the Editor you select a project file and it auto loads all the files into the Editor at once.

You dont have to manualily load all the files one at a time.



Abit BD7-II Raid P4 1.9 gHz 384 Ram Xtasy GFroce 3 TI 200 CD-RW DirectX 9.0 Beta 3 Sound Blaster Live! XP Pro, Registered PureBasic User Version 3.40 For Windows.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Frederic already said 1 month ago that
he also wants project-files. :)

You can still use 1-file-sources like now.
The Project-Management is free to use.
Use it or not...

cya,
...Danilo
(registered PureBasic user)
Post Reply