[greenstone-devel] RE: Why support VC++ 4.0

From Emanuel Dejanu
DateTue, 14 Feb 2006 10:42:24 +0200
Subject [greenstone-devel] RE: Why support VC++ 4.0
In-Reply-To (43F10C3F-3000207-cs-waikato-ac-nz)
The best way will be to use an intermediate layer like:
- Scon (http://www.scons.org/) - Python script
- Bakefile (http://bakefile.sf.net/)
- and others

This will generate the needed files for selected
platform/compiler.
But this requires to learn the new tool and
depends on a new programming tool (Python).

Back to your question. I think that will be better
to have 2 global files in gsdl that will be included
by win32.mak on each project directory.

So we will have the following structure:

gsdl
---base_vc4.mak (for vc4)
---base.mak (for vc6+)
---src
------txt2db
---------win32.mak

This win32.mak file will include the selected base file
based on an enviroment variabile (like GSDL_VC4)

GSDL_VC4=0
!IF $(GSDL_VC4)
!INCLUDE $(GSDL_HOME)/base_vc4.mak
!ELSE
!INCLUDE $(GSDL_HOME)/base.mak
!ENDIF

In this way we have a global space to define
options, targets and defines and a single make
file per project.

So if you run in the command prompt:
set GSDL_VC4=1
nmake win32.mak

You will build using VC4 options and defines.
Also what I will like also to do with this
Change is to be posible to build compile in the same
time the release/debug version without making clean
first.

Regards,

Emanuel

-----Original Message-----
From: Michael Dewsnip [mailto:mdewsnip@cs.waikato.ac.nz]
Sent: Tuesday, February 14, 2006 12:46 AM
To: Emanuel Dejanu
Cc: greenstone-devel@list.scms.waikato.ac.nz
Subject: Re: Why support VC++ 4.0

Dear Emanuel,

Yes, we keep Greenstone compiling with VC++ 4 so the executables will run on
Windows 3.1. We hope to drop Windows 3.1 support soon, however -- although
so far it hasn't required much work to keep Greenstone compiling with VC++
4.

Perhaps a good solution is to have two versions of the win32.mak files
-- one for VC++ 4, and one for VC++ 6/VS 2005. What do you think?

Regards,

Michael

Emanuel Dejanu wrote:

>Hi,
>
>Why greenstone is keeping support for VC++ 4.0?
>If is for Windows 3.1 is there any statistics on how many Greenstone
>users are using Windows 3.1?
>
>
>Regards,
>
>Emanuel
>
>
>-----Original Message-----
>From: Michael Dewsnip [mailto:mdewsnip@cs.waikato.ac.nz]
>Sent: Friday, February 03, 2006 1:17 AM
>To: Emanuel Dejanu
>Cc: greenstone-devel@list.scms.waikato.ac.nz
>Subject: Re: Greenstone and Visual Studio 8
>
>Dear Emanuel,
>
>I have tried compiling Greenstone with Visual Studio 2005 and committed
>a few changes necessary to get it to compile. I haven't committed your
>changes to the makefiles and the source code to prevent all the
>warnings, as we want to keep Greenstone compiling with Visual C++ 4 (at
this stage, anyway).
>
>However when I run the compiled library.exe or server.exe it crashes
>with an exception -- did you experience this problem?
>
>Thanks,
>
>Michael
>
>
>
>Emanuel Dejanu wrote:
>
>
>
>>Hi,
>>
>>I am trying to compile the greenstone 2 (CVS) using Visual Studio 2005
>>Professional on Windows XP SP2.
>>If you do not have Visual Studio 2005 you can get Visual Studio C++
>>2005 Express edition for free from msdn.microsoft.com (you must
>>register it before 7 nov 2006)
>>
>>I send you a patch to fix the compilation problemes.
>>The patch was done using the command (in D:CVSROOTgsdl):
>>cvs -q diff -bu2 > d:mg_patch
>>
>>I have tested also with Visual Studio 6.0 and is working also.
>>
>>
>>Best regards,
>>
>>Emanuel Dejanu
>>
>>
>>
>>
>
>
>
>
>
>
>