From: Uno on
Hello newsgroup,

I'm tantalizingly close to having the gcc/gfortran install on a memory
stick that I want. This basic how-to for this I took from Jmaes van
Buskirk in c.l.fortran. One detail catches, namely, that I'm not
starting in the directory I want to.

Thunderbird is only letting me paste this in as a quote (sorry):

>
> F:\>dir
> Volume in drive F has no label.
> Volume Serial Number is 0000-0000
>
> Directory of F:\
>
> 03/08/2010 05:56 PM <DIR> .Trash-1000
> 05/07/2010 11:23 AM <DIR> fortran_stuff
> 03/31/2010 06:40 PM <DIR> repjan30
> 10/11/2005 05:58 AM 921,600 LaunchU3.exe
> 05/05/2010 06:01 PM <DIR> Documents
> 05/03/2010 10:58 PM <DIR> Opera
> 05/03/2010 10:59 PM <DIR> Internet Explorer
> 05/03/2010 11:00 PM <DIR> Mozilla Firefox
> 05/04/2010 01:35 AM 2,359,350 fu1.bmp
> 05/05/2010 06:14 PM <DIR> gcc_eq32
> 08/04/2004 07:00 AM 388,608 cmd.exe
> 05/05/2010 08:21 PM 827 Command Prompt for 32-bit gfortran.lnk
> 05/05/2010 06:13 PM <DIR> source
> 4 File(s) 3,670,385 bytes
> 9 Dir(s) 3,541,467,136 bytes free
>
> F:\>cd gcc_eq32
>
> F:\gcc_eq32>dir
> Volume in drive F has no label.
> Volume Serial Number is 0000-0000
>
> Directory of F:\gcc_eq32
>
> 05/05/2010 06:14 PM <DIR> .
> 05/05/2010 06:14 PM <DIR> ..
> 05/05/2010 06:27 PM 29,191,374 gcc-4.6-20100501-32.exe
> 05/05/2010 08:05 PM <DIR> bin
> 05/05/2010 08:05 PM <DIR> i686-pc-mingw32
> 05/05/2010 08:06 PM <DIR> include
> 05/05/2010 08:07 PM <DIR> lib
> 05/05/2010 08:07 PM <DIR> libexec
> 05/05/2010 08:07 PM <DIR> share
> 05/05/2010 08:10 PM 263 Shortcut.bat
> 05/05/2010 08:20 PM <DIR> source
> 2 File(s) 29,191,637 bytes
> 9 Dir(s) 3,541,467,136 bytes free
>
> F:\gcc_eq32>type Shortcut.bat
> @echo off
> Title Build environment for 32-bit gfortran equation solutions
> set path=%cd:~0,2%\gcc_eq32\bin;%cd:~0,2%\gcc_eq32\libexec\gcc\i686-pc-mingw32\4
> .5.0;%path%
> set LIBRARY_PATH=%cd:~0,2%\gcc_eq32\i686-pc-mingw32\lib;%EQ_LIBRARY_PATH% cd %cd
> :~0,2%\gcc_eq32
> F:\gcc_eq32>
>
> Start in:
>
> %cd:~0,2%\gcc_eq32\source\

So, no matter what I try, I always start in just F:.

The "start in" value is taken from the properties of the shortcut. How
do I fix it?

TIA
--
Uno
From: Jackie on
I am not 100% sure I understand but if I got it right, you may want to
add "/D" to the "cd" command. It changes the current drive in addition
to the directory.
From: Uno on
Jackie wrote:
> I am not 100% sure I understand but if I got it right, you may want to
> add "/D" to the "cd" command. It changes the current drive in addition
> to the directory.

Like this?

%cd/D:~0,2%\gcc_eq32\source\
--
Uno
From: Jackie on
On 5/11/2010 23:40, Uno wrote:
> Jackie wrote:
>> I am not 100% sure I understand but if I got it right, you may want to
>> add "/D" to the "cd" command. It changes the current drive in addition
>> to the directory.
>
> Like this?
>
> %cd/D:~0,2%\gcc_eq32\source\

I was thinking about his..
cd %cd:~0,2%\gcc_eq32

and adding that switch..

cd /D %cd:~0,2%\gcc_eq32

Seems like you have it on the same line as you set LIBRARY_PATH as well
(or at least it appears like it to me).
If you intend to do this..
cd %cd:~0,2%\gcc_eq32\source\
... then you can add the /D switch there as well. :)
From: Jackie on
You can forget about the last thingy I said in my previous post. I
realized it is the working directory set on a shortcut like you said.
Maybe there's still something to it by adding /D after "cd" like in my
previous post?