It is currently Mon Jun 17, 2019 11:50 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Command-line project
PostPosted: Sun Jun 24, 2018 7:04 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 470
Location: Doubs - France
I use a little tool to open different projects in the ide (32 or 64 and with different PB version).
To do that, i use a specific PureBasic.prefs for each case, i've changed "DefaultProject = " inside for each PureBasic.prefs with the correct one.

For example
Code:
RunProgram("Purebasic.exe",
"/P C:\Users\user\AppData\Roaming\PureBasic\PIM\PIM_PureBasic.prefs /A C:\Users\user\AppData\Roaming\PureBasic\PIM\PIM_Tools.prefs",
"G:\PureBasic\PureBasic_5_70_x86")

and Pref file
Code:
[Projects]
;
DefaultProject = G:\PureBasic\PureIconManager.pbp



Is there a way to load/close a project in command-line without changing each PureBasic.prefs when the ide opens ?

_________________
A+
Denis


Top
 Profile  
Reply with quote  
 Post subject: Re: Command-line project
PostPosted: Sun Jun 24, 2018 8:17 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 621
Location: France
Just specify the name of the project in the parameters

Code:
IDE$     = "C:\Program Files\PureBasicBeta\PureBasic.exe"
Project$ = "G:\PureBasic\PureIconManager.pbp"
Params$  = "/P C:\Users\user\AppData\Roaming\PureBasic\PIM\PIM_PureBasic.prefs /A C:\Users\user\AppData\Roaming\PureBasic\PIM\PIM_Tools.prefs",
"G:\PureBasic\PureBasic_5_70_x86"

RunProgram(IDE$, Project$ + " " + Params$, "")

DefaultProject is just an option that indicates which project to load by default, if you want one

On my side, I simply use a folder on desktop (or my launcher) in which I put shortcuts on the different files .pbp (but I don't use a project-specific pref file)

:idea: Since PB 5.60, User data can be reach easily using GetUserDirectory(#PB_Directory_ProgramData)
To see what matches #PB_Directory_ProgramData
Code:
Debug GetUserDirectory(#PB_Directory_ProgramData)

It is better to use this because the program variables will follow, even when changing machine or connection type (local (local machine) or network (roaming))

:wink:

_________________
(English is not my native language, I use an online translator)
HP Mini-tower (2012) - Intel i3-3220 @3.30 GHz, 2 cores, 4 threads - 16 Go - Nvidia GT 620 1920x1080 DPI 100%
Windows 10 Family x64 + Linux (Slackware, Debian / Oracle VirtualBox 6.0)


Top
 Profile  
Reply with quote  
 Post subject: Re: Command-line project
PostPosted: Sun Jun 24, 2018 8:41 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 470
Location: Doubs - France
Ok Marc56us

i will try

:wink:

"(but I don't use a project-specific pref file)"

I use it to load the correct project and only this one.

_________________
A+
Denis


Top
 Profile  
Reply with quote  
 Post subject: Re: Command-line project
PostPosted: Sun Jun 24, 2018 9:01 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 621
Location: France
Denis wrote:
I use it to load the correct project and only this one.

PB IDE only loads one project at a time anyway.
To avoid having other independent files loaded at the same time, just set:

Project Option > Project Option > Loading Option > (*) load only sources marked in "Project files"

:wink:

_________________
(English is not my native language, I use an online translator)
HP Mini-tower (2012) - Intel i3-3220 @3.30 GHz, 2 cores, 4 threads - 16 Go - Nvidia GT 620 1920x1080 DPI 100%
Windows 10 Family x64 + Linux (Slackware, Debian / Oracle VirtualBox 6.0)


Top
 Profile  
Reply with quote  
 Post subject: Re: Command-line project
PostPosted: Sun Jun 24, 2018 3:59 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 470
Location: Doubs - France
Marc56us wrote:
Denis wrote:
"G:\PureBasic\PureIconManager.pbp"


So obvious ... I'm really tired
Maybe I'm too old to continue coding ...
Sometimes obvious things escape me... :oops:

Truce of joke :mrgreen: , I'm always curious about everything and I like to have a headache...

Thank you

_________________
A+
Denis


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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