| Multiple Versions of symfony on Windows [message #63389] |
Fri, 17 October 2008 20:40  |
AgentPhoenix Messages: 9 Registered: July 2008 |
Junior Member |
|
|
|
I'm trying to set up symfony 1.0.17, 1.1.4 and the 1.2 branch on a Windows machine so multiple applications can be developed on different symfony versions. I've followed http://symfonynerds.com/blog/?p=123 to the letter, but obviously ln -s doesn't work on a Windows machine. How do I create symbolic links to finish this up and be able to use multiple versions?
|
|
|
|
| Re: Multiple Versions of symfony on Windows [message #63408 is a reply to message #63389 ] |
Sat, 18 October 2008 11:53   |
Targa Messages: 9 Registered: October 2008 Location: Siberia =) |
Junior Member |
|
|
Hi!
Junction tool is pretty cool but requires NTFS. So if you don't use NTFS, there is another way.
In our case (multiple symfony instances on Windows) you could use *.bat files to "emulate" symlinks on Windows.
Put code like this to symfony12.bat:
@echo off
<path_to_your_symfony_1.2_dir>\data\bin\symfony.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
Now, if you call you'll see something like this: symfony version 1.2.0-DEV (C:\server\php5\symfony_1.2\lib) (my <path_to_your_symfony_1.2_dir> == C:\Server\php5\symfony_1.2). Note that symfony12.bat should be in your PATH.
Repeat this to each symfony version you want =)
P.S.
In theory there is no difference between theory and practice. In practice - there is.
|
|
|
|
|
|
|
|
|
| Re: Multiple Versions of symfony on Windows [message #66690 is a reply to message #63408 ] |
Wed, 03 December 2008 20:48  |
rarerules Messages: 17 Registered: February 2007 |
Junior Member |
|
|
| Targa wrote on Sat, 18 October 2008 05:53 | Hi!
Junction tool is pretty cool but requires NTFS. So if you don't use NTFS, there is another way.
In our case (multiple symfony instances on Windows) you could use *.bat files to "emulate" symlinks on Windows.
Put code like this to symfony12.bat:
@echo off
<path_to_your_symfony_1.2_dir>\data\bin\symfony.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
Now, if you call you'll see something like this: symfony version 1.2.0-DEV (C:\server\php5\symfony_1.2\lib) (my <path_to_your_symfony_1.2_dir> == C:\Server\php5\symfony_1.2). Note that symfony12.bat should be in your PATH.
Repeat this to each symfony version you want =)
P.S.
|
Actually you should replace this with:
<path_to_your_symfony_1.2_dir>\data\bin\symfony.bat %*
Because commands with arguments won't be passed correctly. For example:
symfony generate:app --escaping-strategy=on --csrf-secret=Unique$ecret frontend
won't work since DOS interprets the equals sign as an argument delimiter, instead of as part of the argument itself. If you use %* instead, all arguments will be passed "as is".
|
|
|