[Implemented] settings saving option

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

[Implemented] settings saving option

Post by lexvictory »

we have an option to disable cursor position saving, so can we also have an option to prevent the IDE from saving the PB version in the file?
i'm using PB files with svn, and this is something that i think could get in the way...
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
Leonhard
User
User
Posts: 55
Joined: Fri Jun 16, 2006 7:43 am

Post by Leonhard »

Write this in the Header of the File.

Example:
;/
;/ File: <your file-name>
;/ PB-Version: 4.10 B3 (or other)
;/

;[...] The Code of the file
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

Leonhard wrote:Write this in the Header of the File.

Example:
;/
;/ File: <your file-name>
;/ PB-Version: 4.10 B3 (or other)
;/

;[...] The Code of the file
what good would that do?
i want to be able to stop the string being written, as i use the same source for windows and linux. i havent run into any issues yet, but i think that it could cause hassles with svn once more than just 1 person (me) is writing to the repository.
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

What we do on our repository is to use the option to save the settings to a separate "project.cfg"
file instead of the end of the sourcefile (Preferences->Editor), and then simply not put the
project.cfg in the repository.

This way everyone can have his cursor position etc saved without getting in the way.
quidquid Latine dictum sit altum videtur
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

does it save all of the settings there?
like saving compile type (windows, dll, console, etc)?

i did see it as an option, but i guess it would just take some setting up if it does store compile type in the project.cfg as well
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

> i did see it as an option, but i guess it would just take some setting up if it does store compile type in the project.cfg as well

Everything is stored separately (the source file then only contains the code you see in the editor, no extra lines)

If you are worried about needing to redo all option when you change this, there is no problem.
The IDE will use the settings at the source end if none are present in the project.cfg, then
when you save the source again, it removes the settings at the source end and stores them in the project.cfg.
So the transition should be without problems.

The only thing that will happen of course is when you checkout your repository
to a new directory/computer, it will have none of these settings attached anymore (as the project.cfg is not included).
Then you either have to redo them all, or manually copy your project.cfg files back.

Maybe i could add a "version control friendly" mode to the IDE or something for this.
I don't have an idea yet on what shape this should take exactly though.
quidquid Latine dictum sit altum videtur
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

freak wrote:Maybe i could add a "version control friendly" mode to the IDE or something for this.
I don't have an idea yet on what shape this should take exactly though.
you could have it so that cursor positions in project.cfg, all compiler settings in the source (ones that didnt change just by opening it somewhere else and saving)
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
Post Reply