HOWTO: Configure JDE.INI and Environment Variables for package build

timallen

timallen

Well Known Member
HOWTO: Configure JDE.INI and Environment Variables for Package Build

I had a problem doing package builds for my Enterprise Server a while back. As it turned out, I had not configured the Environment Variables on the Enterprise Server to allow my C compiler to be called from the command line. This is the technique I used to fix this. I assume Windows 2000/Visual C++-- a similar technique would be used in Unix, but in Unix, this almost certainly won't be a problem. You need to connect with a user who has rights to change the SYSTEM environment variables to do this:

I. Environment Variables:
1) From the Enterprise Server, open a CMD session (Start->Execute->CMD).
2) Type "nmake". You should get a message like:

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

If you get this message or similar, your environment variables *might* be correct.
3) Open the Visual C++ Batch file VCVARS32.BAT
notepad C:\Archivos de programa\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT

You will have to adjust this if you installed Visual C++ in some other place.
4) Compare what is in VCVAR32.BAT to the System Environment variables:
- Right click "My Computer"
- Click "Properties"
- Click the tab "Advanced"
- Click the button "Environment Variables"
- Look at the bottom section "System Variables".
There should be entries for INCLUDE, LIB, and possibly MSDevDir and MSVCDir. If these are not there, you will need to set these to the enries in VCVARS32.BAT.

The PATH environment variable should also include the directories from VCVARS32.BAT. These are defined in terms of MSDevDir and MSVCDir, so you can either put these directories in the path using MSDevDir and MSVCDir if you have defined these previously, or "translate" them to their final values.

5) Do this same process for the Deployment Server.
NOTE: You may wonder why you simply don't run VCVARS32.BAT on system startup. The problem is that NMAKE has to work even if the Server doesn't have an active session.

II. JDE.INI
The JDE.INI lists the directories where OneWorld will look for libraries, etc. These have to be correct as well.
1) On the Enterprise Server, open JDE.INI
2) Look at this section:
[JDE_CG]
;TARGET=DEBUG
TARGET=RELEASE
INCLUDES=c:\Progra~1\Micros~1\Vc98\include;c:\Progra~1\Micros~1\Vc98\mfc\include;$(SYSTEM)\INCLUDE;$(SYSTEM)\INCLUDEV;$(SYSTEM)\CG;$(APP)\INCLUDE;
LIBS=c:\Progra~1\Micros~1\Vc98\lib;c:\Progra~1\Micros~1\Vc98\mfc\lib;$(SYSTEM)\LIB32;$(SYSTEM)\LIBV32;$(APP)\LIB32;
MAKEDIR=c:\Progra~1\Micros~1\Common\Tools\WinNT;c:\Progra~1\Micros~1\Common\MSDev98\Bin;c:\Progra~1\Micros~1\Common\Tools;c:\Progra~1\Micros~1\VC98\bin
STDLIBDIR=c:\Progra~1\Micros~1\Vc98\lib;c:\Progra~1\Micros~1\Vc98\mfc\lib

3) Ensure that each of the directories listed in this section actually exists. If you have installed Visual C++ to another drive, you may just need to change the drive letter for each directory.
4) Repeat this process for the Deployment Server.

When this is all done, you might want to create a small test package and do the build for workstations and the Enterprise Server. If you have configured the Environment Variables and JDE.INI correctly, this should all work.

I hope this helps.
 
One question I have after writing this: In the [JDE_CG] section of JDE.INI, there are several references to $(COMP), $(SYSTEM), and $(APP). I have tried doing an ECHO %APP% at the command line and found that these are not Windows environment variables.

Where do these come from? Are they hard-coded? We have found that for our Spanish systems, we end up having to replace all instances of $(COMP) with their actual values for package builds from development workstations to go correctly-- otherwise, the compiler can't be found. In our case, we have to replace $(COMP) with "c:\archiv~1\micros~3" in all cases.

Could this be because our Visual C++ is installed in "C:\Archivos de programas" instead of "C:\Program Files"?

Thanks in advance.
 
Or you could use the reg.exe tool from MS with the following command file:

-MachineEnvPathDelete "D:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT"
-MachineEnvPathDelete "D:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin"
-MachineEnvPathDelete "D:\Program Files\Microsoft Visual Studio\Common\Tools"
-MachineEnvPathDelete "D:\Program Files\Microsoft Visual Studio\VC98\bin"
-MachineEnvPathDelete "C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT"
-MachineEnvPathDelete "C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin"
-MachineEnvPathDelete "C:\Program Files\Microsoft Visual Studio\Common\Tools"
-MachineEnvPathDelete "C:\Program Files\Microsoft Visual Studio\VC98\bin"
-MachineEnvPathAdd "C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin"
-Set REG_SZ "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\include=C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include"
-Set REG_SZ "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\lib=C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib"
-Set REG_SZ "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\MSDevDir=C:\Program Files\Microsoft Visual Studio\Common\MSDev98"


Details about reg.exe can be found here:

http://www.microsoft.com/technet/tr...dtechnol/winntas/maintain/mngntreg/admreg.asp
 
Back
Top