diff --git a/osg-install-jing_zhong/How to get compiled third-party dependency of OSG and compile OSG.md b/osg-install-jing_zhong/How to get compiled third-party dependency of OSG and compile OSG.md
new file mode 100644
index 00000000000..414fe2892a0
--- /dev/null
+++ b/osg-install-jing_zhong/How to get compiled third-party dependency of OSG and compile OSG.md
@@ -0,0 +1,244 @@
+
How to build and compile the third-party libraries for OSG and OSG?
+
+ **The author called jing_zhong will introduce for you!**
+
+ If you want to compile the OSG on Windows platform, please ensure you have the compiled third-party dependency. Because I have compiled the third-party library for OpenScenegraph many times, write this tutorial and hope to help developers and engineers!
+
+# 1、Two general compiling methods
+
+In general , we use three compiled methods to compile the source code for obtaining the compiled .lib、.dll files (etc).
+
+## 1.1 MinGW---gcc--g++ for linux、unix-like、windows
+
+ configure->make->make install
+
+## 1.2 Visual Studio---MSVC---VC++ for Windows
+
+### 1.2.1 nmake
+
+### 1.2.2 CMake->configure->generate->open project->ALLBUILD->INSTALL
+
+
+
+## 2、The compiled third-party libraries includes
+
+ **Here indrocues 8 libraries:** curl、zlib、libpng、jpeg、freetype、glut、tiffand giflib.
+
+## 3、My compiled environment is following:
+
+### 3.1 **Operation System**
+
+### Windows 11(x64)
+
+### 3.2**Installed Software**
+
+ CMake、Microsoft Visual Studio 20015、MSYS2
+
+## 4、**Download the source code of third-party libraries and unzip them**
+
+
+ The download_url for the source code of third-party libraries!
+
+
+ curl-7.83.1.tar.gz
+ |
+
+ https://curl.se/download/curl-7.83.1.tar.gz
+ |
+
+
+
+ zlib-1.2.12.tar.gz
+ |
+
+ http://www.zlib.net/zlib-1.2.12.tar.gz
+ |
+
+
+
+ libpng-1.6.37.tar.gz
+ |
+
+ https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz
+ |
+
+
+
+ jpegsr9e.zip
+ |
+
+ http://www.ijg.org/files/jpegsr9e.zip
+ |
+
+
+
+ freetype-2.12.1.tar.gz
+ |
+
+ https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.gz
+ |
+
+
+
+ glut37.zip
+ |
+
+ https://www.opengl.org/resources/libraries/glut/glut37.zip
+ |
+
+
+
+ tiff-4.4.0.tar.gz
+ |
+
+ http://download.osgeo.org/libtiff/tiff-4.4.0.tar.gz
+ |
+
+
+
+ giflib-5.2.1.tar.gz
+ |
+
+ https://sourceforge.net/projects/giflib/files/giflib-5.2.1.tar.gz
+ |
+
+
+
+
+
+
+## 5、Compile the third-party libraries for OSG(x64、Debug and Release)
+
+### 5.1 **The compiled order of third-party libraries for OSG**
+
+ curl > zlib > libpng > freetype > jpeg > glut > tiff > giflib
+
+### 5.2 **The compiled method of third-party libraries for OSG**
+
+
+ - curl (CMake---VS2015---ALLBUILD---INSTALL)
+
+ -
+ zlib (CMake---VS2015---ALLBUILD---INSTALL)
+
+ - libpng (CMake---VS2015---ALLBUILD---INSTALL)
+
+ -
+ freetype (VS2015---builds/win/2010---build)
+
+ - jpeg (configure->make->make install)
+
+ -
+ glut (VS2015---nmake---glutmake)
+
+ - tiff (CMake---VS2015---ALLBUILD---INSTALL)
+
+ -
+ giflib (VS2015---New Project---build)
+
+
+
+
+## 6、Notes(Must read)
+
+## 6.1 Attention for compiling libpng(x64、Debug and Release)
+
+ When compiling the libpng, you would better compile dependent libraries(**bzip2**、**brotli**、**harfbuzz**).
+
+(1) **Download the source code of three dependent libraries** **for libpng**.
+
+
+
+
+ bzip2-latest.tar.gz
+ |
+
+ http://sourceware.org/pub/bzip2/bzip2-latest.tar.gz
+ |
+
+
+
+ brotli
+ |
+
+ git clone https://github.com/google/brotli.git
+ |
+
+
+
+ harfbuzz-4.3.0.tar.xz
+ |
+
+ https://github.com/harfbuzz/harfbuzz/releases/download/4.3.0/harfbuzz-4.3.0.tar.xz
+ |
+
+
+
+
+(2) **The compiled method for three dependent libraries for libpng**.
+
+
+ -
+ bzip2 (CMake---VS2015---ALLBUILD---INSTALL)
+
+ -
+ brotli (CMake---VS2015---ALLBUILD---INSTALL)
+
+ -
+ harfbuzz (configure->make->make install)
+
+
+
+
+## 6.2 Attention for compiling glut(x64、Debug and Release)
+
+(1) Replace glutwin32.mak and edit it.
+(2) Copy the file->(C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\Win32.Mak) to the directory->(D:\Program Files (x86)\Microsoft Visual Studio 2015\VC\include) and rename this file as win32.mak.
+
+(3) Replace the file->(..\glut37\glut-3.7\lib\glut\Makefile.win)
+
+(4) Replace the file->(..\glut37\glut-3.7\progs\demos\particle\particle.c\)
+
+(5) Open the VS2015 developer command prompt and enter the directory of glut
+
+ type the command:
+
+```bash
+glutmake
+```
+
+## 6.3 Attention for compiling giflib(x64、Debug and Release)
+
+(1) Open VS 2015, New->Visual C++->Win32 Program->Select the static lib, do not include precompiled header
+
+(2) Open the file **gif_hash.h** and edit, comment the line:
+
+```c++
+// #include
+```
+
+(3) Open the file **gif_lib.h** and edit, in front of the line:
+
+```c++
+#ifdef __cplusplus
+```
+
+ add this code:
+
+```c++
+#pragma warning( disable : 4996 )
+```
+
+(4) Open the file **getopt.c** and edit, replace **#include** as **#include**
+
+(5) After build the program, mannually copy the **.lib** and **.h** to the installed giflib directory(**the folder lib、the folder include**)
+
+
+
+Finally, congratulations!!!
+
+# 7、Compile the OSG
+
+Download the source code of OSG.
+
+CMake->VS2015->ALLBUILD->INSTALL
diff --git a/osg-install-jing_zhong/OSG-CMake-VS 2015-2022-06-20_151930.png b/osg-install-jing_zhong/OSG-CMake-VS 2015-2022-06-20_151930.png
new file mode 100644
index 00000000000..c81118de7b3
Binary files /dev/null and b/osg-install-jing_zhong/OSG-CMake-VS 2015-2022-06-20_151930.png differ
diff --git a/osg-install-jing_zhong/OSG-VS-ALLBUILD_QQScreenShots20220620193713.jpg b/osg-install-jing_zhong/OSG-VS-ALLBUILD_QQScreenShots20220620193713.jpg
new file mode 100644
index 00000000000..328ca2966d6
Binary files /dev/null and b/osg-install-jing_zhong/OSG-VS-ALLBUILD_QQScreenShots20220620193713.jpg differ
diff --git a/osg-install-jing_zhong/OSG-VS-INSTALL_QQScreenShots20220620211417.jpg b/osg-install-jing_zhong/OSG-VS-INSTALL_QQScreenShots20220620211417.jpg
new file mode 100644
index 00000000000..7acce8aa87f
Binary files /dev/null and b/osg-install-jing_zhong/OSG-VS-INSTALL_QQScreenShots20220620211417.jpg differ
diff --git a/osg-install-jing_zhong/ReadMe.md b/osg-install-jing_zhong/ReadMe.md
new file mode 100644
index 00000000000..7f216c8d9b0
--- /dev/null
+++ b/osg-install-jing_zhong/ReadMe.md
@@ -0,0 +1,2 @@
+Individually compile the third-party dependency of OpenSceneGraph 3.6.5 successfully!(curl-7.81.3、zlib-1.2.12、libpng-1.6.37、jpegsr9e、freetype-2.12.1、glut37、tiff-4.4.0、giflib-5.2.1.)
+OpenSceneGraph 3.6.5 compiled successfully!
diff --git a/osg-install-jing_zhong/cmd-Test-osgversion-2022-06-21-1559_1.jpg b/osg-install-jing_zhong/cmd-Test-osgversion-2022-06-21-1559_1.jpg
new file mode 100644
index 00000000000..6b2b3f8fc91
Binary files /dev/null and b/osg-install-jing_zhong/cmd-Test-osgversion-2022-06-21-1559_1.jpg differ
diff --git a/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/ReadMe.md b/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/ReadMe.md
new file mode 100644
index 00000000000..075059be599
--- /dev/null
+++ b/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/ReadMe.md
@@ -0,0 +1 @@
+Needed files for compiling giflib! 2022.6.21 By jing_zhong
diff --git a/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/getopt.c b/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/getopt.c
new file mode 100644
index 00000000000..8f9caa89f48
--- /dev/null
+++ b/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/getopt.c
@@ -0,0 +1,1228 @@
+/* Getopt for GNU.
+NOTE: getopt is now part of the C library, so if you don't know what
+"Keep this file name-space clean" means, talk to drepper@gnu.org
+before changing it!
+Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
+Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+You should have received a copy of the GNU Lesser General Public
+License along with the GNU C Library; if not, write to the Free
+Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA. */
+
+/* This tells Alpha OSF/1 not to define a getopt prototype in .
+Ditto for AIX 3.2 and . */
+#ifndef _NO_PROTO
+# define _NO_PROTO
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include
+#endif
+
+#if !defined __STDC__ || !__STDC__
+/* This is a separate conditional since some stdc systems
+reject `defined (const)'. */
+# ifndef const
+# define const
+# endif
+#endif
+
+#include
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+actually compiling the library itself. This code is part of the GNU C
+Library, but also included in many other GNU distributions. Compiling
+and linking in this code is a waste when using the GNU C library
+(especially if it is a shared library). Rather than having every GNU
+program understand `configure --with-gnu-libc' and omit the object files,
+it is simpler to just do this in the source for each such file. */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
+# include
+# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+# define ELIDE_CODE
+# endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+contain conflicting prototypes for getopt. */
+# include
+# include
+#endif /* GNU C library. */
+
+#ifdef VMS
+# include
+# if HAVE_STRING_H - 0
+# include
+# endif
+#endif
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages. */
+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
+# include
+# ifndef _
+# define _(msgid) gettext (msgid)
+# endif
+# else
+# define _(msgid) (msgid)
+# endif
+# if defined _LIBC && defined USE_IN_LIBIO
+# include
+# endif
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+but it behaves differently for the user, since it allows the user
+to intersperse the options with the other arguments.
+As `getopt' works, it permutes the elements of ARGV so that,
+when it is done, all the options precede everything else. Thus
+all application programs are extended to handle flexible argument order.
+Setting the environment variable POSIXLY_CORRECT disables permutation.
+Then the behavior is completely standard.
+GNU application programs can use a third alternative mode in which
+they can distinguish the relative order of options and other arguments. */
+
+#include "getopt.h"
+
+/* For communication from `getopt' to the caller.
+When `getopt' finds an option that takes an argument,
+the argument value is returned here.
+Also, when `ordering' is RETURN_IN_ORDER,
+each non-option ARGV-element is returned here. */
+
+char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+This is used for communication to and from the caller
+and for communication between successive calls to `getopt'.
+On entry to `getopt', zero means this is the first call; initialize.
+When `getopt' returns -1, this is the index of the first of the
+non-option elements that the caller should itself scan.
+Otherwise, `optind' communicates from one call to the next
+how much of ARGV has been scanned so far. */
+
+/* 1003.2 says this must be 1 before any call. */
+int optind = 1;
+
+/* Formerly, initialization of getopt depended on optind==0, which
+causes problems with re-calling getopt as programs generally don't
+know that. */
+
+int __getopt_initialized;
+
+/* The next char to be scanned in the option-element
+in which the last option character we returned was found.
+This allows us to pick up the scan where we left off.
+If this is zero, or a null string, it means resume the scan
+by advancing to the next ARGV-element. */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+for unrecognized options. */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+This must be initialized on some systems to avoid linking in the
+system's own getopt implementation. */
+
+int optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+If the caller did not specify anything,
+the default is REQUIRE_ORDER if the environment variable
+POSIXLY_CORRECT is defined, PERMUTE otherwise.
+REQUIRE_ORDER means don't recognize them as options;
+stop option processing when the first non-option is seen.
+This is what Unix does.
+This mode of operation is selected by either setting the environment
+variable POSIXLY_CORRECT, or using `+' as the first character
+of the list of option characters.
+PERMUTE is the default. We permute the contents of ARGV as we scan,
+so that eventually all the non-options are at the end. This allows options
+to be given in any order, even with programs that were not written to
+expect this.
+RETURN_IN_ORDER is an option available to programs that were written
+to expect options and other ARGV-elements in any order and that care about
+the ordering of the two. We describe each non-option ARGV-element
+as if it were the argument of an option with character code 1.
+Using `-' as the first character of the list of option characters
+selects this mode of operation.
+The special argument `--' forces an end of option-scanning regardless
+of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+`--' can cause `getopt' to return -1 with `optind' != ARGC. */
+
+static enum
+{
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable. */
+static char *posixly_correct;
+
+#ifdef __GNU_LIBRARY__
+/* We want to avoid inclusion of string.h with non-GNU libraries
+because there are many ways it can cause trouble.
+On some systems, it contains special magic macros that don't work
+in GCC. */
+# include
+# define my_index strchr
+#else
+
+# if HAVE_STRING_H || WIN32 /* Pete Wilson mod 7/28/02 */
+# include
+# else
+# include
+# endif
+
+/* Avoid depending on library functions or files
+whose names are inconsistent. */
+
+#ifndef getenv
+extern char *getenv();
+#endif
+
+static char *
+my_index(str, chr)
+const char *str;
+int chr;
+{
+ while (*str)
+ {
+ if (*str == chr)
+ return (char *)str;
+ str++;
+ }
+ return 0;
+}
+
+/* If using GCC, we can safely declare strlen this way.
+If not using GCC, it is ok not to declare it. */
+#ifdef __GNUC__
+/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
+That was relevant to code that was here before. */
+# if (!defined __STDC__ || !__STDC__) && !defined strlen
+/* gcc with -traditional declares the built-in strlen to return int,
+and has done so at least since version 2.4.5. -- rms. */
+extern int strlen(const char *);
+# endif /* not __STDC__ */
+#endif /* __GNUC__ */
+
+#endif /* not __GNU_LIBRARY__ */
+
+/* Handle permutation of arguments. */
+
+/* Describe the part of ARGV that contains non-options that have
+been skipped. `first_nonopt' is the index in ARGV of the first of them;
+`last_nonopt' is the index after the last of them. */
+
+static int first_nonopt;
+static int last_nonopt;
+
+#ifdef _LIBC
+/* Stored original parameters.
+XXX This is no good solution. We should rather copy the args so
+that we can compare them later. But we must not use malloc(3). */
+extern int __libc_argc;
+extern char **__libc_argv;
+
+/* Bash 2.0 gives us an environment variable containing flags
+indicating ARGV elements that should not be considered arguments. */
+
+# ifdef USE_NONOPTION_FLAGS
+/* Defined in getopt_init.c */
+extern char *__getopt_nonoption_flags;
+
+static int nonoption_flags_max_len;
+static int nonoption_flags_len;
+# endif
+
+# ifdef USE_NONOPTION_FLAGS
+# define SWAP_FLAGS(ch1, ch2) \
+ if (nonoption_flags_len > 0) \
+ { \
+ char __tmp = __getopt_nonoption_flags[ch1]; \
+ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
+ __getopt_nonoption_flags[ch2] = __tmp; \
+ }
+# else
+# define SWAP_FLAGS(ch1, ch2)
+# endif
+#else /* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif /* _LIBC */
+
+/* Exchange two adjacent subsequences of ARGV.
+One subsequence is elements [first_nonopt,last_nonopt)
+which contains all the non-options that have been skipped so far.
+The other is elements [last_nonopt,optind), which contains all
+the options processed since those non-options were skipped.
+`first_nonopt' and `last_nonopt' are relocated so that they describe
+the new indices of the non-options in ARGV after they are moved. */
+
+#if defined __STDC__ && __STDC__
+static void exchange(char **);
+#endif
+
+static void
+exchange(argv)
+char **argv;
+{
+ int bottom = first_nonopt;
+ int middle = last_nonopt;
+ int top = optind;
+ char *tem;
+
+ /* Exchange the shorter segment with the far end of the longer segment.
+ That puts the shorter segment into the right place.
+ It leaves the longer segment in the right place overall,
+ but it consists of two parts that need to be swapped next. */
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ /* First make sure the handling of the `__getopt_nonoption_flags'
+ string can work normally. Our top argument must be in the range
+ of the string. */
+ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
+ {
+ /* We must extend the array. The user plays games with us and
+ presents new arguments. */
+ char *new_str = malloc(top + 1);
+ if (new_str == NULL)
+ nonoption_flags_len = nonoption_flags_max_len = 0;
+ else
+ {
+ memset(__mempcpy(new_str, __getopt_nonoption_flags,
+ nonoption_flags_max_len),
+ '\0', top + 1 - nonoption_flags_max_len);
+ nonoption_flags_max_len = top + 1;
+ __getopt_nonoption_flags = new_str;
+ }
+ }
+#endif
+
+ while (top > middle && middle > bottom)
+ {
+ if (top - middle > middle - bottom)
+ {
+ /* Bottom segment is the short one. */
+ int len = middle - bottom;
+ register int i;
+
+ /* Swap it with the top part of the top segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[top - (middle - bottom) + i];
+ argv[top - (middle - bottom) + i] = tem;
+ SWAP_FLAGS(bottom + i, top - (middle - bottom) + i);
+ }
+ /* Exclude the moved bottom segment from further swapping. */
+ top -= len;
+ }
+ else
+ {
+ /* Top segment is the short one. */
+ int len = top - middle;
+ register int i;
+
+ /* Swap it with the bottom part of the bottom segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[middle + i];
+ argv[middle + i] = tem;
+ SWAP_FLAGS(bottom + i, middle + i);
+ }
+ /* Exclude the moved top segment from further swapping. */
+ bottom += len;
+ }
+ }
+
+ /* Update records for the slots the non-options now occupy. */
+
+ first_nonopt += (optind - last_nonopt);
+ last_nonopt = optind;
+}
+
+/* Initialize the internal data when the first call is made. */
+
+#if defined __STDC__ && __STDC__
+static const char *_getopt_initialize(int, char *const *, const char *);
+#endif
+static const char *
+_getopt_initialize(argc, argv, optstring)
+int argc;
+char *const *argv;
+const char *optstring;
+{
+ /* Start processing options with ARGV-element 1 (since ARGV-element 0
+ is the program name); the sequence of previously skipped
+ non-option ARGV-elements is empty. */
+
+ first_nonopt = last_nonopt = optind;
+
+ nextchar = NULL;
+
+ posixly_correct = getenv("POSIXLY_CORRECT");
+
+ /* Determine how to handle the ordering of options and nonoptions. */
+
+ if (optstring[0] == '-')
+ {
+ ordering = RETURN_IN_ORDER;
+ ++optstring;
+ }
+ else if (optstring[0] == '+')
+ {
+ ordering = REQUIRE_ORDER;
+ ++optstring;
+ }
+ else if (posixly_correct != NULL)
+ ordering = REQUIRE_ORDER;
+ else
+ ordering = PERMUTE;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ if (posixly_correct == NULL
+ && argc == __libc_argc && argv == __libc_argv)
+ {
+ if (nonoption_flags_max_len == 0)
+ {
+ if (__getopt_nonoption_flags == NULL
+ || __getopt_nonoption_flags[0] == '\0')
+ nonoption_flags_max_len = -1;
+ else
+ {
+ const char *orig_str = __getopt_nonoption_flags;
+ int len = nonoption_flags_max_len = strlen(orig_str);
+ if (nonoption_flags_max_len < argc)
+ nonoption_flags_max_len = argc;
+ __getopt_nonoption_flags =
+ (char *)malloc(nonoption_flags_max_len);
+ if (__getopt_nonoption_flags == NULL)
+ nonoption_flags_max_len = -1;
+ else
+ memset(__mempcpy(__getopt_nonoption_flags, orig_str, len),
+ '\0', nonoption_flags_max_len - len);
+ }
+ }
+ nonoption_flags_len = nonoption_flags_max_len;
+ }
+ else
+ nonoption_flags_len = 0;
+#endif
+
+ return optstring;
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+given in OPTSTRING.
+If an element of ARGV starts with '-', and is not exactly "-" or "--",
+then it is an option element. The characters of this element
+(aside from the initial '-') are option characters. If `getopt'
+is called repeatedly, it returns successively each of the option characters
+from each of the option elements.
+If `getopt' finds another option character, it returns that character,
+updating `optind' and `nextchar' so that the next call to `getopt' can
+resume the scan with the following option character or ARGV-element.
+If there are no more option characters, `getopt' returns -1.
+Then `optind' is the index in ARGV of the first ARGV-element
+that is not an option. (The ARGV-elements have been permuted
+so that those that are not options now come last.)
+OPTSTRING is a string containing the legitimate option characters.
+If an option character is seen that is not listed in OPTSTRING,
+return '?' after printing an error message. If you set `opterr' to
+zero, the error message is suppressed but we still return '?'.
+If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+so the following text in the same ARGV-element, or the text of the following
+ARGV-element, is returned in `optarg'. Two colons mean an option that
+wants an optional arg; if there is text in the current ARGV-element,
+it is returned in `optarg', otherwise `optarg' is set to zero.
+If OPTSTRING starts with `-' or `+', it requests different methods of
+handling the non-option ARGV-elements.
+See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+Long-named options begin with `--' instead of `-'.
+Their names may be abbreviated as long as the abbreviation is unique
+or is an exact match for some defined option. If they have an
+argument, it follows the option name in the same ARGV-element, separated
+from the option name by a `=', or else the in next ARGV-element.
+When `getopt' finds a long-named option, it returns 0 if that option's
+`flag' field is nonzero, the value of the option's `val' field
+if the `flag' field is zero.
+The elements of ARGV aren't really const, because we permute them.
+But we pretend they're const in the prototype to be compatible
+with other systems.
+LONGOPTS is a vector of `struct option' terminated by an
+element containing a name which is zero.
+LONGIND returns the index in LONGOPT of the long-named option found.
+It is only valid when a long-named option has been found by the most
+recent call.
+If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+long-named options. */
+
+int
+_getopt_internal(argc, argv, optstring, longopts, longind, long_only)
+int argc;
+char *const *argv;
+const char *optstring;
+const struct option *longopts;
+int *longind;
+int long_only;
+{
+ int print_errors = opterr;
+ if (optstring[0] == ':')
+ print_errors = 0;
+
+ if (argc < 1)
+ return -1;
+
+ optarg = NULL;
+
+ if (optind == 0 || !__getopt_initialized)
+ {
+ if (optind == 0)
+ optind = 1; /* Don't scan ARGV[0], the program name. */
+ optstring = _getopt_initialize(argc, argv, optstring);
+ __getopt_initialized = 1;
+ }
+
+ /* Test whether ARGV[optind] points to a non-option argument.
+ Either it does not have option syntax, or there is an environment flag
+ from the shell indicating it is not an option. The later information
+ is only used when the used in the GNU libc. */
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
+ || (optind < nonoption_flags_len \
+ && __getopt_nonoption_flags[optind] == '1'))
+#else
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#endif
+
+ if (nextchar == NULL || *nextchar == '\0')
+ {
+ /* Advance to the next ARGV-element. */
+
+ /* Give FIRST_NONOPT and LAST_NONOPT rational values if OPTIND has been
+ moved back by the user (who may also have changed the arguments). */
+ if (last_nonopt > optind)
+ last_nonopt = optind;
+ if (first_nonopt > optind)
+ first_nonopt = optind;
+
+ if (ordering == PERMUTE)
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange((char **)argv);
+ else if (last_nonopt != optind)
+ first_nonopt = optind;
+
+ /* Skip any additional non-options
+ and extend the range of non-options previously skipped. */
+
+ while (optind < argc && NONOPTION_P)
+ optind++;
+ last_nonopt = optind;
+ }
+
+ /* The special ARGV-element `--' means premature end of options.
+ Skip it like a null option,
+ then exchange with previous non-options as if it were an option,
+ then skip everything else like a non-option. */
+
+ if (optind != argc && !strcmp(argv[optind], "--"))
+ {
+ optind++;
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange((char **)argv);
+ else if (first_nonopt == last_nonopt)
+ first_nonopt = optind;
+ last_nonopt = argc;
+
+ optind = argc;
+ }
+
+ /* If we have done all the ARGV-elements, stop the scan
+ and back over any non-options that we skipped and permuted. */
+
+ if (optind == argc)
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (first_nonopt != last_nonopt)
+ optind = first_nonopt;
+ return -1;
+ }
+
+ /* If we have come to a non-option and did not permute it,
+ either stop the scan or describe it to the caller and pass it by. */
+
+ if (NONOPTION_P)
+ {
+ if (ordering == REQUIRE_ORDER)
+ return -1;
+ optarg = argv[optind++];
+ return 1;
+ }
+
+ /* We have found another option-ARGV-element.
+ Skip the initial punctuation. */
+
+ nextchar = (argv[optind] + 1
+ + (longopts != NULL && argv[optind][1] == '-'));
+ }
+
+ /* Decode the current option-ARGV-element. */
+
+ /* Check whether the ARGV-element is a long option.
+ If long_only and the ARGV-element has the form "-f", where f is
+ a valid short option, don't consider it an abbreviated form of
+ a long option that starts with f. Otherwise there would be no
+ way to give the -f short option.
+ On the other hand, if there's a long option "fubar" and
+ the ARGV-element is "-fu", do consider that an abbreviation of
+ the long option, just like "--fu", and not "-f" with arg "u".
+ This distinction seems to be the most useful approach. */
+
+ if (longopts != NULL
+ && (argv[optind][1] == '-'
+ || (long_only && (argv[optind][2] || !my_index(optstring, argv[optind][1])))))
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = -1;
+ int option_index;
+
+ for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp(p->name, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int)(nameend - nextchar)
+ == (unsigned int)strlen(p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else if (long_only
+ || pfound->has_arg != p->has_arg
+ || pfound->flag != p->flag
+ || pfound->val != p->val)
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ __asprintf(&buf, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[optind]);
+
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#else
+ fprintf(stderr, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[optind]);
+#endif
+ }
+ nextchar += strlen(nextchar);
+ optind++;
+ optopt = 0;
+ return '?';
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ optind++;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = nameend + 1;
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+#endif
+
+ if (argv[optind - 1][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ __asprintf(&buf, _("\
+%s: option `--%s' doesn't allow an argument\n"),
+argv[0], pfound->name);
+#else
+ fprintf(stderr, _("\
+%s: option `--%s' doesn't allow an argument\n"),
+argv[0], pfound->name);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ __asprintf(&buf, _("\
+%s: option `%c%s' doesn't allow an argument\n"),
+argv[0], argv[optind - 1][0],
+pfound->name);
+#else
+ fprintf(stderr, _("\
+%s: option `%c%s' doesn't allow an argument\n"),
+argv[0], argv[optind - 1][0], pfound->name);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#endif
+ }
+
+ nextchar += strlen(nextchar);
+
+ optopt = pfound->val;
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ __asprintf(&buf,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#else
+ fprintf(stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+#endif
+ }
+ nextchar += strlen(nextchar);
+ optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen(nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+
+ /* Can't find it as a long option. If this is not getopt_long_only,
+ or the option starts with '--' or is not a valid short
+ option, then it's an error.
+ Otherwise interpret it as a short option. */
+ if (!long_only || argv[optind][1] == '-'
+ || my_index(optstring, *nextchar) == NULL)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+#endif
+
+ if (argv[optind][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ __asprintf(&buf, _("%s: unrecognized option `--%s'\n"),
+ argv[0], nextchar);
+#else
+ fprintf(stderr, _("%s: unrecognized option `--%s'\n"),
+ argv[0], nextchar);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ __asprintf(&buf, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[optind][0], nextchar);
+#else
+ fprintf(stderr, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[optind][0], nextchar);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#endif
+ }
+ nextchar = (char *) "";
+ optind++;
+ optopt = 0;
+ return '?';
+ }
+ }
+
+ /* Look at and handle the next short option-character. */
+
+ {
+ char c = *nextchar++;
+ char *temp = my_index(optstring, c);
+
+ /* Increment `optind' when we start to process its last character. */
+ if (*nextchar == '\0')
+ ++optind;
+
+ if (temp == NULL || c == ':')
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+#endif
+
+ if (posixly_correct)
+ {
+ /* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ __asprintf(&buf, _("%s: illegal option -- %c\n"),
+ argv[0], c);
+#else
+ fprintf(stderr, _("%s: illegal option -- %c\n"), argv[0], c);
+#endif
+ }
+ else
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ __asprintf(&buf, _("%s: invalid option -- %c\n"),
+ argv[0], c);
+#else
+ fprintf(stderr, _("%s: invalid option -- %c\n"), argv[0], c);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#endif
+ }
+ optopt = c;
+ return '?';
+ }
+ /* Convenience. Treat POSIX -W foo same as long option --foo */
+ if (temp[0] == 'W' && temp[1] == ';')
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = 0;
+ int option_index;
+
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (print_errors)
+ {
+ /* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ __asprintf(&buf, _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#else
+ fprintf(stderr, _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+#endif
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+
+ /* optarg is now the argument, see if it's in the
+ table of longopts. */
+
+ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp(p->name, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int)(nameend - nextchar) == strlen(p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+ if (ambig && !exact)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ __asprintf(&buf, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[optind]);
+
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#else
+ fprintf(stderr, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[optind]);
+#endif
+ }
+ nextchar += strlen(nextchar);
+ optind++;
+ return '?';
+ }
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = nameend + 1;
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ __asprintf(&buf, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+argv[0], pfound->name);
+
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#else
+ fprintf(stderr, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+argv[0], pfound->name);
+#endif
+ }
+
+ nextchar += strlen(nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ __asprintf(&buf, _("\
+%s: option `%s' requires an argument\n"),
+argv[0], argv[optind - 1]);
+
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#else
+ fprintf(stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+#endif
+ }
+ nextchar += strlen(nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen(nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
+ }
+ if (temp[1] == ':')
+ {
+ if (temp[2] == ':')
+ {
+ /* This is an option that accepts an argument optionally. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ optind++;
+ }
+ else
+ optarg = NULL;
+ nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (print_errors)
+ {
+ /* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ __asprintf(&buf,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+
+ if (_IO_fwide(stderr, 0) > 0)
+ __fwprintf(stderr, L"%s", buf);
+ else
+ fputs(buf, stderr);
+
+ free(buf);
+#else
+ fprintf(stderr,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+#endif
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+ nextchar = NULL;
+ }
+ }
+ return c;
+ }
+}
+
+int
+getopt(argc, argv, optstring)
+int argc;
+char *const *argv;
+const char *optstring;
+{
+ return _getopt_internal(argc, argv, optstring,
+ (const struct option *) 0,
+ (int *)0,
+ 0);
+}
+
+#endif /* Not ELIDE_CODE. */
+
+
+/* Compile with -DTEST to make an executable for use in testing
+the above definition of `getopt'. */
+
+/* #define TEST */ /* Pete Wilson mod 7/28/02 */
+#ifdef TEST
+
+#ifndef exit /* Pete Wilson mod 7/28/02 */
+int exit(int); /* Pete Wilson mod 7/28/02 */
+#endif /* Pete Wilson mod 7/28/02 */
+
+int
+main(argc, argv)
+int argc;
+char **argv;
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+
+ c = getopt(argc, argv, "abc:d:0123456789");
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf("option %c\n", c);
+ break;
+
+ case 'a':
+ printf("option a\n");
+ break;
+
+ case 'b':
+ printf("option b\n");
+ break;
+
+ case 'c':
+ printf("option c with value `%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf("%s ", argv[optind++]);
+ printf("\n");
+ }
+
+ exit(0);
+}
+
+#endif /* TEST */
\ No newline at end of file
diff --git a/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/getopt.h b/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/getopt.h
new file mode 100644
index 00000000000..235ddcf20d4
--- /dev/null
+++ b/osg-install-jing_zhong/giflib-VS2015-build-NeedFiles/getopt.h
@@ -0,0 +1,173 @@
+/* getopt.h */
+/* Declarations for getopt.
+Copyright (C) 1989-1994, 1996-1999, 2001 Free Software
+Foundation, Inc. This file is part of the GNU C Library.
+The GNU C Library is free software; you can redistribute
+it and/or modify it under the terms of the GNU Lesser
+General Public License as published by the Free Software
+Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+The GNU C Library is distributed in the hope that it will
+be useful, but WITHOUT ANY WARRANTY; without even the
+implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU Lesser General Public
+License for more details.
+You should have received a copy of the GNU Lesser General
+Public License along with the GNU C Library; if not, write
+to the Free Software Foundation, Inc., 59 Temple Place,
+Suite 330, Boston, MA 02111-1307 USA. */
+
+
+
+
+#ifndef _GETOPT_H
+
+#ifndef __need_getopt
+# define _GETOPT_H 1
+#endif
+
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+standalone, or this is the first header included in the source file.
+If we are being used with glibc, we need to include , but
+that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
+not defined, include , which will pull in for us
+if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
+doesn't flood the namespace with stuff the way some other headers do.) */
+#if !defined __GNU_LIBRARY__
+# include
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+ extern char *optarg;
+
+ /* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+ On entry to `getopt', zero means this is the first call; initialize.
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+ extern int optind;
+
+ /* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+ extern int opterr;
+
+ /* Set to an option character which was unrecognized. */
+
+ extern int optopt;
+
+#ifndef __need_getopt
+ /* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+ struct option
+ {
+# if (defined __STDC__ && __STDC__) || defined __cplusplus
+ const char *name;
+# else
+ char *name;
+# endif
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+ };
+
+ /* Names for the values of the `has_arg' field of `struct option'. */
+
+# define no_argument 0
+# define required_argument 1
+# define optional_argument 2
+#endif /* need getopt */
+
+
+ /* Get definitions and prototypes for functions to process the
+ arguments in ARGV (ARGC of them, minus the program name) for
+ options given in OPTS.
+ Return the option character from OPTS just read. Return -1 when
+ there are no more options. For unrecognized options, or options
+ missing arguments, `optopt' is set to the option letter, and '?' is
+ returned.
+ The OPTS string is a list of characters which are recognized option
+ letters, optionally followed by colons, specifying that that letter
+ takes an argument, to be placed in `optarg'.
+ If a letter in OPTS is followed by two colons, its argument is
+ optional. This behavior is specific to the GNU `getopt'.
+ The argument `--' causes premature termination of argument
+ scanning, explicitly telling `getopt' that there are no more
+ options.
+ If OPTS begins with `--', then non-option arguments are treated as
+ arguments to the option '\0'. This behavior is specific to the GNU
+ `getopt'. */
+
+#if (defined __STDC__ && __STDC__) || defined __cplusplus
+# ifdef __GNU_LIBRARY__
+ /* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. */
+ extern int getopt(int ___argc, char *const *___argv, const char *__shortopts);
+# else /* not __GNU_LIBRARY__ */
+ extern int getopt();
+# endif /* __GNU_LIBRARY__ */
+
+# ifndef __need_getopt
+ extern int getopt_long(int ___argc, char *const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind);
+ extern int getopt_long_only(int ___argc, char *const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind);
+
+ /* Internal only. Users should not call this directly. */
+ extern int _getopt_internal(int ___argc, char *const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only);
+# endif
+#else /* not __STDC__ */
+ extern int getopt();
+# ifndef __need_getopt
+ extern int getopt_long();
+ extern int getopt_long_only();
+
+ extern int _getopt_internal();
+# endif
+#endif /* __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations. */
+#undef __need_getopt
+
+#endif /* getopt.h */
\ No newline at end of file
diff --git a/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/Makefile.win b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/Makefile.win
new file mode 100644
index 00000000000..4ea56804c09
--- /dev/null
+++ b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/Makefile.win
@@ -0,0 +1,87 @@
+# Makefile for Win32
+
+!include
+
+TOP = ../..
+
+# NOTE: glut_menu.c and glut_glxext.c are NOT compiled into Win32 GLUT
+
+SRCS = glut_8x13.c glut_9x15.c glut_bitmap.c glut_bwidth.c glut_cindex.c glut_cmap.c glut_cursor.c glut_dials.c glut_dstr.c glut_event.c glut_ext.c glut_fullscrn.c glut_gamemode.c glut_get.c glut_hel10.c glut_hel12.c glut_hel18.c glut_init.c glut_input.c glut_joy.c glut_key.c glut_keyctrl.c glut_keyup.c glut_mesa.c glut_modifier.c glut_mroman.c glut_overlay.c glut_roman.c glut_shapes.c glut_space.c glut_stroke.c glut_swap.c glut_swidth.c glut_tablet.c glut_teapot.c glut_tr10.c glut_tr24.c glut_util.c glut_vidresize.c glut_warp.c glut_win.c glut_winmisc.c win32_glx.c win32_menu.c win32_util.c win32_winproc.c win32_x11.c
+
+all : glutdll install
+
+!include "$(TOP)/glutwin32.mak"
+
+glutdll : $(GLUTDLL)
+
+CFLAGS = $(cvarsdll) $(CFLAGS)
+LFLAGS = $(dlllflags) $(LFLAGS)
+
+OBJS = $(SRCS:.c=.obj)
+LIBS = $(OPENGL) $(GLU) winmm.lib $(guilibsdll)
+
+$(GLUTDLL) : $(OBJS) glut.def
+ $(link) $(LFLAGS) -out:$(GLUTDLL) -def:glut.def $(OBJS) $(LIBS) -NODEFAULTLIB:$(GLUTLIB)
+
+install : $(GLUTDLL)
+ @echo "copying GLUT dynamic link library to system directory..."
+ -copy $(GLUTDLL) $(DLLINSTALL)
+ @echo "copying GLUT header file to include directory..."
+ -copy ..\..\include\GL\glut.h $(INCLUDEINSTALL)
+ @echo "copying GLUT import library to library directory..."
+ -copy $(GLUTLIB) $(LIBINSTALL)
+
+.c.obj :
+ $(cc) $(CFLAGS) -I . $*.c
+
+# explicit object dependencies for all source files
+
+win32_glx.obj: win32_glx.c win32_glx.h
+win32_x11.obj: win32_x11.c win32_x11.h
+win32_menu.obj: win32_menu.c glutint.h ..\..\include\GL\glut.h
+win32_util.obj: win32_util.c glutint.h
+win32_winproc.obj: win32_winproc.c glutint.h
+
+glut_mroman.obj: glut_mroman.c glutstroke.h glutint.h
+glut_roman.obj: glut_roman.c glutstroke.h glutint.h
+glut_hel12.obj: glut_hel12.c glutbitmap.h glutint.h
+glut_8x13.obj: glut_8x13.c glutbitmap.h glutint.h
+glut_hel18.obj: glut_hel18.c glutbitmap.h glutint.h
+glut_9x15.obj: glut_9x15.c glutbitmap.h glutint.h
+glut_tr10.obj: glut_tr10.c glutbitmap.h glutint.h
+glut_hel10.obj: glut_hel10.c glutbitmap.h glutint.h
+glut_tr24.obj: glut_tr24.c glutbitmap.h glutint.h
+
+glut_bitmap.obj: glut_bitmap.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_bwidth.obj: glut_bwidth.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_cindex.obj: glut_cindex.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_cmap.obj: glut_cmap.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_cursor.obj: glut_cursor.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_dials.obj: glut_dials.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_dstr.obj: glut_dstr.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_event.obj: glut_event.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_ext.obj: glut_ext.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_fullscrn.obj: glut_fullscrn.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_gamemode.obj: glut_gamemode.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_get.obj: glut_get.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_init.obj: glut_init.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_input.obj: glut_input.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_joy.obj: glut_joy.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_key.obj: glut_key.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_keyctrl.obj: glut_keyctrl.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_keyup.obj: glut_keyup.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_mesa.obj: glut_mesa.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_modifier.obj: glut_modifier.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_overlay.obj: glut_overlay.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_shapes.obj: glut_shapes.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_space.obj: glut_space.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_swap.obj: glut_swap.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_swidth.obj: glut_swidth.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_tablet.obj: glut_tablet.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_teapot.obj: glut_teapot.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_util.obj: glut_util.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_vidresize.obj: glut_vidresize.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_warp.obj: glut_warp.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_win.obj: glut_win.c glutint.h ..\..\include\GL\glut.h glutwin32.h
+glut_winmisc.obj: glut_winmisc.c glutint.h ..\..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+
diff --git a/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/ReadMe.md b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/ReadMe.md
new file mode 100644
index 00000000000..c30e1a3e4eb
--- /dev/null
+++ b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/ReadMe.md
@@ -0,0 +1 @@
+Needef files for compiling glut!
diff --git a/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/glutwin32.mak b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/glutwin32.mak
new file mode 100644
index 00000000000..8f4252a8e4e
--- /dev/null
+++ b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/glutwin32.mak
@@ -0,0 +1,79 @@
+
+# Be sure to modify the definitions in this file to agree with your
+# systems installation.
+# NOTE: be sure that the install directories use '\' not '/' for paths.
+
+
+# MSVC install directories
+LIBINSTALL = "F:\\workspace\\osg-3rdParty-install\\glut\\lib"
+INCLUDEINSTALL = "F:\\workspace\\osg-3rdParty-install\\glut\\include\\GL"
+
+# Win95 dll directory
+#DLLINSTALL = "F:\\workspace\\osg-3rdParty-install\\glut\\bin"
+
+# WinNT dll directory
+DLLINSTALL = "F:\\workspace\\osg-3rdParty-install\\glut\\bin"
+
+# Microsoft OpenGL libraries
+#
+GLU = glu32.lib
+OPENGL = opengl32.lib
+GLUT = $(TOP)/lib/glut/glut.lib
+GLUTLIB = glut.lib
+GLUTDLL = glut.dll
+
+# SGI OpenGL for Windows libraries (formerly Cosmo OpenGL)
+# >> To use, uncomment lines below and comment out the similiar
+# >> lines above. You can download SGI OpenGL for Windows for
+# >> free from http://www.meer.net/~gold/OpenGL/opengl2.exe
+#
+#GLU = \oglsdk\lib\glu.lib
+#OPENGL = \oglsdk\lib\opengl.lib
+#GLUT = $(TOP)/lib/glut/glut.lib
+#GLUTLIB = glut.lib
+#GLUTDLL = glut.dll
+
+# The Micro UI lib
+MUI = $(TOP)/lib/mui/mui.lib
+
+# The OpenGL Extrusion and Tubing lib
+GLE = $(TOP)/lib/gle/gle.lib
+
+# The OpenGL Sphere Mapping lib
+GLSMAP = $(TOP)/lib/glsmap/glsmap.lib
+
+# common definitions used by all makefiles
+CFLAGS = $(cflags) $(cdebug) $(EXTRACFLAGS) -DWIN32 -I$(TOP)/include
+LIBS = $(lflags) $(ldebug) $(EXTRALIBS) $(GLUT) $(GLU) $(OPENGL) $(guilibs)
+EXES = $(SRCS:.c=.exe) $(CPPSRCS:.cpp=.exe)
+
+!IFNDEF NODEBUG
+lcommon = /NODEFAULTLIB /INCREMENTAL:NO /DEBUG /NOLOGO
+!ENDIF
+
+# default rule
+default : $(EXES)
+
+# cleanup rules
+clean ::
+ @del /f *.obj
+ @del /f *.pdb
+ @del /f *.ilk
+ @del /f *.ncb
+ @del /f *~
+ @del /f *.exp
+
+clobber :: clean
+ @del /f *.exe
+ @del /f *.dll
+ @del /f *.lib
+ -@del /f $(LDIRT)
+
+# inference rules
+$(EXES) : $*.obj $(DEPLIBS)
+ echo $@
+ $(link) -out:$@ $** $(LIBS)
+.c.obj :
+ $(CC) $(CFLAGS) $<
+.cpp.obj :
+ $(CC) $(CFLAGS) $<
diff --git a/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/particle.c b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/particle.c
new file mode 100644
index 00000000000..153ebf29561
--- /dev/null
+++ b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/particle.c
@@ -0,0 +1,638 @@
+/*
+ particle.c
+ Nate Robins, 1997
+
+ An example of a simple particle system.
+
+ */
+
+
+#include
+#include
+#include
+#include
+#include
+
+
+#ifdef _WIN32
+#define drand48() ((float)rand()/RAND_MAX)
+#endif
+
+
+/* #define SCREEN_SAVER_MODE */
+
+#define PS_GRAVITY -9.8
+#define PS_WATERFALL 0
+#define PS_FOUNTAIN 1
+
+
+typedef struct {
+ float x, y, z;
+ float radius;
+} PSsphere;
+
+typedef struct {
+ float position[3]; /* current position */
+ float previous[3]; /* previous position */
+ float velocity[3]; /* velocity (magnitude & direction) */
+ float dampening; /* % of energy lost on collision */
+ int alive; /* is this particle alive? */
+} PSparticle;
+
+
+PSparticle* particles = NULL;
+PSsphere sphere = { 0, 1, 0, 0.25 };
+int num_particles = 5000;
+int type = PS_WATERFALL;
+int points = 1;
+int do_sphere = 0;
+int frame_rate = 1;
+float frame_time = 0;
+float flow = 500;
+float slow_down = 1;
+
+float spin_x = 0;
+float spin_y = 0;
+int point_size = 3;
+
+#if defined(_WIN32)
+#include
+#else
+#include
+#include
+#include
+#include
+#endif
+
+/* timedelta: returns the number of seconds that have elapsed since
+ the previous call to the function. */
+float
+timedelta(void)
+{
+ static long begin = 0;
+ static long finish, difference;
+
+#if defined(_WIN32)
+ static struct timeb tb;
+
+ ftime(&tb);
+ finish = tb.time*1000+tb.millitm;
+#else
+ static struct tms tb;
+
+ finish = times(&tb);
+#endif
+
+ difference = finish - begin;
+ begin = finish;
+
+ return (float)difference/(float)1000; /* CLK_TCK=1000 */
+}
+
+
+/* text: draws a string of text with an 18 point helvetica bitmap font
+ at position (x,y) in window space (bottom left corner is (0,0). */
+void
+text(int x, int y, char* s)
+{
+ int lines;
+ char* p;
+
+ glDisable(GL_DEPTH_TEST);
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+ glOrtho(0, glutGet(GLUT_WINDOW_WIDTH),
+ 0, glutGet(GLUT_WINDOW_HEIGHT), -1, 1);
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+ glColor3ub(0, 0, 0);
+ glRasterPos2i(x+1, y-1);
+ for(p = s, lines = 0; *p; p++) {
+ if (*p == '\n') {
+ lines++;
+ glRasterPos2i(x+1, y-1-(lines*18));
+ }
+ glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, *p);
+ }
+ glColor3ub(128, 0, 255);
+ glRasterPos2i(x, y);
+ for(p = s, lines = 0; *p; p++) {
+ if (*p == '\n') {
+ lines++;
+ glRasterPos2i(x, y-(lines*18));
+ }
+ glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, *p);
+ }
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+ glEnable(GL_DEPTH_TEST);
+}
+
+
+int
+fequal(float a, float b)
+{
+ float epsilon = 0.1;
+ float f = a - b;
+
+ if (f < epsilon && f > -epsilon)
+ return 1;
+ else
+ return 0;
+}
+
+
+void
+psTimeStep(PSparticle* p, float dt)
+{
+ if (p->alive == 0)
+ return;
+
+ p->velocity[0] += 0;
+ p->velocity[1] += PS_GRAVITY*dt;
+ p->velocity[2] += 0;
+
+ p->previous[0] = p->position[0];
+ p->previous[1] = p->position[1];
+ p->previous[2] = p->position[2];
+
+ p->position[0] += p->velocity[0]*dt;
+ p->position[1] += p->velocity[1]*dt;
+ p->position[2] += p->velocity[2]*dt;
+}
+
+
+void
+psNewParticle(PSparticle* p, float dt)
+{
+ if (type == PS_WATERFALL) {
+ p->velocity[0] = 1*(drand48()-0.5);
+ p->velocity[1] = 0;
+ p->velocity[2] = 0.5*(drand48()-0.0);
+ p->position[0] = 0;
+ p->position[1] = 2;
+ p->position[2] = 0;
+ p->previous[0] = p->position[0];
+ p->previous[1] = p->position[1];
+ p->previous[2] = p->position[2];
+ p->dampening = 0.45*drand48();
+ p->alive = 1;
+ } else if (type == PS_FOUNTAIN) {
+ p->velocity[0] = 2*(drand48()-0.5);
+ p->velocity[1] = 6;
+ p->velocity[2] = 2*(drand48()-0.5);
+ p->position[0] = 0;
+ p->position[1] = 0;
+ p->position[2] = 0;
+ p->previous[0] = p->position[0];
+ p->previous[1] = p->position[1];
+ p->previous[2] = p->position[2];
+ p->dampening = 0.35*drand48();
+ p->alive = 1;
+ }
+
+ psTimeStep(p, 2*dt*drand48());
+}
+
+
+/* psBounce: the particle has gone past (or exactly hit) the ground
+ plane, so calculate the time at which the particle actually
+ intersected the ground plane (s). essentially, this just rolls
+ back time to when the particle hit the ground plane, then starts
+ time again from then.
+
+ - - o A (previous position)
+ | | \
+ | s \ o (position it _should_ be at) -
+ t | \ / | t - s
+ | - ------X-------- -
+ | \
+ - o B (new position)
+
+ A + V*s = 0 or s = -A/V
+
+ to calculate where the particle should be:
+
+ A + V*t + V*(t-s)*d
+
+ where d is a damping factor which accounts for the loss
+ of energy due to the bounce. */
+void
+psBounce(PSparticle* p, float dt)
+{
+ float s;
+
+ if (p->alive == 0)
+ return;
+
+ /* since we know it is the ground plane, we only need to
+ calculate s for a single dimension. */
+ s = -p->previous[1]/p->velocity[1];
+
+ p->position[0] = (p->previous[0] + p->velocity[0] * s +
+ p->velocity[0] * (dt-s) * p->dampening);
+ p->position[1] = -p->velocity[1] * (dt-s) * p->dampening; /* reflect */
+ p->position[2] = (p->previous[2] + p->velocity[2] * s +
+ p->velocity[2] * (dt-s) * p->dampening);
+
+ /* damp the reflected velocity (since the particle hit something,
+ it lost some energy) */
+ p->velocity[0] *= p->dampening;
+ p->velocity[1] *= -p->dampening; /* reflect */
+ p->velocity[2] *= p->dampening;
+}
+
+void
+psCollide(PSparticle* p)
+{
+ float vx = p->position[0] - sphere.x;
+ float vy = p->position[1] - sphere.y;
+ float vz = p->position[2] - sphere.z;
+ float distance;
+
+ if (p->alive == 0)
+ return;
+
+ distance = sqrt(vx*vx + vy*vy + vz*vz);
+
+ if (distance < sphere.radius) {
+#if 0
+ vx /= distance; vy /= distance; vz /= distance;
+ d = 2*(-vx*p->velocity[0] + -vy*p->velocity[1] + -vz*p->velocity[2]);
+ p->velocity[0] += vx*d*2;
+ p->velocity[1] += vy*d*2;
+ p->velocity[2] += vz*d*2;
+ d = sqrt(p->velocity[0]*p->velocity[0] +
+ p->velocity[1]*p->velocity[1] +
+ p->velocity[2]*p->velocity[2]);
+ p->velocity[0] /= d;
+ p->velocity[1] /= d;
+ p->velocity[2] /= d;
+#else
+ p->position[0] = sphere.x+(vx/distance)*sphere.radius;
+ p->position[1] = sphere.y+(vy/distance)*sphere.radius;
+ p->position[2] = sphere.z+(vz/distance)*sphere.radius;
+ p->previous[0] = p->position[0];
+ p->previous[1] = p->position[1];
+ p->previous[2] = p->position[2];
+ p->velocity[0] = vx/distance;
+ p->velocity[1] = vy/distance;
+ p->velocity[2] = vz/distance;
+#endif
+ }
+}
+
+
+void
+reshape(int width, int height)
+{
+ float black[] = { 0, 0, 0, 0 };
+
+ glViewport(0, 0, width, height);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ gluPerspective(60, 1, 0.1, 1000);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ gluLookAt(0, 1, 3, 0, 1, 0, 0, 1, 0);
+ glFogfv(GL_FOG_COLOR, black);
+ glFogf(GL_FOG_START, 2.5);
+ glFogf(GL_FOG_END, 4);
+ glEnable(GL_FOG);
+ glFogi(GL_FOG_MODE, GL_LINEAR);
+ glPointSize(point_size);
+ glEnable(GL_POINT_SMOOTH);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_COLOR_MATERIAL);
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_LIGHT0);
+
+ timedelta();
+}
+
+
+void
+display(void)
+{
+ static int i;
+ static float c;
+ static char s[32];
+ static int frames = 0;
+
+ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
+ glPushMatrix();
+
+ glRotatef(spin_y, 1, 0, 0);
+ glRotatef(spin_x, 0, 1, 0);
+
+ glEnable(GL_LIGHTING);
+ if (do_sphere) {
+ glPushMatrix();
+ glTranslatef(sphere.x, sphere.y, sphere.z);
+ glColor3ub(0, 255, 128);
+ glutSolidSphere(sphere.radius, 16, 16);
+ glPopMatrix();
+ }
+ glDisable(GL_LIGHTING);
+
+ glBegin(GL_QUADS);
+ glColor3ub(0, 128, 255);
+ glVertex3f(-2, 0, -2);
+ glVertex3f(-2, 0, 2);
+ glVertex3f(2, 0, 2);
+ glVertex3f(2, 0, -2);
+ glEnd();
+
+ if (points) {
+ glBegin(GL_POINTS);
+
+ for (i = 0; i < num_particles; i++) {
+ if (particles[i].alive == 0)
+ continue;
+ c = particles[i].position[1]/2.1*255;
+ glColor3ub((GLubyte) c, (GLubyte) (128+c*0.5), 255);
+ glVertex3fv(particles[i].position);
+ }
+ glEnd();
+ } else {
+ glBegin(GL_LINES);
+ for (i = 0; i < num_particles; i++) {
+ if (particles[i].alive == 0)
+ continue;
+ c = particles[i].previous[1]/2.1*255;
+ glColor3ub((GLubyte) c, (GLubyte) (128+c*0.5), 255);
+ glVertex3fv(particles[i].previous);
+ c = particles[i].position[1]/2.1*255;
+ glColor3ub((GLubyte) c, (GLubyte) (128+c*0.5), 255);
+ glVertex3fv(particles[i].position);
+ }
+ glEnd();
+ }
+
+ /* spit out frame rate. */
+ if (frame_rate) {
+ frames++;
+ if (frames > 7) {
+ sprintf(s, "%g fps", (float)7/frame_time);
+ frame_time = 0;
+ frames = 0;
+ }
+ text(5, 5, s);
+ }
+
+ glPopMatrix();
+ glutSwapBuffers();
+}
+
+void
+idleFunc(void)
+{
+ static int i;
+ static int living = 0; /* index to end of live particles */
+ static float dt;
+
+ dt = timedelta();
+ frame_time += dt;
+
+#if 1
+ /* slow the simulation if we can't keep the frame rate up around
+ 10 fps */
+ if (dt > 0.1) {
+ slow_down = 0.75;
+ } else if (dt < 0.1) {
+ slow_down = 1;
+ }
+#endif
+
+ dt *= slow_down;
+
+ /* resurrect a few particles */
+ for (i = 0; i < flow*dt; i++) {
+ psNewParticle(&particles[living], dt);
+ living++;
+ if (living >= num_particles)
+ living = 0;
+ }
+
+ for (i = 0; i < num_particles; i++) {
+ psTimeStep(&particles[i], dt);
+
+ /* collision with sphere? */
+ if (do_sphere) {
+ psCollide(&particles[i]);
+ }
+
+ /* collision with ground? */
+ if (particles[i].position[1] <= 0) {
+ psBounce(&particles[i], dt);
+ }
+
+ /* dead particle? */
+ if (particles[i].position[1] < 0.1 &&
+ fequal(particles[i].velocity[1], 0)) {
+ particles[i].alive = 0;
+ }
+ }
+
+ glutPostRedisplay();
+}
+
+void
+visible(int state)
+{
+ if (state == GLUT_VISIBLE) {
+ timedelta();
+ glutIdleFunc(idleFunc);
+ } else {
+ glutIdleFunc(NULL);
+ }
+}
+
+void
+bail(int code)
+{
+ free(particles);
+ exit(code);
+}
+
+#ifdef SCREEN_SAVER_MODE
+/* ARGSUSED */
+void
+ss_keyboard(char key, int x, int y)
+{
+ bail(0);
+}
+
+/* ARGSUSED */
+void
+ss_mouse(int button, int state, int x, int y)
+{
+ bail(0);
+}
+
+/* ARGSUSED */
+void
+ss_passive(int x, int y)
+{
+ static int been_here = 0;
+
+ /* for some reason, GLUT sends an initial passive motion callback
+ when a window is initialized, so this would immediately
+ terminate the program. to get around this, see if we've been
+ here before. (actually if we've been here twice.) */
+
+ if (been_here > 1)
+ bail(0);
+ been_here++;
+}
+
+#else
+
+/* ARGSUSED1 */
+void
+keyboard(unsigned char key, int x, int y)
+{
+ static int fullscreen = 0;
+ static int old_x = 50;
+ static int old_y = 50;
+ static int old_width = 320;
+ static int old_height = 320;
+
+ switch (key) {
+ case 27:
+ bail(0);
+ break;
+
+ case 'w':
+ type = PS_WATERFALL;
+ break;
+
+ case 'f':
+ type = PS_FOUNTAIN;
+ break;
+
+ case 's':
+ do_sphere = !do_sphere;
+ break;
+
+ case 'l':
+ points = !points;
+ break;
+
+ case 'P':
+ point_size++;
+ glPointSize(point_size);
+ break;
+
+ case 'p':
+ point_size--;
+ if (point_size < 1)
+ point_size = 1;
+ glPointSize(point_size);
+ break;
+
+ case '+':
+ flow += 100;
+ if (flow > num_particles)
+ flow = num_particles;
+ printf("%g particles/second\n", flow);
+ break;
+
+ case '-':
+ flow -= 100;
+ if (flow < 0)
+ flow = 0;
+ printf("%g particles/second\n", flow);
+ break;
+
+ case '~':
+ fullscreen = !fullscreen;
+ if (fullscreen) {
+ old_x = glutGet(GLUT_WINDOW_X);
+ old_y = glutGet(GLUT_WINDOW_Y);
+ old_width = glutGet(GLUT_WINDOW_WIDTH);
+ old_height = glutGet(GLUT_WINDOW_HEIGHT);
+ glutFullScreen();
+ } else {
+ glutReshapeWindow(old_width, old_height);
+ glutPositionWindow(old_x, old_y);
+ }
+ break;
+ }
+}
+
+#endif
+
+int old_x, old_y;
+
+/* ARGSUSED */
+void
+mouse(int button, int state, int x, int y)
+{
+ old_x = x;
+ old_y = y;
+
+ glutPostRedisplay();
+}
+
+void
+motion(int x, int y)
+{
+ spin_x = x - old_x;
+ spin_y = y - old_y;
+
+ glutPostRedisplay();
+}
+
+int
+main(int argc, char** argv)
+{
+ glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH|GLUT_DOUBLE);
+ glutInitWindowPosition(50, 50);
+ glutInitWindowSize(320, 320);
+ glutInit(&argc, argv);
+
+ if (argc > 1 && !strcmp(argv[1], "-fullscreen")) {
+ glutGameModeString("640x480:16@60");
+ glutEnterGameMode();
+ } else {
+ glutCreateWindow("Particles");
+ }
+
+ glutDisplayFunc(display);
+ glutReshapeFunc(reshape);
+#ifdef SCREEN_SAVER_MODE
+ glutPassiveMotionFunc(ss_passive);
+ glutKeyboardFunc(ss_keyboard);
+ glutMouseFunc(ss_mouse);
+ glutSetCursor(GLUT_CURSOR_NONE);
+ glutFullScreen();
+#else
+ glutMotionFunc(motion);
+ glutMouseFunc(mouse);
+ glutKeyboardFunc(keyboard);
+#endif
+
+ if (argc > 1) {
+ if (strcmp(argv[1], "-h") == 0) {
+ fprintf(stderr, "%s [particles] [flow] [speed%%]\n", argv[0]);
+ exit(0);
+ }
+ sscanf(argv[1], "%d", &num_particles);
+ if (argc > 2)
+ sscanf(argv[2], "%f", &flow);
+ if (argc > 3)
+ sscanf(argv[3], "%f", &slow_down);
+ }
+
+ particles = (PSparticle*)malloc(sizeof(PSparticle) * num_particles);
+
+ glutVisibilityFunc(visible);
+ glutMainLoop();
+ return 0;
+}
diff --git a/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/win32.Mak b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/win32.Mak
new file mode 100644
index 00000000000..2b47becdc40
--- /dev/null
+++ b/osg-install-jing_zhong/glut-nmake-compile-NeedFiles/win32.Mak
@@ -0,0 +1,671 @@
+# Win32.Mak - Win32 application master NMAKE definitions file for the
+# Microsoft Windows SDK programming samples
+# Copyright (C) Microsoft Corporation
+# -------------------------------------------------------------------------
+# This files should be included at the top of all MAKEFILEs as follows:
+# !include
+# -------------------------------------------------------------------------
+#
+# Define APPVER = [ 4.0 | 5.0 | 5.01 | 5.02 | 6.0 | 6.1] prior to including win32.mak to get
+# build time checking for version dependencies and to mark the executable
+# with version information.
+#
+# Define TARGETOS = [ WIN95 | WINNT | BOTH ] prior to including win32.mak
+# to get some build time checking for platform dependencies.
+#
+# Define TARGETLANG = [ LANG_JAPANESE | LANG_CHINESE | LANG_KOREAN ] prior
+# to including win32.mak to getcompile & link flags for building
+# applications to run on Far-East Windows. (This is an optional parameter.
+# The system locale is the default.)
+#
+# Define _WIN32_IE = [ 0x0300 | 0x0400 | 0x0500 | 0x0600 | 0x0700 | 0x0800] prior to including win32.mak to
+# get compile and link flags for building applications and components to
+# run on Internet Explorer. (This is an optional parameter. IE 4.0 is
+# the default.)
+#
+# -------------------------------------------------------------------------
+# NMAKE Options
+#
+# Use the table below to determine the additional options for NMAKE to
+# generate various application debugging, profiling and performance tuning
+# information.
+#
+# Application Information Type Invoke NMAKE
+# ---------------------------- ------------
+# For No Debugging Info nmake nodebug=1
+# For Working Set Tuner Info nmake tune=1
+# For Call Attributed Profiling Info nmake profile=1
+#
+# Note: The three options above are mutually exclusive (you may use only
+# one to compile/link the application).
+#
+# Note: creating the environment variables NODEBUG, TUNE, and PROFILE is an
+# alternate method to setting these options via the nmake command line.
+#
+# Note: TUNE and PROFILE do nothing for 64bit compilation
+#
+# Additional NMAKE Options Invoke NMAKE
+# ---------------------------- ------------
+# For No ANSI NULL Compliance nmake no_ansi=1
+# (ANSI NULL is defined as PVOID 0)
+#
+# =========================================================================
+# Build Rules Quick Start
+#
+# To build one of the following types of executables, use the specified
+# compiler and linker command-line options.
+#
+# ---------------------------------------------------------------------------
+# To build: | Compiler Options | Linker options (pick one
+# | | line. con = console,
+# | | gui = GUI, ole = GUI OLE)
+# ---------------------------------------------------------------------------
+# Single threaded | cdebug cflags cvars | ldebug guilflags guilibs
+# app with static | | ldebug conlflags conlibs
+# CRT | | ldebug guilflags olelibs
+# ---------------------------------------------------------------------------
+# Multithreaded app | cdebug cflags cvarsmt | ldebug guilflags guilibsmt
+# with static CRT | | ldebug conlflags conlibsmt
+# | | ldebug guilflags olelibsmt
+# ---------------------------------------------------------------------------
+# Single or multi- | cdebug cflags cvarsdll | ldebug guilflags guilibsdll
+# threaded app with | | ldebug conlflags conlibsdll
+# DLL version of CRT | | ldebug guilflags olelibsdll
+# (MSVCRT.DLL) | |
+# ---------------------------------------------------------------------------
+# DLL with static | cdebug cflags cvarsmt | ldebug dlllflags guilibsmt
+# CRT* | | ldebug dlllflags conlibsmt
+# | | ldebug dlllflags olelibsmt
+# ---------------------------------------------------------------------------
+# DLL with DLL | cdebug cflags cvarsdll | ldebug dlllflags guilibsdll
+# version of CRT | | ldebug dlllflags conlibsdll
+# (MSVCRT.DLL) | | ldebug dlllflags olelibsdll
+# ---------------------------------------------------------------------------
+#
+# * Always make DLLs multithreaded because a DLL has no way to know whether
+# the calling application has multiple threads, and has no way to prevent
+# multithreaded apps from loading it.
+#
+# To specify an Intel x86 build that defaults to stdcall, add scall to the
+# list of compiler options.
+#
+# =========================================================================
+
+!IFNDEF _WIN32_MAK_
+_WIN32_MAK_ = 1
+
+# -------------------------------------------------------------------------
+# Get CPU Type - exit if CPU environment variable is not defined
+# -------------------------------------------------------------------------
+
+# Win95 does not define PROCESSOR_ARCHITECTURE - default to i386
+
+!IF "$(PROCESSOR_ARCHITECTURE)" == ""
+CPU=i386
+PROCESSOR_ARCHITECTURE=x86
+!endif
+
+!IF !DEFINED(CPU) || "$(CPU)" == ""
+CPU = $(PROCESSOR_ARCHITECTURE)
+!ENDIF # CPU
+
+# if PROCESSOR_ARCHITECTURE was x86 or X86 change CPU to i386
+
+!IF ( "$(CPU)" == "X86" ) || ( "$(CPU)" == "x86" )
+CPU = i386
+!ENDIF # CPU == X86
+
+!IF "$(CPU)" != "i386"
+!IF "$(CPU)" != "IA64"
+!IF "$(CPU)" != "AMD64"
+!ERROR Must specify CPU environment variable ( CPU=i386, CPU=IA64, CPU=AMD64)
+!ENDIF
+!ENDIF
+!ENDIF
+
+
+# -------------------------------------------------------------------------
+# Get Target Operating System - Default to WINNT
+# -------------------------------------------------------------------------
+!IFNDEF TARGETOS
+TARGETOS = WINNT
+!ENDIF
+
+!IF "$(TARGETOS)" != "WINNT"
+!IF "$(TARGETOS)" != "WIN95"
+!IF "$(TARGETOS)" != "BOTH"
+!ERROR Must specify TARGETOS environment variable (BOTH, WIN95, WINNT)
+!ENDIF
+!ENDIF
+!ENDIF
+
+# default to APPVER of 5.0
+
+!IFNDEF APPVER
+APPVER = 5.0
+!ENDIF
+
+!IF "$(APPVER)" != "6.1"
+!IF "$(APPVER)" != "6.0"
+!IF "$(APPVER)" != "5.02"
+!IF "$(APPVER)" != "5.01"
+!IF "$(APPVER)" != "5.0"
+!IF "$(APPVER)" != "4.0"
+!ERROR Must specify APPVER environment variable (4.0, 5.0, 5.01, 5.02, 6.0, 6.1)
+!ENDIF
+!ENDIF
+!ENDIF
+!ENDIF
+!ENDIF
+!ENDIF
+
+!IF "$(APPVER)" =="6.1"
+!IFNDEF _WIN32_IE
+_WIN32_IE = 0x0800
+!ENDIF # _WIN32_IE
+!ENDIF # APPVER == 6.1
+
+!IF "$(APPVER)" =="6.0"
+!IFNDEF _WIN32_IE
+_WIN32_IE = 0x0700
+!ENDIF # _WIN32_IE
+!ENDIF # APPVER == 6.0
+
+!IF "$(APPVER)" =="5.0"
+!IFNDEF _WIN32_IE
+_WIN32_IE = 0x0500
+!ENDIF # _WIN32_IE
+!ENDIF # APPVER == 5.0
+
+!IF "$(APPVER)" =="5.01"
+!IFNDEF _WIN32_IE
+_WIN32_IE = 0x0600
+!ENDIF # _WIN32_IE
+!ENDIF # APPVER == 5.01
+
+!IF "$(APPVER)" =="5.02"
+!IFNDEF _WIN32_IE
+_WIN32_IE = 0x0600
+!ENDIF # _WIN32_IE
+!ENDIF # APPVER == 5.02
+
+!IFNDEF _WIN32_IE
+_WIN32_IE = 0x0400
+!ENDIF
+
+# -------------------------------------------------------------------------
+# Build tool declarations common to all platforms
+# Check to see if Cole Porter is used, otherwise use C/C++ compiler
+# -------------------------------------------------------------------------
+
+cc = cl
+link = link
+implib = lib
+
+midl = midl
+rc = Rc
+hc = Start /Wait Hcrtf
+mc = Mc
+
+hcvars = -xn
+
+# -------------------------------------------------------------------------
+# Platform Dependent Compile Flags - must be specified after $(cc)
+#
+# Note: Debug switches are on by default for current release
+#
+# These switches set code generation and debugging options for the compiler.
+# They also set macros used for conditional compilation.
+#
+# The debugging switches allow for source level debugging with WinDebug or
+# Microsoft Visual C++.
+#
+# Common compiler flags:
+# -c - compile without linking
+# -W3 - Set warning level to level 3 (-W4 for 64-bit compilations)
+# -Zi - generate debugging information
+# -Od - disable all optimizations
+# -Ox - use maximum optimizations
+# -Zd - generate only public symbols and line numbers for debugging
+# -GS - enable security checks
+#
+# i386 specific compiler flags:
+# -Gz - stdcall (only if scall is added to makefile's compiler build rules)
+#
+# -------------------------------------------------------------------------
+
+# declarations common to all compiler options
+ccommon = -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
+
+# for compatibility with old source code, map {try, except, leave, finally}
+# to their proper names (i.e. prefaced by "__")
+!IFDEF SEHMAP
+ccommon = $(ccommon) -FIsehmap.h
+!ENDIF
+
+!IF "$(TARGETLANG)" == "LANG_JAPANESE"
+ccommon = $(ccommon) -DJAPAN -DDBCS -DFE_IME
+!ENDIF
+
+!IF "$(TARGETLANG)" == "LANG_CHINESE"
+ccommon = $(ccommon) -DDBCS -DFE_IME
+!ENDIF
+
+!IF "$(TARGETLANG)" == "LANG_KOREAN"
+ccommon = $(ccommon) -DDBCS -DFE_IME
+!ENDIF
+
+!IF "$(CPU)" == "i386"
+cflags = $(ccommon) -D_X86_=1 -DWIN32 -D_WIN32 -W3
+scall = -Gz
+
+!ELSEIF "$(CPU)" == "IA64"
+cflags = $(ccommon) -D_IA64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32
+cflags = $(cflags) -W4
+scall =
+
+!ELSEIF "$(CPU)" == "AMD64"
+cflags = $(ccommon) -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32
+cflags = $(cflags) -W4
+scall =
+
+!ENDIF
+
+
+!IF "$(APPVER)" == "4.0"
+NMAKE_WINVER = 0x0400
+!ELSEIF "$(APPVER)" == "5.0"
+NMAKE_WINVER = 0x0500
+!ELSEIF "$(APPVER)" == "5.01"
+NMAKE_WINVER = 0x0501
+!ELSEIF "$(APPVER)" == "5.02"
+NMAKE_WINVER = 0x0502
+!ELSEIF "$(APPVER)" == "6.0"
+NMAKE_WINVER = 0x0600
+!ELSEIF "$(APPVER)" == "6.1"
+NMAKE_WINVER = 0x0601
+!ENDIF
+
+!IF "$(TARGETOS)" == "WINNT"
+cflags = $(cflags) -D_WINNT -D_WIN32_WINNT=$(NMAKE_WINVER) -DNTDDI_VERSION=$(NMAKE_WINVER)0000
+!ENDIF
+
+!IF "$(TARGETOS)" == "WIN95"
+cflags = $(cflags) -D_WIN95 -D_WIN32_WINDOWS=$(NMAKE_WINVER) /D_WIN32_DCOM
+!ENDIF
+
+# regardless of the TARGET OS, define compile time WINVER to match APPVER macro
+cflags = $(cflags) -D_WIN32_IE=$(_WIN32_IE) -DWINVER=$(NMAKE_WINVER)
+
+
+# Set debugging options
+
+!IF "$(CPU)" != "IA64"
+!IFDEF NODEBUG
+cdebug = -Ox -DNDEBUG
+!ELSE IFDEF PROFILE
+cdebug = -Gh -Ox -DNDEBUG
+!ELSE IFDEF TUNE
+cdebug = -Gh -Ox -DNDEBUG
+!ELSE
+cdebug = -Zi -Od -DDEBUG
+!ENDIF
+
+!ELSE
+
+!IFDEF NODEBUG
+cdebug = -Ox -DNDEBUG
+!ELSE
+cdebug = -Zi -Od -DDEBUG
+!ENDIF
+
+!ENDIF
+
+# -------------------------------------------------------------------------
+# Target Module & Subsystem Dependent Compile Defined Variables - must be
+# specified after $(cc)
+#
+# The following table indicates the various acceptable combinations of
+# the C Run-Time libraries LIBC, LIBCMT, and MSVCRT respect to the creation
+# of a EXE and/or DLL target object. The appropriate compiler flag macros
+# that should be used for each combination are also listed.
+#
+# Executable Type C Runtime Lib Compiler switch
+# -------------------------------------------------------------
+# Single threaded app static CRT CVARS *
+# Single-threaded app DLL CRT CVARSDLL
+# Multi-threaded app static CRT CVARSMT *
+# Multi-threaded app DLL CRT CVARSDLL *
+#
+# Single threaded DLL static CRT CVARS
+# Single-threaded DLL DLL CRT CVARSDLL
+# Multi-threaded DLL static CRT CVARSMT *
+# Multi-threaded DLL DLL CRT CVARSDLL *
+#
+# * - Denotes the Recommended Configuration
+#
+# When building single-threaded applications you can link your executable
+# with either LIBC, LIBCMT, or MSVCRT, although LIBC will provide the best
+# performance.
+#
+# When building multi-threaded applications, either LIBCMT or MSVCRT can
+# be used as the C-Runtime library, as both are multi-thread safe.
+#
+# Note: Any executable which accesses a DLL linked with MSVCRT.LIB must
+# also link with MSVCRT.LIB instead of LIBC.LIB or LIBCMT.LIB.
+# When using DLLs, it is recommended that all of the modules be
+# linked with MSVCRT.LIB.
+#
+# Note: The macros of the form xDLL are used when linking the object with
+# the DLL version of the C Run-Time (that is, MSVCRT.LIB). They are
+# not used when the target object is itself a DLL.
+#
+# -------------------------------------------------------------------------
+
+!IFDEF NO_ANSI
+noansi = -DNULL=0
+!ENDIF
+
+
+# for Windows applications that use the C Run-Time libraries
+!IFDEF NODEBUG
+cvarsmt = $(noansi) -D_MT -MT
+cvars = $(cvarsmt)
+cvarsdll = $(noansi) -D_MT -D_DLL -MD
+!ELSE
+cvarsmt = $(noansi) -D_MT -MTd
+cvars = $(cvarsmt)
+cvarsdll = $(noansi) -D_MT -D_DLL -MDd
+!ENDIF
+
+
+# for compatibility with older-style makefiles
+cvarsmtdll = $(cvarsdll)
+
+# for POSIX applications
+psxvars = -D_POSIX_
+
+# resource compiler
+rcflags = /r
+!ifdef NODEBUG
+rcvars = -DWIN32 -D_WIN32 -DWINVER=$(NMAKE_WINVER) $(noansi)
+!else
+rcvars = -DWIN32 -D_WIN32 -DWINVER=$(NMAKE_WINVER) -DDEBUG -D_DEBUG $(noansi)
+!endif
+
+
+!IF "$(TARGETLANG)" == "LANG_JAPANESE"
+rcflags = $(rcflags) /c932
+rcvars = $(rcvars) -DJAPAN -DDBCS -DFE_IME
+!ENDIF
+
+!IF "$(TARGETLANG)" == "LANG_CHINESE"
+rcvars = $(rcvars) -DDBCS -DFE_IME
+!ENDIF
+
+!IF "$(TARGETLANG)" == "LANG_KOREAN"
+rcvars = $(rcvars) -DDBCS -DFE_IME
+!ENDIF
+
+
+# -------------------------------------------------------------------------
+# Platform Dependent MIDL Flags - must be specified after midl
+#
+#
+# -------------------------------------------------------------------------
+!IF "$(TARGETOS)" == "WIN95"
+MIDL_OPTIMIZATION=-target NT40
+!ELSEIF "$(TARGETOS)" == "WINNT"
+!IF "$(APPVER)" == "5.0"
+MIDL_OPTIMIZATION=-target NT50
+!ELSEIF "$(APPVER)" == "6.0"
+MIDL_OPTIMIZATION=-target NT60
+!ELSEIF "$(APPVER)" == "6.1"
+MIDL_OPTIMIZATION=-target NT61
+!ELSEIF "$(APPVER)" == "5.01"
+MIDL_OPTIMIZATION=-target NT51
+!ELSEIF "$(APPVER)" == "5.02"
+MIDL_OPTIMIZATION=-target NT51
+!ELSEIF "$(APPVER)" == "4.0"
+MIDL_OPTIMIZATION=-target NT40
+!ENDIF
+!ENDIF
+
+!IF "$(CPU)" == "IA64"
+MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /ia64
+!ELSEIF "$(CPU)" == "AMD64"
+MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /x64
+!ELSE
+MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /win32
+!ENDIF
+
+!IF ("$(TARGETOS)" == "WINNT" ) && ("$(APPVER)" != "4.0")
+MIDL_OPTIMIZATION = $(MIDL_OPTIMIZATION) /robust
+!ENDIF
+
+
+
+# -------------------------------------------------------------------------
+# Platform Dependent Link Flags - must be specified after $(link)
+#
+# Note: $(DLLENTRY) should be appended to each -entry: flag on the link
+# line.
+#
+# Note: When creating a DLL that uses C Run-Time functions it is
+# recommended to include the entry point function of the name DllMain
+# in the DLL's source code. Also, the MAKEFILE should include the
+# -entry:_DllMainCRTStartup$(DLLENTRY) option for the creation of
+# this DLL. (The C Run-Time entry point _DllMainCRTStartup in turn
+# calls the DLL defined DllMain entry point.)
+#
+# -------------------------------------------------------------------------
+
+# declarations common to all linker options
+lflags = $(lflags) /INCREMENTAL:NO /NOLOGO
+
+# declarations for use on Intel x86 systems
+!IF "$(CPU)" == "i386"
+DLLENTRY = @12
+!ENDIF
+
+# declarations for use on Intel Architecture 64-bit systems
+!IF "$(CPU)" == "IA64"
+DLLENTRY =
+!ENDIF
+
+# declarations for use on AMD64 systems
+!IF "$(CPU)" == "AMD64"
+DLLENTRY =
+!ENDIF
+
+
+# -------------------------------------------------------------------------
+# Target Module Dependent Link Debug Flags - must be specified after $(link)
+#
+# These switches allow the inclusion of the necessary symbolic information
+# for source level debugging with WinDebug, profiling and/or performance
+# tuning.
+#
+# Note: Debug switches are on by default.
+# -------------------------------------------------------------------------
+
+!IF "$(CPU)" == "i386"
+
+!IFDEF NODEBUG
+ldebug = /RELEASE
+!ELSE
+ldebug = /DEBUG /DEBUGTYPE:cv
+!ENDIF
+
+!ELSE
+
+!IFDEF NODEBUG
+ldebug = /RELEASE
+!ELSE IFDEF PROFILE
+ldebug = /DEBUG:mapped,partial /DEBUGTYPE:coff
+!ELSE IFDEF TUNE
+ldebug = /DEBUG:mapped,partial /DEBUGTYPE:coff
+!ELSE
+ldebug = /DEBUG /DEBUGTYPE:cv
+!ENDIF
+
+!ENDIF
+
+# for compatibility with older-style makefiles
+linkdebug = $(ldebug)
+
+
+# -------------------------------------------------------------------------
+# Subsystem Dependent Link Flags - must be specified after $(link)
+#
+# These switches allow for source level debugging with WinDebug for local
+# and global variables. They also provide the standard application type and
+# entry point declarations.
+#
+# Note that on x86 screensavers have a WinMain entrypoint, but on RISC
+# platforms it is main. This is a Win95 compatibility issue.
+#
+# -------------------------------------------------------------------------
+
+# Windows 98 needs subsystem version set to 4.10 for version 5.0 features.
+!IF ("$(APPVER)" == "5.0") && (("$(TARGETOS)" == "BOTH") || ("$(TARGETOS)" == "WIN95"))
+EXEVER = 4.10
+!ELSE
+EXEVER = $(APPVER)
+!ENDIF
+
+
+# ---------------------------------------------
+
+# for Windows applications
+conlflags = $(lflags) -subsystem:console,$(EXEVER)
+guilflags = $(lflags) -subsystem:windows,$(EXEVER)
+dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
+
+# For screen savers
+!IF "$(CPU)" == "i386"
+savlflags = $(lflags) -subsystem:windows,$(EXEVER) -entry:WinMainCRTStartup
+!ELSE
+savlflags = $(lflags) -subsystem:windows,$(EXEVER) -entry:mainCRTStartup
+!ENDIF
+
+# for POSIX applications
+psxlflags = $(lflags) -subsystem:posix -entry:__PosixProcessStartup
+
+# for compatibility with older-style makefiles
+conflags = $(conlflags)
+guiflags = $(guilflags)
+psxflags = $(psxlflags)
+
+# -------------------------------------------------------------------------
+# C Run-Time Target Module Dependent Link Libraries
+#
+# Note: For POSIX applications, link with $(psxlibs).
+# -------------------------------------------------------------------------
+
+# for POSIX applications
+psxlibs = libcpsx.lib psxdll.lib psxrtl.lib oldnames.lib
+
+
+# optional profiling and tuning libraries
+!IF "$(CPU)" != "IA64"
+
+!IFDEF PROFILE
+optlibs = cap.lib
+!ELSE IFDEF TUNE
+optlibs = wst.lib
+!ELSE
+optlibs =
+!ENDIF
+
+!ELSE
+optlibs =
+!ENDIF
+
+# if building for basic Windows 95, use WinSock1, else use WinSock2
+!IF "$(TARGETOS)" == "WIN95"
+!IF "$(APPVER)" == "4.0"
+winsocklibs = wsock32.lib
+!ELSE
+winsocklibs = ws2_32.lib mswsock.lib
+!ENDIF
+!ELSE
+winsocklibs = ws2_32.lib mswsock.lib
+!ENDIF
+
+
+# basic subsystem specific libraries, less the C Run-Time
+baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib
+winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
+
+# for Windows applications that use the C Run-Time libraries
+conlibs = $(baselibs)
+guilibs = $(winlibs)
+
+# for OLE applications
+olelibs = ole32.lib uuid.lib oleaut32.lib $(guilibs)
+
+#for backwards compatibility
+conlibsmt = $(conlibs)
+conlibsdll = $(conlibs)
+guilibsmt = $(guilibs)
+guilibsdll = $(guilibs)
+olelibsmt = $(olelibs)
+olelibsdll = $(olelibs)
+
+# for backward compatibility
+ole2libs = $(olelibs)
+ole2libsmt = $(olelibsmt)
+ole2libsdll = $(olelibsdll)
+
+# Visual Basic
+bc = vb6
+bc_exe = /Make
+bc_dll = /Makedll
+
+# Set the Output Directory
+!IF ("$(APPVER)" == "6.1")
+OUTDIR=WIN7
+!ELSEIF ("$(APPVER)" == "6.0")
+OUTDIR=Vista
+!ELSEIF "$(APPVER)" == "5.0"
+OUTDIR=WIN2000
+!ELSEIF "$(APPVER)" == "5.01"
+OUTDIR=XP32
+!ELSEIF "$(APPVER)" == "5.02"
+OUTDIR=SRV2003
+!ELSEIF "$(APPVER)" == "4.0"
+OUTDIR=NT4
+!ENDIF
+
+!IF "$(CPU)" == "AMD64"
+OUTDIR=$(OUTDIR)_X64
+!ELSEIF "$(CPU)" == "IA64"
+OUTDIR=$(OUTDIR)_64
+!ENDIF
+
+#set Prerelease Out directories
+!IF "$(SDKPRERELEASE)" == "1"
+OUTDIR=PRE_$(OUTDIR)
+!ENDIF
+
+#Set DEBUG
+!IF "$(NODEBUG)" == ""
+OUTDIR=$(OUTDIR)_DEBUG
+!ELSE
+OUTDIR=$(OUTDIR)_RETAIL
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+CLEANUP=if exist $(OUTDIR)/$(NULL) rd /s /q $(OUTDIR)
+!ELSE
+CLEANUP=deltree /y $(OUTDIR)
+!ENDIF
+
+VC6MSG=This sample only compiles with Microsoft Visual C++ 6.0. \
+ To compile this run vcvars32.bat for Visual C++ 6.0, and setenv.bat in $(MSSDK).
+
+WIN64MSG=This sample is currently not supported on the 64 bit platform.
+
+#ENDIF _WIN32_MAK_
+!ENDIF
diff --git a/osg-install-jing_zhong/osgviewer-cow.osg20220621155922.jpg b/osg-install-jing_zhong/osgviewer-cow.osg20220621155922.jpg
new file mode 100644
index 00000000000..e52b05d57a3
Binary files /dev/null and b/osg-install-jing_zhong/osgviewer-cow.osg20220621155922.jpg differ