0

I've seen several questions along the lines of Making a Windows shortcut start relative to where the folder is? but the answers to these questions all seem to be in relation to executing a batch file or .exe.

In my set up, I have different versions of the application, and the application references different modules within it's own version.

Here is how the layout looks on Linux. The easy thing about this is that when I want to upgrade to the latest version (or roll back from the previous version) it's simply a matter of changing which softlink "myapp" points to.

/var/www
        /myapp => myapp-v-1.0.0
        /myapp-v-1.0.0
                      /common
                             /x1
                             /x2
                      /modulea
                              /x1 => ../common/x1
                              /x2 => ../common/x2
                      /moduleb
                              /x1 => ../common/x1
                              /x2 => ../common/x2
        /myapp-v-2.0.0
                      /common
                             /x1
                             /x2
                      /modulea
                              /x1 => ../common/x1
                              /x2 => ../common/x2
                      /moduleb
                              /x1 => ../common/x1
                              /x2 => ../common/x2

Here is an example of the layout I want on Windows.

C:\Company\Product
                  \Version-1.0.0
                                \Common
                                       \X1
                                       \X2
                                \ModuleA
                                        \X1 => ..\Common\X1
                                        \X2 => ..\Common\X2
                                \ModuleB
                                        \X1 => ..\Common\X1
                                        \X2 => ..\Common\X2
                  \Version-2.0.0
                                \Common
                                       \X1
                                       \X2
                                \ModuleA
                                        \X1 => ..\Common\X1
                                        \X2 => ..\Common\X2
                                \ModuleB
                                        \X1 => ..\Common\X1
                                        \X2 => ..\Common\X2

How can I create relative shortcuts to directories on Windows? Is it possible? If not, how do you suggest approach the above versioning issue?

Community
  • 1
  • 1
magnus
  • 4,031
  • 7
  • 26
  • 48

1 Answers1

0

You can use external definitions for this. They also work if you only checkout one of the ModuleX folders and are platform independent.

Another possibility which I actually wouldn't recommend may be symlinks. But these would only work on unix-like os.

mellow
  • 253
  • 1
  • 7