diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2012-01-31 15:02:35 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2012-01-31 15:02:35 -0800 |
commit | 79cb84b462f67a3742412d29af7d47e4ed15dc33 (patch) | |
tree | 1713ac2e8135d9d590525abc2281d97933b5700c | |
parent | 38d88381e0d4b6f0a52501b6bba1a3d97f771387 (diff) |
295.17295.17
-rw-r--r-- | command-list.c | 31 | ||||
-rw-r--r-- | files.c | 18 | ||||
-rw-r--r-- | files.h | 1 | ||||
-rw-r--r-- | install-from-cwd.c | 8 | ||||
-rw-r--r-- | log.c | 2 | ||||
-rw-r--r-- | misc.c | 3 | ||||
-rw-r--r-- | nvidia-installer.c | 4 | ||||
-rw-r--r-- | nvidia-installer.h | 24 | ||||
-rw-r--r-- | option_table.h | 6 | ||||
-rw-r--r-- | version.mk | 2 |
10 files changed, 82 insertions, 17 deletions
diff --git a/command-list.c b/command-list.c index a28985e..0ccd511 100644 --- a/command-list.c +++ b/command-list.c @@ -559,18 +559,22 @@ static void find_conflicting_libraries(Options *op, ConflictingFileInfo *libs, FileList *l); -static ConflictingFileInfo __xfree86_libs[] = { +static ConflictingFileInfo __xfree86_opengl_libs[] = { { "libnvidia-glcore.", 17, /* strlen("libnvidia-glcore.") */ NULL }, { "libGL.", 6, /* strlen("libGL.") */ NULL }, { "libGLwrapper.", 13, /* strlen("libGLwrapper.") */ NULL }, { "libglx.", 7, /* strlen("libglx.") */ "glxModuleData" }, + { NULL, 0, NULL } +}; + +static ConflictingFileInfo __xfree86_non_opengl_libs[] = { { "libXvMCNVIDIA", 13, /* strlen("libXvMCNVIDIA") */ NULL }, - { "libnvidia-cfg.", 14, /* strlen("libnvidia-cfg.") */ NULL }, { "nvidia_drv.", 11, /* strlen("nvidia_drv.") */ NULL }, - { "libcuda.", 8, /* strlen("libcuda.") */ NULL }, { "libvdpau.", 9, /* strlen("libvdpau.") */ NULL }, { "libvdpau_trace.", 15, /* strlen("libvdpau_trace.") */ NULL }, { "libvdpau_nvidia.", 16, /* strlen("libvdpau_nvidia.") */ NULL }, + { "libnvidia-cfg.", 14, /* strlen("libnvidia-cfg.") */ NULL }, + { "libcuda.", 8, /* strlen("libcuda.") */ NULL }, { "libnvidia-compiler.", 19, /* strlen("libnvidia-compiler.") */ NULL }, { "libnvcuvid.", 11, /* strlen("libnvcuvid.") */ NULL }, { "libnvidia-ml.", 13, /* strlen("libnvidia-ml.") */ NULL }, @@ -587,7 +591,10 @@ static void find_conflicting_xfree86_libraries(Options *op, const char *xprefix, FileList *l) { - find_conflicting_libraries(op, xprefix, __xfree86_libs, l); + if (!op->no_opengl_files) { + find_conflicting_libraries(op, xprefix, __xfree86_opengl_libs, l); + } + find_conflicting_libraries(op, xprefix, __xfree86_non_opengl_libs, l); } /* find_conflicting_xfree86_libraries() */ @@ -605,8 +612,11 @@ static void find_conflicting_xfree86_libraries_fullpath(Options *op, char *path, FileList *l) { - find_conflicting_files(op, path, __xfree86_libs, l); - + if (!op->no_opengl_files) { + find_conflicting_files(op, path, __xfree86_opengl_libs, l); + } + find_conflicting_files(op, path, __xfree86_non_opengl_libs, l); + } /* find_conflicting_xfree86_libraries_fullpath() */ @@ -616,6 +626,10 @@ static ConflictingFileInfo __opengl_libs[] = { { "libGL.", 6, /* strlen("libGL.") */ NULL }, { "libnvidia-tls.", 14, /* strlen("libnvidia-tls.") */ NULL }, { "libGLwrapper.", 13, /* strlen("libGLwrapper.") */ NULL }, + { NULL, 0, NULL } +}; + +static ConflictingFileInfo __non_opengl_libs[] = { { "libnvidia-cfg.", 14, /* strlen("libnvidia-cfg.") */ NULL }, { "libcuda.", 8, /* strlen("libcuda.") */ NULL }, { "libnvidia-compiler.", 19, /* strlen("libnvidia-compiler.") */ NULL }, @@ -633,7 +647,10 @@ static void find_conflicting_opengl_libraries(Options *op, const char *glprefix, FileList *l) { - find_conflicting_libraries(op, glprefix, __opengl_libs, l); + if (!op->no_opengl_files) { + find_conflicting_libraries(op, glprefix, __opengl_libs, l); + } + find_conflicting_libraries(op, glprefix, __non_opengl_libs, l); } /* find_conflicting_opengl_libraries() */ @@ -546,7 +546,9 @@ int set_destinations(Options *op, Package *p) break; case FILE_TYPE_XMODULE_SHARED_LIB: + case FILE_TYPE_GLX_MODULE_SHARED_LIB: case FILE_TYPE_XMODULE_SYMLINK: + case FILE_TYPE_GLX_MODULE_SYMLINK: case FILE_TYPE_XMODULE_NEWSYM: prefix = op->x_module_path; dir = ""; @@ -951,6 +953,22 @@ void remove_non_kernel_module_files_from_package(Options *op, Package *p) } /* remove_non_kernel_module_files_from_package() */ +/* + * clear the FILE_TYPE_MASK bits for each package entry that is not of + * type FILE_TYPE_OPENGL_FILE + */ +void remove_opengl_files_from_package(Options *op, Package *p) +{ + int i; + + for (i = 0; i < p->num_entries; i++) { + uint64_t flags = p->entries[i].flags & FILE_TYPE_MASK; + if (flags & FILE_TYPE_OPENGL_FILE) { + p->entries[i].flags &= ~FILE_TYPE_MASK; + } + } +} + /* * remove_trailing_slashes() - begin at the end of the given string, @@ -34,6 +34,7 @@ int get_license_acceptance(Options *op); /* XXX move? */ int get_prefixes(Options *op); /* XXX move? */ int add_kernel_module_to_package(Options *op, Package *p); void remove_non_kernel_module_files_from_package(Options *op, Package *p); +void remove_opengl_files_from_package(Options *op, Package *p); void remove_trailing_slashes(char *s); int mode_string_to_mode(Options *op, char *s, mode_t *mode); char *mode_to_permission_string(mode_t mode); diff --git a/install-from-cwd.c b/install-from-cwd.c index bf0e482..671a5da 100644 --- a/install-from-cwd.c +++ b/install-from-cwd.c @@ -198,6 +198,10 @@ int install_from_cwd(Options *op) #endif /* NV_X86_64 */ } + if (op->no_opengl_files) { + remove_opengl_files_from_package(op, p); + } + /* * now that we have the installation prefixes, build the * destination for each file to be installed @@ -717,6 +721,10 @@ static Package *parse_manifest (Options *op) p->entries[n].flags |= FILE_TYPE_XMODULE_SHARED_LIB; else if (strcmp(flag, "XMODULE_SYMLINK") == 0) p->entries[n].flags |= FILE_TYPE_XMODULE_SYMLINK; + else if (strcmp(flag, "GLX_MODULE_SHARED_LIB") == 0) + p->entries[n].flags |= FILE_TYPE_GLX_MODULE_SHARED_LIB; + else if (strcmp(flag, "GLX_MODULE_SYMLINK") == 0) + p->entries[n].flags |= FILE_TYPE_GLX_MODULE_SYMLINK; else if (strcmp(flag, "XMODULE_NEWSYM") == 0) p->entries[n].flags |= FILE_TYPE_XMODULE_NEWSYM; else if (strcmp(flag, "VDPAU_LIB") == 0) @@ -134,7 +134,7 @@ void log_printf(Options *op, const int wb, * already did */ - if (buf && (buf[strlen(buf) - 1] == '\n')) { + if (buf && buf[0] && (buf[strlen(buf) - 1] == '\n')) { append_newline = FALSE; } @@ -2196,8 +2196,9 @@ int check_for_nvidia_graphics_devices(Options *op, Package *p) } } + dev = pacc->devices; pci_cleanup(pacc); - if (!pacc->devices) return TRUE; + if (!dev) return TRUE; if (!found_supported_device) { ui_warn(op, "You do not appear to have an NVIDIA GPU supported by the " diff --git a/nvidia-installer.c b/nvidia-installer.c index bab341a..173e058 100644 --- a/nvidia-installer.c +++ b/nvidia-installer.c @@ -345,7 +345,9 @@ static void parse_commandline(int argc, char *argv[], Options *op) case NO_DISTRO_SCRIPTS_OPTION: op->run_distro_scripts = FALSE; break; - + case NO_OPENGL_FILES_OPTION: + op->no_opengl_files = TRUE; + break; default: goto fail; } diff --git a/nvidia-installer.h b/nvidia-installer.h index ea5d038..0361375 100644 --- a/nvidia-installer.h +++ b/nvidia-installer.h @@ -138,6 +138,7 @@ typedef struct __options { int no_nvidia_xconfig_question; int run_distro_scripts; int no_nouveau_check; + int no_opengl_files; char *opengl_prefix; char *opengl_libdir; @@ -316,7 +317,8 @@ typedef struct { #define FILE_TYPE_CUDA_ICD 0x0000000020000000ULL #define FILE_TYPE_NVCUVID_LIB 0x0000000040000000ULL #define FILE_TYPE_NVCUVID_SYMLINK 0x0000000080000000ULL -/* unused 0x0000000100000000ULL */ +#define FILE_TYPE_GLX_MODULE_SHARED_LIB 0x0000000100000000ULL +#define FILE_TYPE_GLX_MODULE_SYMLINK 0x0000000200000000ULL /* file class: this is used to distinguish OpenGL libraries */ @@ -331,8 +333,6 @@ typedef struct { #define FILE_TYPE_XLIB_LIB (FILE_TYPE_XLIB_STATIC_LIB | \ FILE_TYPE_XLIB_SHARED_LIB) -#define FILE_TYPE_XMODULE_LIB (FILE_TYPE_XMODULE_SHARED_LIB) - #define FILE_TYPE_INSTALLABLE_FILE (FILE_TYPE_OPENGL_LIB | \ FILE_TYPE_CUDA_LIB | \ FILE_TYPE_XLIB_LIB | \ @@ -346,13 +346,16 @@ typedef struct { FILE_TYPE_INSTALLER_BINARY | \ FILE_TYPE_UTILITY_BINARY | \ FILE_TYPE_LIBGL_LA | \ - FILE_TYPE_XMODULE_LIB | \ + FILE_TYPE_XMODULE_SHARED_LIB | \ + FILE_TYPE_GLX_MODULE_SHARED_LIB | \ FILE_TYPE_DOT_DESKTOP | \ FILE_TYPE_VDPAU_LIB | \ FILE_TYPE_NVCUVID_LIB) -#define FILE_TYPE_HAVE_PATH (FILE_TYPE_XMODULE_LIB | \ +#define FILE_TYPE_HAVE_PATH (FILE_TYPE_XMODULE_SHARED_LIB | \ FILE_TYPE_XMODULE_SYMLINK | \ + FILE_TYPE_GLX_MODULE_SHARED_LIB | \ + FILE_TYPE_GLX_MODULE_SYMLINK | \ FILE_TYPE_XMODULE_NEWSYM | \ FILE_TYPE_MANPAGE | \ FILE_TYPE_OPENGL_HEADER | \ @@ -386,6 +389,7 @@ typedef struct { FILE_TYPE_XLIB_SYMLINK | \ FILE_TYPE_TLS_SYMLINK | \ FILE_TYPE_XMODULE_SYMLINK | \ + FILE_TYPE_GLX_MODULE_SYMLINK | \ FILE_TYPE_UTILITY_LIB_SYMLINK| \ FILE_TYPE_UTILITY_BIN_SYMLINK| \ FILE_TYPE_VDPAU_SYMLINK | \ @@ -404,10 +408,20 @@ typedef struct { FILE_TYPE_XLIB_SHARED_LIB | \ FILE_TYPE_TLS_LIB | \ FILE_TYPE_XMODULE_SHARED_LIB | \ + FILE_TYPE_GLX_MODULE_SHARED_LIB | \ FILE_TYPE_UTILITY_LIB | \ FILE_TYPE_VDPAU_LIB | \ FILE_TYPE_NVCUVID_LIB) +#define FILE_TYPE_OPENGL_FILE (FILE_TYPE_OPENGL_HEADER | \ + FILE_TYPE_OPENGL_LIB | \ + FILE_TYPE_OPENGL_SYMLINK | \ + FILE_TYPE_LIBGL_LA | \ + FILE_TYPE_TLS_LIB | \ + FILE_TYPE_TLS_SYMLINK | \ + FILE_TYPE_GLX_MODULE_SHARED_LIB | \ + FILE_TYPE_GLX_MODULE_SYMLINK) + #define TLS_LIB_TYPE_FORCED 0x0001 #define TLS_LIB_NEW_TLS 0x0002 #define TLS_LIB_CLASSIC_TLS 0x0004 diff --git a/option_table.h b/option_table.h index 3d1f5a9..998fbd8 100644 --- a/option_table.h +++ b/option_table.h @@ -77,7 +77,8 @@ enum { NO_KERNEL_MODULE_OPTION, NO_X_CHECK_OPTION, NO_CC_VERSION_CHECK_OPTION, - NO_DISTRO_SCRIPTS_OPTION + NO_DISTRO_SCRIPTS_OPTION, + NO_OPENGL_FILES_OPTION, }; static const NVGetoptOption __options[] = { @@ -499,6 +500,9 @@ static const NVGetoptOption __options[] = { "and after installing or uninstalling the driver. Use this option to " "disable execution of these scripts." }, + { "no-opengl-files", NO_OPENGL_FILES_OPTION, 0, NULL, + "Do not install any of the OpenGL-related driver files." }, + /* Orphaned options: These options were in the long_options table in * nvidia-installer.c but not in the help. */ { "debug", 'd', 0, NULL,NULL }, @@ -1 +1 @@ -NVIDIA_VERSION = 295.09 +NVIDIA_VERSION = 295.17 |