-
- std::cerr <<
- "The 'apitrace trace' command is not supported for this operating system.\n"
- "Instead, you will need to copy opengl32.dll, d3d8.dll, or d3d9.dll from\n"
- APITRACE_WRAPPER_INSTALL_DIR "\n"
- "to the directory with the application to trace, then run the application.\n";
-
-#else
+ if (useInject) {
+ args.push_back("inject");
+ args.push_back(wrapperPath);
+ } else {
+ /* On Windows copy the wrapper to the program directory.
+ */
+ if (!copyWrapper(wrapperPath, argv[0], verbose)) {
+ goto exit;
+ }
+ }
+#else /* !_WIN32 */
+ (void)useInject;
+#endif /* !_WIN32 */