Visual C++ Build Instructions.
Sources are now distributed as a separate package available for download ina ZIP file
OCSInventory_X.X_Sources.zip on OCS Inventory
web site.
Unzip the package in the directory where you've setup OCS Inventory to create the
following directory structure:
- Application:
- AccessLogs:
- BIOS:
- Drivers:
- Graphics:
- Hardware:
- LogicalDrives:
- Network:
- Printers:
- Results:
- Docs:
- Sources: Visual C++ workspace.
- Agent: DAO and CSV support agent sources.
- Agent CSV only: CSV support only agent sources.
- BiosInfo: BiosInfo C and ASM sources
(require 16 bits Microsoft Visual C++ 1.52 to compile).
- Common: Common sources between agent, manager...
- DumpDMI: DumpDMI sources.
- ImportCSV: Import Utility sources.
- Includes: Common class headers and resources between agent, manager...
- Languages: Language support DLLs.
- OCSLangDEU: German language support DLL.
- OCSLangENG: English language support DLL.
- OCSLangESP: Spanish language support DLL.
- OCSLangFRA: French language support DLL.
- Libraries: Common external libraries file where sources are now available (WinIO for example).
- Manager: Manager sources.
- Res: Manager specific resources.
- SetupWinIO: SetupWinIO sources
- SysInfo: SysInfo Dll headers and sources.
Sources build fine with Microsoft Visual C++ 6 Service Pack 5 and the November 2002 Microsoft
Platform SDK. I think they could be built with Visual C++ 5, but i'm not sure. Just open the
"OCS Inventory.dsw" workspace in the "Sources" folder with Visual C++ 6.0,
select the Agent or Manager project, Debug or Release config and buid it ! The executable
files will be placed in the "Application" directory.
The SysInfo Dll is completly new and you cannot use the old Paul Wendt SysInfo Dll. We were
unable to obtain an updated version from Paul Wendt, so we build our own Dll with
Iain CHESWORTH CAMEL classes for the processor detection routines.
OCS Inventory V2.00 still uses DAO 3.5 to connect to the database. Therefore database
is still in Access 97 format. If you open it with Microsoft Access 2000 or higher,
DO NOT CONVERT IT or the agent
execution will fail.
You can find a description of CSV files used by OCS Inventory here.
If you have troubleshooting, please contact us.
NB. If you do modify the source, please let us have a copy
of anything useful so that we can pass it on to everyone else...
How to translate OCS Inventory.
Translating Windows Agent and Manager
Language support is now included as a separated resource DLL. This DLL must have name
"OCSLang<CountryCode>.dll" to be seen by the Manager. It must export
too a function called "LPCTSTR GetSupportedLanguage( void)" which
return in a string the name of the supported Lanaguage.
You add a new translation only by creating a new DLL. Copy the content of OCSLangENG project for having
the skeleton oh your new DLL and translate or update following objects:
- Dialog
- Menu
- String table
- Version
- The language name in OCSLang.def file
- String returned by GetSupportedLanguage function in OCSLang<CountryCode>.cpp file
NB: Do not modify Dailog IDs, Menu IDs or String IDs in order to avoid
updating the C++ sources for each language support. The better way is to copy/paste the resource
you want to translate into your language section, and then translate only the string values.
Translating Web Manager
All language support strings are defined in the "includes/lang.inc" file
of the web Manager. They are loaded dynamically while the server process the ASP pages, through an ASP session
object.
- Open "includes/lang.inc" with your favorite test editor and add a section for
your language code yourcode in the select case instruction.
Then copy the content of the default english language support to the new section you've added,
and translate all string associated with each variables. You may have something like this:
Case select Session("Language")
Case "yourcode":
' ============== Strings declarations for Your Language support ===============
....
Case "de"
' ============== Strings declarations for German support ====================
....
Case "es"
' ============== Strings declarations for Spanish support ====================
....
Case "fr"
' ============== Strings declarations for French support ====================
....
Case Else
' ============== Strings declarations for default English support ===============
....
End Select
|
- Create an image (.gif, .jpg or .png) for symbolizing your language support in format 32x32 pixels
and store it in "images" folder of the Web Manager.
Open "login.asp" page and add a line like follow in the language selection table
<td align="center"><a href="login.asp?Language=yourcode"><img src="images/yourimage.gif"
border="0" alt="Your language" WIDTH="32" HEIGHT="32"><br>Your language</a></td>
|
- Open the "default.asp" of the root Web Manager folder and add the required
redirectors for your language in the select case Request.ServerVariables("HTTP_ACCEPT_LANGUAGE").
This will allow the Web Manager to automatically display the login page in the appropriated
language by analysing the client browser language support. You will add something like this:
case "BrowserLanguageCode" strLanguage=""yourcode"
|
- Test your translation to see if all is good and ajust if necessary.
|