cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

get project path from sandbox (offline from project.pj file)

tdalon
12-Amethyst

get project path from sandbox (offline from project.pj file)

Hi

Do you know a way to get the project path of a given sandbox from the information contained in the project.pj file?

I had an heuristic like this:

If second line contains port information then parse 5th line like explained below.

This is the case for the sandbox root.

Use File:1.8

- atgrzas071:7001 /Controls/project.pj ÿÿÿÿ 29108/project.pj ÿÿÿÿ DRE0002/project.pj ÿÿÿÿ AVLab_m/project.pj

+ Ãsandbox.attribute._mks_sparse=false,sandbox.attribute._mks_scope=any,sandbox.attribute._mks_shared=false,sandbox.attribute._mks_lineterminator=native,sandbox.attribute._mks_compute_checksums=true

?€y Ç /%æX €

> AVLab_m/project.pj */Controls/29108/DRE0002/AVLab_m/project.pj

...

Else parse second line.

Example:

Use File:1.8

> doc/project.pj ./Controls/29108/DRE0002/AVLab_m/doc/project.pj

The parsing of the given line can be done by looking for the string between the 2 project.pj ( tok=regexp(line,'/project.pj(.*/project.pj)','tokens');).

Unfortunately I encountered 1 project.pj that looks like this:

Use File:1.8

- atgrzas071:7001 /Controls/project.pj ÿÿÿÿ 31361/project.pj ÿÿÿÿ ARE2043/project.pj ÿÿÿÿ Functions/project.pj ÿÿÿÿ LamSp/project.pj ÿÿÿÿ LamSpBas/project.pj

> LamSpBas/project.pj +/PSL/CmbEng/LamSp/AA000/LamSpBas/project.pj

! #sandbox.attribute._mks_sparse=false

! Gsandbox.attribute._mks_sparse=false,sandbox.attribute._mks_shared=false

! tsandbox.attribute._mks_sparse=false,sandbox.attribute._mks_shared=false,sandbox.attribute._mks_lineterminator=native

+ £sandbox.attribute._mks_sparse=false,sandbox.attribute._mks_shared=false,sandbox.attribute._mks_lineterminator=native,sandbox.attribute._mks_compute_checksums=false

?€y Ç /%æX €

` doc/project.pj

` label/project.pj

` mdl/project.pj

` mdl_test/project.pj

` src/project.pj

` src_test/project.pj

_

”§K =§Aþè

1.6 $(projectdir)/LamSpBas.AVLab

Any generic rule known how Integrity builds the project.pj and inference rule how to get the project path out of it (better than my guessing?).

Many thanks

Kind regards

Thierry

(Of course I could get the project information easily via CLI and Integrity connection but my goal here is to avoid having to connect to Integrity to get it)

ACCEPTED SOLUTION

Accepted Solutions

Hi Thierry,

You could try the "si sandboxes" command since it does not require a server connection. What you will see is output similar to below:

c:\Sandbox\BestNewProjectEver\project.pj -> /BestNewProjectEver/project.pj (SERVERNAME:PORT)

The first part before the arrow is the sandbox location, the part after the arrow is the Integrity project the sandbox is built from, and the last bit is the server info. Looking at the binary project.pj is often difficult and time consuming, so I would avoid it if possible.

View solution in original post

2 REPLIES 2

Hi Thierry,

You could try the "si sandboxes" command since it does not require a server connection. What you will see is output similar to below:

c:\Sandbox\BestNewProjectEver\project.pj -> /BestNewProjectEver/project.pj (SERVERNAME:PORT)

The first part before the arrow is the sandbox location, the part after the arrow is the Integrity project the sandbox is built from, and the last bit is the server info. Looking at the binary project.pj is often difficult and time consuming, so I would avoid it if possible.

tdalon
12-Amethyst
(To:JoeBartlett)

Thank you very much for the hint.

Announcements


Top Tags