summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2010-11-09 16:07:55 -0800
committerAaron Plattner <aplattner@nvidia.com>2010-11-09 16:07:55 -0800
commit76eaf76d12f01ba95ec94626542a978416bd99f0 (patch)
tree0dddd975bab6b354a0f5fb57424537cdfb36462e
parent4457679c5f157469676e0bb97cb2a4d7471d310d (diff)
260.19.12260.19.12
-rw-r--r--files.c6
-rw-r--r--install-from-cwd.c6
-rw-r--r--misc.c50
-rw-r--r--nvidia-installer.c3
-rw-r--r--nvidia-installer.h5
-rw-r--r--option_table.h10
-rw-r--r--version.mk2
7 files changed, 80 insertions, 2 deletions
diff --git a/files.c b/files.c
index bab996f..5598051 100644
--- a/files.c
+++ b/files.c
@@ -600,6 +600,12 @@ int set_destinations(Options *op, Package *p)
path = "";
break;
+ case FILE_TYPE_OPENGL_HEADER:
+ prefix = op->opengl_prefix;
+ dir = op->opengl_incdir;
+ path = p->entries[i].path;
+ break;
+
case FILE_TYPE_INSTALLER_BINARY:
prefix = op->utility_prefix;
dir = op->utility_bindir;
diff --git a/install-from-cwd.c b/install-from-cwd.c
index 36d5e70..37bc370 100644
--- a/install-from-cwd.c
+++ b/install-from-cwd.c
@@ -171,6 +171,10 @@ int install_from_cwd(Options *op)
if (!get_prefixes(op)) goto failed;
+ /* ask if we should install the OpenGL header files */
+
+ should_install_opengl_headers(op, p);
+
/*
* select the appropriate TLS class, modifying the package as
* necessary.
@@ -673,6 +677,8 @@ static Package *parse_manifest (Options *op)
p->entries[n].flags |= FILE_TYPE_KERNEL_MODULE_SRC;
else if (strcmp(flag, "KERNEL_MODULE_CMD") == 0)
p->entries[n].flags |= FILE_TYPE_KERNEL_MODULE_CMD;
+ else if (strcmp(flag, "OPENGL_HEADER") == 0)
+ p->entries[n].flags |= FILE_TYPE_OPENGL_HEADER;
else if (strcmp(flag, "CUDA_ICD") == 0)
p->entries[n].flags |= FILE_TYPE_CUDA_ICD;
else if (strcmp(flag, "OPENGL_LIB") == 0)
diff --git a/misc.c b/misc.c
index 570d838..78483ee 100644
--- a/misc.c
+++ b/misc.c
@@ -1095,6 +1095,55 @@ char *extract_version_string(const char *str)
/*
+ * should_install_opengl_headers() - if in expert mode, ask the user
+ * if they want to install OpenGL header files.
+ */
+
+void should_install_opengl_headers(Options *op, Package *p)
+{
+ int i, have_headers = FALSE;
+
+ if (!op->expert) return;
+
+ /*
+ * first, scan through the package to see if we have any header
+ * files to install
+ */
+
+ for (i = 0; i < p->num_entries; i++) {
+ if (p->entries[i].flags & FILE_TYPE_OPENGL_HEADER) {
+ have_headers = TRUE;
+ break;
+ }
+ }
+
+ if (!have_headers) return;
+
+ /*
+ * If we're to provide more verbose descriptions, we could present
+ * something like this:
+ *
+ * ("The %s provides OpenGL header files; these are used when
+ * compiling OpenGL applications. Most Linux distributions
+ * already have OpenGL header files installed (normally in the
+ * /usr/include/GL/ directory). If you don't have OpenGL header
+ * files installed and would like to, or if you want to develop
+ * OpenGL applications that take advantage of NVIDIA OpenGL
+ * extensions, then you can install NVIDIA's OpenGL header files
+ * at this time.", p->description);
+ */
+
+ op->opengl_headers = ui_yes_no(op, op->opengl_headers,
+ "Install NVIDIA's OpenGL header files?");
+
+ ui_expert(op, "Installation %s install the OpenGL header files.",
+ op->opengl_headers ? "will" : "will not");
+
+} /* should_install_opengl_headers() */
+
+
+
+/*
* should_install_compat32_files() - ask the user if he/she wishes to
* install 32bit compatibily libraries.
*/
@@ -1311,6 +1360,7 @@ static int check_file(Options *op, const char *filename,
uint64_t get_installable_file_mask(Options *op)
{
uint64_t installable_files = FILE_TYPE_INSTALLABLE_FILE;
+ if (!op->opengl_headers) installable_files &= ~FILE_TYPE_OPENGL_HEADER;
return installable_files;
diff --git a/nvidia-installer.c b/nvidia-installer.c
index f078d71..66dd54b 100644
--- a/nvidia-installer.c
+++ b/nvidia-installer.c
@@ -121,6 +121,7 @@ static Options *load_default_options(void)
op->distro = get_distribution(op);
op->logging = TRUE; /* log by default */
+ op->opengl_headers = FALSE; /* do not install our GL headers by default */
op->run_nvidia_xconfig = FALSE;
op->selinux_option = SELINUX_DEFAULT;
@@ -243,6 +244,8 @@ static void parse_commandline(int argc, char *argv[], Options *op)
print_help_args_only(TRUE, FALSE); exit(0); break;
case TMPDIR_OPTION:
op->tmpdir = strval; break;
+ case OPENGL_HEADERS_OPTION:
+ op->opengl_headers = TRUE; break;
case FORCE_TLS_OPTION:
if (strcasecmp(strval, "new") == 0)
op->which_tls = FORCE_NEW_TLS;
diff --git a/nvidia-installer.h b/nvidia-installer.h
index 4589980..91fe5c8 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -119,6 +119,7 @@ typedef struct __options {
int no_ncurses_color;
int latest;
int force_update;
+ int opengl_headers;
int no_questions;
int silent;
int which_tls;
@@ -299,7 +300,7 @@ typedef struct {
#define FILE_TYPE_KERNEL_MODULE_SRC 0x0000000000000001ULL
#define FILE_TYPE_KERNEL_MODULE_CMD 0x0000000000000002ULL
-/* unused 0x0000000000000004ULL */
+#define FILE_TYPE_OPENGL_HEADER 0x0000000000000004ULL
#define FILE_TYPE_OPENGL_LIB 0x0000000000000008ULL
#define FILE_TYPE_XLIB_STATIC_LIB 0x0000000000000010ULL
#define FILE_TYPE_XLIB_SHARED_LIB 0x0000000000000020ULL
@@ -354,6 +355,7 @@ typedef struct {
FILE_TYPE_UTILITY_LIB | \
FILE_TYPE_DOCUMENTATION | \
FILE_TYPE_MANPAGE | \
+ FILE_TYPE_OPENGL_HEADER | \
FILE_TYPE_CUDA_ICD | \
FILE_TYPE_KERNEL_MODULE | \
FILE_TYPE_INSTALLER_BINARY | \
@@ -368,6 +370,7 @@ typedef struct {
FILE_TYPE_XMODULE_SYMLINK | \
FILE_TYPE_XMODULE_NEWSYM | \
FILE_TYPE_MANPAGE | \
+ FILE_TYPE_OPENGL_HEADER | \
FILE_TYPE_CUDA_LIB | \
FILE_TYPE_CUDA_SYMLINK | \
FILE_TYPE_TLS_LIB | \
diff --git a/option_table.h b/option_table.h
index cfbef82..c009c16 100644
--- a/option_table.h
+++ b/option_table.h
@@ -42,6 +42,7 @@ enum {
LOG_FILE_NAME_OPTION,
HELP_ARGS_ONLY_OPTION,
TMPDIR_OPTION,
+ OPENGL_HEADERS_OPTION,
INSTALLER_PREFIX_OPTION,
FORCE_TLS_OPTION,
SANITY_OPTION,
@@ -313,6 +314,15 @@ static const NVGetoptOption __options[] = {
{ "no-ncurses-color", 'c', 0, NULL,
"Disable use of color in the ncurses user interface." },
+ { "opengl-headers", OPENGL_HEADERS_OPTION, 0, NULL,
+ "Normally, installation will not install NVIDIA's OpenGL "
+ "header files; the OpenGL header files packaged by the "
+ "Linux distribution or available from "
+ "http://www.opengl.org/registry/ should be preferred. "
+ "However, http://www.opengl.org/registry/ does not yet provide "
+ "a glx.h or gl.h. Until that is resolved, NVIDIA's OpenGL "
+ "header files can still be chosen, through this installer option." },
+
{ "force-tls", FORCE_TLS_OPTION, NVGETOPT_STRING_ARGUMENT, NULL,
"NVIDIA's OpenGL libraries are compiled with one of two "
"different thread local storage (TLS) mechanisms: 'classic tls' "
diff --git a/version.mk b/version.mk
index 737097c..e9aa453 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 260.19.06
+NVIDIA_VERSION = 260.19.12