Skip to content
Stephen Orso edited this page May 13, 2018 · 3 revisions

If you are updating existing files in Hyperion, great, and thanks.

At some point, though, you will need to add a file--C code, a header, and/or html. Because Hyperion is built in a number of environments using different tools, you will need to add the file to the various configuration files that control the builds.

Your new file will need to be added to all of the following files:

  • Various files with extension .msvc - The files that control Windows builds
  • makefile.am - The *nix automake control file, in the directory to which the file was added.
  • Hercules.vcproj - The Visual Studio 2008 project file
  • Hercules.vcxproj - The Visual Studio 2010 project file
  • Hercules.vcxproj.filters - The Visual Studio 2010 project filter file
  • Hercules_vs2012.vcxproj - The Visual Studio 2012 project file. There is no VS2012 project filter file.

Files with extension .msvc

If your new file must be compiled, linked, or otherwise included in Hercules modules, you will need to add it to one or more of the various files in the msvc.makefile.includes directory to ensure that your new object is compiled. Your new C program will certainly need to be added to OBJ_CODE.msvc, and you may need to add things to MOD_RULES1.msvc and MOD_RULES2.msvc. Precise guidance would depend on the circumstances of your file, so you'll just have to figure it out. Here is a brief summary of the .msvc files, in the order they are processed during a Windows build.

  • MODULES.msvc - Identifies load modules and .DLL files created during the build. If you create a new utility, here is where it needs to be mentioned.
  • OBJ_CODE.msvc - Controls compilation of most .c modules.
  • MOD_RULES1.msvc - Compiles Windows resource files, pre-compiled c Headers, and a few routines that must compile separately.
  • MOD_RULES2.msvc - Creates load modules, DLLs, and sundry other bits.

There are other .msvc files. Review them to see what they do, but you generally will not have to change them when you add a file to the project.

NMake is used for builds and is supported in Visual Studio 2008 and 2010, and works in Visual Studio 2012, and 2015. File processing required to actually build Hercules Hyperion are in the various makefile command lists and .msvc files. Hercules does not use MSBuild for builds under Windows because some development takes place in Visual Studio 2008, which does not support MSBuild.

makefile.am

Makefile.am is one of the files used by Automake, the build process Hercules employs for *nix systems.

If there is no makefile.am in the directory to which you are adding a file, the parent directory should have one. If not, then the parent of that directory will have one.

The makefile.am file controls (at least) two things: what must be done to each file when the system is built, and which files must be included in any distribution built from the Hyperion repository. Text files such as scripts, READMEs, and HTML must be included but need no build processing. C files and headers require compilation.

It is difficult to provide precise guidance on where you must add your new file; each makefile.am implements very specific build requirements for the files it includes in the build. One approach is to review statements for similar files (header, C code, HTML, images), and append your new file(s) as needed.

Ultimately, though, you will have to "figure it out;" you are a developer after all. [This author's expertise in makefile.am is pretty limited, and my specific advice may well be wrong. You will do better.] And the developers forum is a resource you can use.

Hercules.vcproj

The Hercules.vcproj file contains the commands needed to create specific builds (debug, release, win32, 64-bit) and filter definitions for the Visual C++ 2008 Integrated Development Environment. File processing required to actually build Hercules Hyperion are in the various makefile command lists and .msvc files and not in Hercules.vcproj.

You'll need to add your file in the appropriate section.

The filter controls both which files are visible in the Visual Studio solution explorer and where those files appear in the hierarchy displayed by the Solution Explorer.

Hercules.vcxproj

The Hercules.vcxproj file, contains the commands needed to the commands needed to create specific builds (debug, release, win32, 64-bit) in the Visual Studio 2010 Integrated Development Environment. It also identifies the files that must be processed for an MSBuild of the project and the nature of the processing that must be done. The file needs to be named here even though MSBuild is not used.

There are four sections, one for C Language compilations (.c files), one for C Includes (.h header files), one for Resource Compiler files (.rsc), and one for other files that are part of the Hercules project but do not require processing during a build (.html files, test scripts, etc.)

Add your new file to the correct group.

Hercules.vcxproj.filters

Hercules.vcxproj.filters contains filter definitions for the Visual Studio 2010 Integrated Development Environment. The filter file controls both which files are visible in the Visual Studio solution explorer and where those files appear in the hierarchy displayed by the Solution Explorer. The Visual Studio 2010 filter file does not participate in either MSBuild or NMake.

You'll need to add your file in the appropriate section.

Hercules_vs2012.vcxproj

The Hercules_vs2012.vcxproj file contains the commands needed to the commands needed to create specific builds (debug, release, win32, 64-bit) in the Visual Studio 2012 Integrated Development Environment (IDE). It also identifies the files that must be processed for an MSBuild of the project and the nature of the processing that must be done. So the file needs to be named here even though MSBuild is note used.

The VS 2012 IDE apparently does not use or support a filter file.

The Hercules_vs2012.vcxproj file is also used by the Visual Studio 2015 IDE. Conversion to VS 2015 formats is not required.

There are four sections, one for C Language compilations (.c files), one for C Includes (.h header files), one for Resource Compiler files (.rsc), and one for other files that are part of the Hercules project but do not require processing during a build (.html files, test scripts, etc.)

Add your new file to the correct group.