?? readme.chgipath
字號:
As of this release of WindManage SNMP (9.3), the layout of the SNMP code basehas changed significantly. A full description of the previous and current file layout schemes can be found in the WindManage SNMP 9.3 Release Notes. Customers who have written applications based on WindManage SNMP 9.2 and olderwill need to make changes to the customer-added sections of their applicationsin order to upgrade to version 9.3. These changes will be, in general, of two forms: a) moving files from one location to the new, analogous location in the the source tree layout. b) editing customer-added files to reflect the new locations of #include files needed to use WindManage SNMP. For example, the file formerly known as <envoy/h/snmp.h> is now <wrn/wm/snmp/core/snmp.h>.How time-consuming a task making these changes will be depends entirely on the scope of the customer application and how many external files the customerhas added. In order to make task (b) a little easier on the application developer, we have included a small tool which will make most, if not all, of the includefile path changes needed to migrate application code from version 9.2 and previous to version 9.3. This tool is provided in the form of a Bourne Shellscript, and will run on any Un*x system which has a standard Bourne shell and the 'sed' utility. It will also run under the Cygwin version of these utilitieswhich have been provided with WindManage SNMP, on a Windows NT/2000/etc machine.The tool is called "chgipath.sh", and will be found in the"target/src/wrn/wm/tools/include_path_tool" directory. What this tool is: This tool is provided to help with the tedious task of changing include paths for the WindManage SNMP include files in customer-added application code built using WindManage SNMP.What this tool is not: This tool is not meant to be run on any files that are part of an original WindManage SNMP distribution. In particular, this tool will *not* convert a WindManage SNMP 9.2 release into a WindManage SNMP 9.3 distribution. Also, if your application made modifications to the VxWorks SNMP agent source files, you will need to port these changes into the current VxWorks agent source files. This tool can not and does not do that job.You may wish to use this tool if: You have application source files which were previously compiled with WindManage SNMP 9.2 or earlier, and wish to migrate to WindManage SNMP 9.3. If you were just using the supplied MIB2 implementation which came with WindManage SNMP 9.2, and did not implement any of your own MIBS, You do not need to use this tool at all. Using chgipath.sh:First, BACK UP YOUR SOURCE TREE before using this tool. Lack of disk space, strange directory permissions, etc are all ways the script could fail and leave your tree in an unknown state. BACK UP YOUR SOURCE TREE.Now that you have backed up your source tree, make a copy of the chgipath.shscript in the directory where the files you want changed are located. If you are running on a Windows machine, make sure you have already installed WindManage SNMP version 9.3 into your Tornado installation, and have run thetorVars.bat script to set up your Tornado environment variables. The followingexamples are written assuming you are running on a un*x machine, but will workjust as well in a Windows Command window."chgipath" takes as command arguments the filenames you wish to edit. By default, chgipath only edits ".c" and ".h" files, ignoring any other file types. See the "Changing default file types" for how to change this behavior. OPTIONS: -r if this option is given, chgipath will recursively process any directories given on the command line (or found while processing a directory given, etc). Without "-r", directories are ignored. -s if "-s" is given, the current version of "file" is saved as "file.old". Do not rely on this instead of backing up your source tree! General Usage: $ sh chgipath.sh [-r] [-s] <file/dir 1> [<file/dir 2>...] Examples: $ sh chgipath.sh foo.c edits "foo.c", and changes WindManage include file paths. $ sh chgipath.sh -s foo.c edits "foo.c", and changes WindManage include file paths. Leaves the original version of "foo.c" in "foo.c.old" $ sh chgipath.sh -s foo.c edits "foo.c", and changes WindManage include file paths. Leaves the original version of "foo.c" in "foo.c.old" $ sh chgipath.sh -s -r foo.c foo.h file_directory edits "foo.c" and "foo.h", and changes WindManage include file paths. Goes into "file_directory" and processes all files there as well. Leaves the original version of all files edited in "<file>.old" Changing default file types By default, chgipath.sh only acts on ".c" and ".h" files. The types of files it will process can be changed by setting the SUFFIXES environment variable to be a list of the file types you wish to process. (setting the environment variables is one place where the procedure will vary for Windows and Unix boxes)I.E: (unix, bourne shell variants) $ SUFFIXES=".cpp .c .h" sh chgipath.sh -s -r foo.c foo.h file_directory will process .c, .h, and .cpp files. (unix, C shell variants) % setenv SUFFIXES=".cpp .c .h" % sh chgipath.sh -s -r foo.c foo.h file_directory (windows) C:> set SUFFIXES=".c .cpp .h" C:> sh chgipath.sh -s -r foo.c foo.h file_directory
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -