[ADMB Users] Open ADMB for Windows with MinGW
dave fournier
davef at otter-rsch.com
Wed Dec 10 14:08:58 PST 2008
Schnute, Jon wrote:
Yes you are right. the script should use the ADMB_HOME string to find
the stuff.
these changes seem to work.
@echo off
rem Command line script for ADMB
setlocal
if "" NEQ ""%4 (echo syntax: admb [-s] [-re] name) else (
if "" NEQ ""%3 (tpl2rem %3 > tmp_admb && myccsre %3 && mylinksre %3)
else (
if ""==""%2 (%ADMB_HOME%\bin\tpl2cpp %1 > tmp_admb &&
%ADMB_HOME%\bin\mycc %1 && %ADMB_HOME%\bin\mylink %1) else (
if /i %1==-re (%ADMB_HOME%\bin\tpl2rem %2 > tmp_admb &&
%ADMB_HOME%\bin\myccre %2 && %ADMB_HOME%\bin\mylinkre %2) else (
if /i %1==-s (%ADMB_HOME%\bin\tpl2cpp -bounds %2 > tmp_admb &&
%ADMB_HOME%\bin\myccs %2 && %ADMB_HOME%\bin\mylinks %2) else (
echo syntax: admb [-s] [-re] name )))))
endlocal
echo on
> Thanks, Dave. That's very helpful. I agree completely with your strategy
> for making installation easy and allowing multiple versions of ADMB to
> run independently on the same computer. Given your reply and that from
> Johnoel this morning, I think I'll adopt your version mentioned on the
> thread:
>
> http://groups.google.com/group/admb-users/browse_frm/thread/eb9e4e6fc79f
> d398,
> i.e., http://otter-rsch.com/admb-org-rc/setupADMB_gcc432_mingw32.exe
>
> as the interim Windows version for now, designed to run with gcc 4.2.1
> from Rtools28. I'll also follow the progress of the official Windows
> versions as they appear on http://code.google.com/p/admb-project/.
>
> I'm trying to interest a group of users here, and I need something that
> they will adopt readily on their Windows systems. They would very much
> appreciate a similar interim version for the Borland compiler, if that's
> possible.
>
> I have a small question. Your interim version makes a registry setting
> for ADMB_HOME. Does that setting actually get used by the software at
> any point?
>
> Thanks again,
> Jon
>
> PS - In the long run, I can imagine distros of ADMB similar to the
> distros of Linux, designed by various user groups to have distinct
> features of installation and operation. The core would remain the same,
> but the "look and feel" would change.
>
> -----Original Message-----
> From: dave fournier [mailto:davef at otter-rsch.com]
> Sent: Wednesday, December 10, 2008 10:24 AM
> To: Schnute, Jon
> Cc: John Ancheta; users at admb-project.org; Sibert, John; Haigh, Rowan;
> Jaclyn Cleary; Holt, Carrie
> Subject: Re: Open ADMB for Windows with MinGW
>
> Schnute, Jon wrote:
>
> I think that if a new user has the ocmpiler correctly installed then
> they should be able to
> simply install the admb software by running an exe and then change to a
> comman window and say somethihkg like.
>
> admb simple
>
> simple
>
> and have everything just work. this can be done with the inno installer
> so that all the differences between
> compilers are hidden from the user. except for the compiler it should
> not be necessary to add any more software.
> the reason that tpl2cpp or tpl2rem was looking for cat is that is was
> the mingw32 version which was originally intended
> for cygwin whihc has these tools. the "true" windows version uses copy
> instead of cat.
>
> It is really only necessary to have one verion of tpl2cpp and tpl2rem
> for windows and another for Linux
> so that part should be removed from the build of each version and just
> copied into the bin file. Is is necessary to
> have a copy of sed.exe for whihc I use a mingw version. I have had
> better luck with mingw32 than with cygwin when moving to 64bit XP.
>
> However it is important to be able to use more than one compiler on the
> same machine.
> first consider how to set up the effortless install I mentioned above.
> I think the best way is to have the installer define a (global)
> environment string like ADMB_HOME to
> point to the directory where admb is installed. To run the software the
> shell script admb.bat is copied to the
> system directory know as {sys} to the Inno installer. It can figure out
> where this shold be for different
> version of windows. for example something like c:\winnt\system32. this
> is already on the users path
> so that it will be found when the user types in admb simple
> the user may have to reboot to get the command shell window to "see" the
> new ADMB_HOME,
> but windows users are used to rebooting.
>
> If the installation detects that the user already has ADMB_HOME defined
> and/or admb.bat in {sys}
> it can use a variant such as a compiler specific name such as
> ADMB_VC8_HOME and admb_vc8.bat
> It should of course notify the user that there is already one version of
> ADMB installed and that it is doing the curretn install in this way.
>
> this works for different compilers so long as the compler shell command
> are different. for example for vc++
> is is cl.exe for borland it is bcc32.exe and for mingw32 it is gcc and
> g++.
>
> If one needs say two different versions of g++ one can find the bin
> directory conatining it and do a copy
>
> copy "g++.exe" "g++421.exe"
>
> and use g++421 in the admb_gcc421.bat file.
>
> Dave
>
>
>
>
>> I've spent most of today experimenting with the new release of ADMB
>>
> for
>
>> Windows with MinGW. I'm pleased to report that it works, but not
>>
> without
>
>> a few difficulties. The attached report explains exactly what
>>
> happened.
>
>> In particular, Step 5 resolves the problem with "cat" reported by Tony
>> Booth earlier today.
>>
>> Hopefully, everyone who gets this message will also get the attached
>>
> PDF
>
>> file. If you have problems, let me know and I can send it again.
>>
>> Please note that I have two questions for which I'd like answers.
>> Probably you compiler gurus can answer Question 1 instantly. I hope
>>
> the
>
>> ADMB Project gurus think carefully about my Question 2 because it
>>
> points
>
>> the way toward contributions that users can make, even at this early
>> stage before the source code can be released.
>>
>> Best wishes,
>> Jon
>>
>> ******************************************
>> Jon Schnute, Scientist Emeritus
>> Pacific Biological Station
>> 3190 Hammond Bay Road
>> Nanaimo, BC V9T 6N7
>> CANADA
>>
>> NEW email: Jon.Schnute at dfo-mpo.gc.ca
>> (formerly schnutej at pac.dfo-mpo.gc.ca)
>> ******************************************
>>
>>
>
>
>
--
David A. Fournier
P.O. Box 2040,
Sidney, B.C. V8l 3S3
Canada
Phone/FAX 250-655-3364
http://otter-rsch.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: admb.txt
URL: <http://lists.admb-project.org/pipermail/users/attachments/20081210/177d760c/attachment.txt>
More information about the Users
mailing list