Skip to content

Commit

Permalink
Add a local deployment utility
Browse files Browse the repository at this point in the history
Mot integrated with the installer yet
  • Loading branch information
prodea2 committed Feb 24, 2017
1 parent fdb743c commit bf9e24e
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 9 deletions.
29 changes: 29 additions & 0 deletions local/localdeploy-x64.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@echo Mesa3D local deployment utility
@echo -------------------------------
@echo By default Mesa 3D for Windows is installed system wide. But under certain circumstances the GPU(s) might get used
@echo even if it's not intended:
@echo - the GPU suports the required Core profile demanded by the application but lacks certain extensions;
@echo - the application that needs mesa due to GPU limitations has issues on systems with multiple OpenGL drivers
@echo resulting in selection of a wrong driver. Local deployment of mesa solves this problem by forcing itself to be used
@echo by the aplication.
@echo.
@pause
:deploy
@cls
@echo Mesa3D local deployment utility
@echo -------------------------------
@echo Please provide the path to the folder that contains the application launcher executable, that needs local deployment
@echo of Mesa. It is recommended to copy-paste it from Windows Explorer using CTRL+V. The right click paste introduced in
@echo Windows 10 may lead to unexpected double paste.
@echo.
@set /p dir=Path to folder holding application executable:
@echo.
@set mesadll=syswow64
@set /p ABI=This is a 64-bit application (y=yes):
@if /I %ABI%==y @set mesadll=system32
@cd /d "%dir%"
@echo.
@mklink opengl32.dll %windir%\%mesadll%\opengl32sw.dll
@echo.
@set /p rerun=More local deployment? (y=yes):
@if /I %rerun%==y GOTO deploy
25 changes: 25 additions & 0 deletions local/localdeploy-x86.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@echo Mesa3D local deployment utility
@echo -------------------------------
@echo By default Mesa 3D for Windows is installed system wide. But under certain circumstances the GPU(s) might get used
@echo even if it's not intended:
@echo - the GPU suports the required Core profile demanded by the application but lacks certain extensions;
@echo - the application that needs mesa due to GPU limitations has issues on systems with multiple OpenGL drivers
@echo resulting in selection of a wrong driver. Local deployment of mesa solves this problem by forcing itself to be used
@echo by the aplication.
@echo.
@pause
:deploy
@cls
@echo Mesa3D local deployment utility
@echo -------------------------------
@echo Please provide the path to the folder that contains the application launcher executable, that needs local deployment
@echo of Mesa. It is recommended to copy-paste it from Windows Explorer using CTRL+V. The right click paste introduced in
@echo Windows 10 may lead to unexpected double paste.
@echo.
@set /p dir=Path to folder holding application executable:
@echo.
@cd /d "%dir%"
@mklink opengl32.dll %windir%\system32\opengl32sw.dll
@echo.
@set /p rerun=More local deployment? (y=yes):
@if /I %rerun%==y GOTO deploy
12 changes: 6 additions & 6 deletions mesa-x64.iss → setup/mesa-x64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ SolidCompression=yes
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "bin\x86\opengl32sw.dll"; DestDir: "{syswow64}"; Flags: ignoreversion confirmoverwrite
Source: "bin\x86\swrAVX.dll"; DestDir: "{syswow64}"; Flags: ignoreversion confirmoverwrite
Source: "bin\x86\swrAVX2.dll"; DestDir: "{syswow64}"; Flags: ignoreversion confirmoverwrite
Source: "bin\x64\opengl32sw.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite 64bit
Source: "bin\x64\swrAVX.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite 64bit
Source: "bin\x64\swrAVX2.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite 64bit
Source: "..\bin\x86\opengl32sw.dll"; DestDir: "{syswow64}"; Flags: ignoreversion confirmoverwrite
Source: "..\bin\x86\swrAVX.dll"; DestDir: "{syswow64}"; Flags: ignoreversion confirmoverwrite
Source: "..\bin\x86\swrAVX2.dll"; DestDir: "{syswow64}"; Flags: ignoreversion confirmoverwrite
Source: "..\bin\x64\opengl32sw.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite 64bit
Source: "..\bin\x64\swrAVX.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite 64bit
Source: "..\bin\x64\swrAVX2.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite 64bit
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Registry]
Expand Down
6 changes: 3 additions & 3 deletions mesa-x86.iss → setup/mesa-x86.iss
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ SolidCompression=yes
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "bin\x86\opengl32sw.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite
Source: "bin\x86\swrAVX.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite
Source: "bin\x86\swrAVX2.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite
Source: "..\bin\x86\opengl32sw.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite
Source: "..\bin\x86\swrAVX.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite
Source: "..\bin\x86\swrAVX2.dll"; DestDir: "{win}\system32"; Flags: ignoreversion confirmoverwrite
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Registry]
Expand Down

0 comments on commit bf9e24e

Please sign in to comment.