Page 1 of 1

I cant install cobra

PostPosted: Fri Sep 28, 2012 6:10 am
by yyooist
I did launch a command prompt as an administrator.
4QT1ME0S5W)9~1Z%~51%[7T.jpg
pic
4QT1ME0S5W)9~1Z%~51%[7T.jpg (35.41 KiB) Viewed 9007 times

Re: I cant install cobra

PostPosted: Fri Sep 28, 2012 10:54 am
by Charles
I haven't seen this before. The contents of the install batch file are:
Code: Select all
@cls
@echo.
@echo Compiling installation program...
@Snapshot\cobra.exe -debug -ert:yes InstallFromWorkspace.cobra SubversionUtils.cobra -- %*
@cd ..\..

Only the line starting with "@Snapshot\cobra.exe ..." is truly essential.

Can you show us the output of "dir" and also "dir Snapshot"?

If you install on C: drive, does the problem go away?

Can you pass "-v:2" to the command? Like:
Code: Select all
bin\install-from-workspace -v:2


Also, instead of a graphic screenshot, please copy the text instead and paste it in your message. Instructions for how to do this are at http://www.howtogeek.com/howto/windows- ... nd-prompt/

Re: I cant install cobra

PostPosted: Fri Sep 28, 2012 7:02 pm
by yyooist
The problem has been solved.thanks.

Re: I cant install cobra

PostPosted: Thu Oct 18, 2012 2:29 am
by vazub
I had this problem as well. It seems that there is "cd .." command missing before the main statement. Inserting it in a batch file fixes the problem. Should look like this:

Code: Select all
@cls
@echo.
@echo Compiling installation program...
@cd ..
@Snapshot\cobra.exe -debug -ert:yes InstallFromWorkspace.cobra SubversionUtils.cobra -- %*
@cd ..\..


On the other hand, I am a bit puzzled with the last statement - "@cd ..\..". What is it intended to do? Simply get to the root folder when the setup finishes?

Re: I cant install cobra

PostPosted: Fri Oct 19, 2012 7:01 pm
by Charles
-- The ReadMe.text says to enter:
Code: Select all
cd CobraWorkspace\Source
bin\install-from-workspace

So the "cd .." would not work. However, if anyone wants to submit .bat/.cmd code that would detect when the person cd's into the bin directory and adjusts accordingly, I'd be happy to incorporate it.

-- Yes the "cd ..\.." gets you out of the installation directory. Without this, some people got confused thinking that they were supposed to be in there and doing something with the package files.

Re: I cant install cobra

PostPosted: Sat Oct 20, 2012 12:33 am
by vazub
Charles wrote:-- The ReadMe.text says to enter:
Code: Select all
cd CobraWorkspace\Source
bin\install-from-workspace

So the "cd .." would not work.


Perhaps, those instructions were a bit misleading for some CLI-savvy people in the first place ;) At least for me, it would seem more logical to traverse the folder tree to the final destination and then execute a command from within there, like this:
Code: Select all
cd CobraWorkspace\Source\bin
install-from-workspace


And that's exactly how I did it (prior to checking the readme.txt), resulting in an aforementioned installation fail. And I was not alone, as we can see.
Perhaps it would make things less confusing to simply modify the instructions in the readme and add "@cd .." line, instead of thinking out some complex checking logic in a .bat file to cover all the possible innacurate use cases? Just my five cents.

Re: I cant install cobra

PostPosted: Mon Oct 22, 2012 1:03 am
by Charles
I understand where you are coming from, but the script should be robust such that it doesn't matter where you start. We already have that for the bash scripts. Turns out it's this easy for Windows batch files:
Code: Select all
@cd %~dp0

Now fixed.

Thanks for the feedback.