How to use relative paths in .prj file?

How to use relative paths in .prj file?

6
NewbieNewbie
6

    Mar 16, 2017#1

    Hello,
    I want a relative path in:

    Code: Select all

    <Files>
        <File>./src/</File>
    </Files>
    
    But it is relative to working directory of UEX, not the .prj file!

    So I need absolute paths:

    Code: Select all

    <Files>
        <File>/prjs/prj1/trunk/src/</File>
    </Files>
    
    So the big problem is when I move the project (when I work in another path/branch), the .prj still contain folder that go to the first folder!

    Is there a workaround?

    I have UEStudio under Windows and UEX under Linux, but can't use UEX with that!

    6,688587
    Grand MasterGrand Master
    6,688587

      Mar 17, 2017#2

      I don't use UEX, just UE on Windows and UEStudio. In UE for Windows the paths to project files/folders are stored relative to project directory if once configured. So I usually set the project directory after creating a project and than add the files/folders using group or folder method depending on project which UE/UES adds with paths relative to defined project directory. So I would need to modify just 1 path, the project directory path in project settings dialog, if I would have projects stored in different directories on multiple computers.

      Well, I have my projects stored on multiple computers, but all with the same path. However, on Windows command subst can be used to map a drive to a folder, i.e. drive P: is mapped to the folder containing all projects independent on where the projects folder is located on the multiple machines. And in all projects P:\... is used as project directory. Another method on Windows is using junction/symbolic links to get different project folders mapped to same root path, i.e. all projects are linked to C:\Projects\... independent on real storage location. Linux supports also the concept of symbolic links to have a common folder on all computers independent on where the folders are really stored.
      Best regards from an UC/UE/UES for Windows user from Austria

      6
      NewbieNewbie
      6

        Mar 17, 2017#3

        Thanks for reply,
        uex v16.1.0.18

        The source tree is often automatically generated...

        I can't modify manually each .prj.
        It isn't a time problem, it is that isn't enough reliable for us.

        My source code is automatically duplicate in more than 30 folders with the .prj !!!

        For example, on one of our projects, that is under SVN (subversion):
        The tree is like:
        repo/trunk/ue.prj
        repo/tags/v0.1/ue.prj
        repo/tags/v1/ue.prj
        repo/tags/v2/ue.prj
        repo/tags/v2.1/ue.prj
        repo/branches/features/dev1/ue.prj
        repo/branches/features/dev1/ue.prj
        repo/branches/fixes/ticket123/ue.prj
        repo/branches/fixes/ticket36/ue.prj
        repo/branches/maintenance/v1.x/ue.prj
        repo/branches/maintenance/v1.x/ue.prj

        Even more, when I build project, in each build directory, I copy source code.

        Relative path, for project, is a very basic feature that a lot of project editor have.

        6,688587
        Grand MasterGrand Master
        6,688587

          Mar 18, 2017#4

          I created on Windows the directory C:\Temp\Test, copied some *.html files into this directory and copied also two other directories with *.html and other files into this directory.

          Next I created a new project Test in C:\Temp\Test resulting in having in this directory additionally Test.prj (project file) and Test.pui (user interface/workspace file).

          Then I the added *.html files in C:\Temp\Test, added *.html files in C:\Temp\Test\SubFolder1 and added the folder C:\Temp\Test\SubFolder2 with filter *.html and finally looked on contents of C:\Temp\Test\Test.prj.

          It contained:

          Code: Select all

          [Project ID]
          	Signature=UE Proj: v.1
          [Project Information]
          	Use Relative Directory=1
          	Relative to Project File=1
          	Include Sub Directories=1
          	Project Tagfile=
          	Project Wordfile=
          	Project TpFile=
          	Filter=
          	Create Tagfile=0
          [Files]
          	0=500.html
          	1=401.html
          	2=403.html
          	3=404.html
          	4=SubFolder1\file1.html
          	5=SubFolder1\file2.html
          	6=SubFolder1\file3.html
          	7=SubFolder1\file4.html
          	8=SubFolder1\file5.html
          	9=.\SubFolder2\
          [Group Filter]
          	.\SubFolder2\=*.html
          
          So on Windows the project files and folders are stored by default with paths relative to the project file.

          I don't know what a *.prj file created by UltraEdit for Linux contains and if UEX adds projects files and folders by default also with relative paths as UltraEdit for Windows does. It looks like this is not the case.

          Is there a setting to add files/folders with paths relative to project file in project file created by UE for Linux as in *.prj file created by UE for Windows?

          Please send a feature request email to IDM support for UEX if there is no such project setting in project file created by UEX and there is no possibility to use on Linux projects with project files/directories with relative paths.

          BTW: Test.pui was created in C:\Temp\Test because configuration setting Save project information for use on multiple systems was checked and Store project user interface (pui) files in profile directory was not checked at Advanced - Settings/Configuration - File Handling - Advanced.
          Best regards from an UC/UE/UES for Windows user from Austria

          6
          NewbieNewbie
          6

            Mar 20, 2017#5

            my uex.prj below.

            main.c isn't opened relative to .prj, but relative to the directory where uex was launch !!!
            so, uex look for /home/david/main.c

            Code: Select all

            <?xml version="1.0" encoding="ASCII"?>
            <!DOCTYPE PRJ SYSTEM "uex.dtd">
            <PRJ>
              <Project_Information>
                <Use_Relative_Dir>1</Use_Relative_Dir>
                <Relative_to_Project_File>1</Relative_to_Project_File>
                <Include_Sub_Dir>1</Include_Sub_Dir>
                <Create_Tagfile>0</Create_Tagfile>
                <Filter/>
                <CTags_Support>0</CTags_Support>
                <Word_File/>
                <Project_Directory>/myprojDir</Project_Directory>
                <Tag_File/>
              </Project_Information>
              <Files>
                <File>main.c</File>
              </Files>
            </PRJ>
            

            6,688587
            Grand MasterGrand Master
            6,688587

              Mar 21, 2017#6

              Well, please report this issue to IDM support by email with a step by step instruction how to reproduce this issue. That's all I can suggest.
              Best regards from an UC/UE/UES for Windows user from Austria

              6
              NewbieNewbie
              6

                Mar 21, 2017#7

                Hello,
                It's done.
                They wrote:"this is not supported, but it has been requested before."

                I will do it.

                Just need now to wait for a new version...