Hi everybody,
I need testing and feedback on a new installer I wrote for Cobra. It's located in the Subversion repository under the Source directory. You "cd" there and enter:
install-from-workspace
Or rather:
ins<TAB>
It does various things including building Cobra with -turbo, copying the files out to C:\Cobra\, versioning Cobra.Lang.dll and installing it to the GAC, etc. Also, I changed the -embed-run-time option to default to "no" which makes compilation snappier and Cobra EXEs smaller. If that's too much information, don't worry about it--the installer handles it all.
After the installation is done, you can invoke cobra from the command line outside the workspace.
I don't have it working on Mac/Linux/Unix yet, but made several allowances for that, and will get it working on that side of the fence at some point. You can get more information from the doc string at the top of InstallFromWorkspace.cobra, also in the same directory.
The installer works for me, but does it work for you? Please let me know.
If you don't have a Subversion workspace yet, see http://cobra-language.com/source/
Forums
install-from-workspace
15 posts
• Page 1 of 2 • 1, 2
Re: install-from-workspace
mmmmhhhh.... i tried this way
1) i went to cobra-workspace dir
2) svn up
3) cd source
4) install-from-workspace
the result is an error "cobra.lang.dll not found"....
No, maybe my way is not the right one.....
1) i went to cobra-workspace dir
2) svn up
3) cd source
4) install-from-workspace
the result is an error "cobra.lang.dll not found"....
No, maybe my way is not the right one.....
- relez
- Posts: 69
Re: install-from-workspace
I made some tweaks.
Please "svn up" and try again.
Please "svn up" and try again.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: install-from-workspace
If i start as "normal" user the answer is:
Unhandled Exception: System.ComponentModel.Win32Exception: The requested operati
on requires elevation
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startIn
fo)
at System.Diagnostics.Process.Start()
at CommandLine.DoRun(List`1 paths)
at CommandLine.Run(List`1 args)
at CommandLine.Run()
at CobraMain.Main()
Then i open my prompt window as admin. The process starts and i think partially works but ends with (final lines):
run: cobra.exe -ert:no hello
Hello, world.
run: cobra.exe -ert:yes hello
Hello, world.
run: cobra.exe hello
Hello, world.
==== Install Cobra standard library to the GAC
Searching for gacutil...
** ERROR: Cannot locate a gacutil. Maybe you can try again using the "Visual Stu
dio Command Prompt".
Unhandled Exception: System.ComponentModel.Win32Exception: The requested operati
on requires elevation
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startIn
fo)
at System.Diagnostics.Process.Start()
at CommandLine.DoRun(List`1 paths)
at CommandLine.Run(List`1 args)
at CommandLine.Run()
at CobraMain.Main()
Then i open my prompt window as admin. The process starts and i think partially works but ends with (final lines):
run: cobra.exe -ert:no hello
Hello, world.
run: cobra.exe -ert:yes hello
Hello, world.
run: cobra.exe hello
Hello, world.
==== Install Cobra standard library to the GAC
Searching for gacutil...
** ERROR: Cannot locate a gacutil. Maybe you can try again using the "Visual Stu
dio Command Prompt".
- relez
- Posts: 69
Re: install-from-workspace
.....then i tried from VS2008 prompt.... fault as in the first step of previous message....
then i tried using VS2008 command prompt as admin.... success! with this end:
run: cobra.exe -bsl -debug
Compilation succeeded
==== Install "cobra" into a system path directory
The Cobra compiler is not in your PATH. To remedy you can:
1. Add C:\Cobra\bin to your PATH
2. Copy C:\Cobra\bin\cobra.bat to any directory in your PATH
Success!
I'm going to fix my path....
then i tried using VS2008 command prompt as admin.... success! with this end:
run: cobra.exe -bsl -debug
Compilation succeeded
==== Install "cobra" into a system path directory
The Cobra compiler is not in your PATH. To remedy you can:
1. Add C:\Cobra\bin to your PATH
2. Copy C:\Cobra\bin\cobra.bat to any directory in your PATH
Success!
I'm going to fix my path....
- relez
- Posts: 69
Re: install-from-workspace
Ok, path fixed... it seems to work fine. The end:
run: cobra.exe -bsl -debug
Compilation succeeded
==== Install "cobra" into a system path directory
found in PATH: c:\Users\RL\cobra\bin\cobra.bat
copy from: C:\Cobra\bin\cobra.bat
to: c:\Users\RL\cobra\bin\cobra.bat
The existing "cobra" in your path has been replaced
with the new one.
Success!
Sorry for the step-by-step test.... my pc is a battlefield....
run: cobra.exe -bsl -debug
Compilation succeeded
==== Install "cobra" into a system path directory
found in PATH: c:\Users\RL\cobra\bin\cobra.bat
copy from: C:\Cobra\bin\cobra.bat
to: c:\Users\RL\cobra\bin\cobra.bat
The existing "cobra" in your path has been replaced
with the new one.
Success!
Sorry for the step-by-step test.... my pc is a battlefield....
- relez
- Posts: 69
Re: install-from-workspace
No apologies necessary. This is good information. I conclude that:
-- When Cobra attempts to run a program, it should look for the "requires elevation" exception and give a better error message.
-- The gacutil problem should be detected up front.
-- I should add the typical VS 2008 gacutil path in the autosearch for it (right now it just searches for the VS 2005 path)
Great!
Btw I'm not familiar with Vista. Does anyone know if there is some way to tell Vista that it's okay for cobra.exe to start another process?
-Chuck
-- When Cobra attempts to run a program, it should look for the "requires elevation" exception and give a better error message.
-- The gacutil problem should be detected up front.
-- I should add the typical VS 2008 gacutil path in the autosearch for it (right now it just searches for the VS 2005 path)
Great!
Btw I'm not familiar with Vista. Does anyone know if there is some way to tell Vista that it's okay for cobra.exe to start another process?
-Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: install-from-workspace
Chuck wrote:Btw I'm not familiar with Vista. Does anyone know if there is some way to tell Vista that it's okay for cobra.exe to start another process?
Recently i read this paper
http://visualstudiomagazine.com/columns ... alsid=2337
but I'm not sure that it is somehow useful for that problem.....
- relez
- Posts: 69
Re: install-from-workspace
I've made improvements to Cobra and to the installer based on your experiences.
I'm looking forward to another round of feedback from the next user. Please let me know how it goes, good or bad.
-Chuck
I'm looking forward to another round of feedback from the next user. Please let me know how it goes, good or bad.
-Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: install-from-workspace
Hi relez, I read the paper and don't think that it really applies. But it was an interesting read. Here are my thoughts:
First, I'm surprised that simply launching another program requires admin privs. Especially a .exe that was output by the same process trying to launch it! The article doesn't address that.
Second, their approaches are:
1 - Remove the functionality. (Not feasible.)
2 - Move the functionality to another process. (We're trying to launch the other process! Not feasible.)
3 - Run as admin (See below.)
I sort of addressed 3 by including a Windows Vista hint if Cobra gets an exception about "elevation" when trying to launch the .exe it produced. See the short changeset:1690
I didn't take the GUI shield approach described in the article because it's not appropriate for the command line.
I noticed she mentioned that she runs her debugging sessions as admin. But debugging a program you wrote is not a system administration task. I think developers on Vista will just have to get used to this weirdness.
Thanks for the link,
-Chuck
First, I'm surprised that simply launching another program requires admin privs. Especially a .exe that was output by the same process trying to launch it! The article doesn't address that.
Second, their approaches are:
1 - Remove the functionality. (Not feasible.)
2 - Move the functionality to another process. (We're trying to launch the other process! Not feasible.)
3 - Run as admin (See below.)
I sort of addressed 3 by including a Windows Vista hint if Cobra gets an exception about "elevation" when trying to launch the .exe it produced. See the short changeset:1690
I didn't take the GUI shield approach described in the article because it's not appropriate for the command line.
I noticed she mentioned that she runs her debugging sessions as admin. But debugging a program you wrote is not a system administration task. I think developers on Vista will just have to get used to this weirdness.
Thanks for the link,
-Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
15 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 50 guests