It is currently Tue Jan 19, 2021 7:19 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Is it possible to write to project file with external tool?
PostPosted: Tue Sep 08, 2015 9:03 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 28, 2003 12:01 am
Posts: 531
Hello,

probably this can only be answered by Purebasic team:

An external tool can get full path and filename of currently loaded project file with the environment variable PB_TOOL_Project.
Is it possible to change the project file with external tool?

I want to save own project specific information inside the pbp file, similar to the following code:
Code:
<project xmlns="http://www.purebasic.com/namespace" version="1.0" creator="PureBasic 5.40 LTS Beta 3 (Windows - x64)">
  <section name="config">
    <options closefiles="1" openmode="2" name="project-name"/>
  </section>
  ...
  <section name="externalTool:information">
    ...
  </section>
</project>

Does the IDE allow this?

Thank you for the information,
guido

_________________
Windows 10 / Windows 7
PB Last Final / Last Beta Testing


Top
 Profile  
Reply with quote  
 Post subject: Re: Is it possible to write to project file with external to
PostPosted: Wed Sep 09, 2015 10:13 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 28, 2003 12:01 am
Posts: 531
OK!

I tested it myself.
It is possible to write own data to pbp file, but it will be overwritten with the pbp contents, which was already loaded by the IDE, after closing the project or exiting the IDE.

This means: it is not possible to use the pbp file to save own project specific data.

_________________
Windows 10 / Windows 7
PB Last Final / Last Beta Testing


Top
 Profile  
Reply with quote  
 Post subject: Re: Is it possible to write to project file with external to
PostPosted: Thu Sep 10, 2015 8:04 am 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
I think a workaround might be to put your data into the project's comment section ("Project Options" -> "Comments").

_________________
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Is it possible to write to project file with external to
PostPosted: Thu Sep 10, 2015 9:14 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 28, 2003 12:01 am
Posts: 531
c4s wrote:
I think a workaround might be to put your data into the project's comment section ("Project Options" -> "Comments").

Thank you for your hint.

I was searching a way to add user specific project options to pbp file with an "external IDE Tool" (Tools -> Configure Tools...)!
I do not want to write it by my own in to the comment section!

I think the best way is to create a new file for my user specific project settings based on the project file name!
==> project file: /path/to/project/file/project.pbp
==> user specific project file: /path/to/project/file/project.pbp.user

_________________
Windows 10 / Windows 7
PB Last Final / Last Beta Testing


Top
 Profile  
Reply with quote  
 Post subject: Re: Is it possible to write to project file with external to
PostPosted: Thu Sep 10, 2015 10:02 am 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
helpy wrote:
I was searching a way to add user specific project options to pbp file with an "external IDE Tool" (Tools -> Configure Tools...)!
I do not want to write it by my own in to the comment section!
That's what I meant. Isn't it possible to write into the comment section of the project file after the file has been updated by the IDE?

_________________
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Is it possible to write to project file with external to
PostPosted: Thu Sep 10, 2015 10:48 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 28, 2003 12:01 am
Posts: 531
c4s wrote:
helpy wrote:
I was searching a way to add user specific project options to pbp file with an "external IDE Tool" (Tools -> Configure Tools...)!
I do not want to write it by my own in to the comment section!
That's what I meant. Isn't it possible to write into the comment section of the project file after the file has been updated by the IDE?


I was writing to the xml file (created a complete new section there).
==> If the project is closed or the IDE is closed, the IDE overwrites the pbp with its own preloaded version!

The same would happen if i write the comment in to the pbp file!

But I think that the other option with an seperate "user project file" is the best way for now.

_________________
Windows 10 / Windows 7
PB Last Final / Last Beta Testing


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye