Setting All DLLs to Builtin, then Native

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
diondeville
Level 1
Level 1
Posts: 5
Joined: Wed Aug 04, 2010 9:35 am

Setting All DLLs to Builtin, then Native

Post by diondeville »

Is there a terminal command that can be used in a Bash script that will reset the loading of all DLLs to "builtin, then native" and vice-versa?

I've looked at WINEDLLOVERRIDES but the instructions for it do not explain whether wildcards or some "all" like command can be used.
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

Did you do anything special that sets your DLLs to native and then builtin, and do you want to revert these? Because if not, you don't have to set up a thing - builtin,native is already the default.

Anyway, winetricks can do this:

Code: Select all

alldlls=builtin  Force use of builtin dlls (even if loaded with absolute path) (except for msvcp80 and d3dx9_*)
 alldlls=default  Remove all DLL overrides
diondeville
Level 1
Level 1
Posts: 5
Joined: Wed Aug 04, 2010 9:35 am

Post by diondeville »

Yep, I used winetricks, lol, and it set my DLL loading settings from preference for builtin to preference for native.

I've written a script to make it easier to group add the packages provided by winetricks but some of the software fails to install once certain packages play with the DLL settings so I need a way to switch 'em back to "builtin, then native".

Thanks for posting that help, I feel daft now for not looking at winetricks again.
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Post by DanKegel »

Can we see your script that installs multiple apps?

If it exposes problems in winetricks, I'd like to fix them.
diondeville
Level 1
Level 1
Posts: 5
Joined: Wed Aug 04, 2010 9:35 am

Post by diondeville »

Sure, it's a work in progress and I'm still testing it - I will be re-uninstalling Wine tonight and re-running my script to confirm my updates have/have not worked.

It's available here. Scroll to the bottom of the page to get the download button.

I'm open to feedback.
diondeville
Level 1
Level 1
Posts: 5
Joined: Wed Aug 04, 2010 9:35 am

Post by diondeville »

Just to let you know, the updated script uses

Code: Select all

bash winetricks alldlls=default
bash wineboot --update
at the the end of every block of files installed and after each IE browser installation. You might want to comment out those lines if you run the script to test it for checking winetricks.
Gert van den Berg

Setting All DLLs to Builtin, then Native

Post by Gert van den Berg »

On Fri, Aug 6, 2010 at 18:02, diondeville <[email protected]> wrote:
Sure, it's a work in progress and I'm still testing it - I will be re-uninstalling Wine tonight and re-running my script to confirm my updates have/have not worked.

It's available here (http://journalxtra.com/2010/08/how-to-i ... nto-linux/). Scroll to the bottom of the page to get the download button.

I'm open to feedback.
Hi,

Some tips:
'tr' can make your answer comparisons a lot easier... (read the man
page) - you probably want some if var1=$(echo "$var"|tr [a-z] [A-Z] 2>
/dev/null); then var="$var1"; fi # to convert variables to uppercase
and hide / ignore errors..
You should be specifying the output file for winetricks in the wget
command. If it already exist for some reason wget will create
winetricks.1 instead.
You move winetricks to another folder and then call it without
changing directory / specifying the path to it.
You shouldn't be using '==' to compare strings for portability... -o
might be a better way to do the tests than '||' seer
http://www.gnu.org/software/bash/manual ... xpressions
You might want to try $(lsb_release -cs) to obtain the distribution
name before prompting the user...
Do an "echo -e 'g/QUESTON/ s/QUESTON/QUESTION/g\nw' | ed script.sh" to
fix some spelling...
You might want to consider some functions like this:
echogreen() { echo -e $green"$@"$remove; }
or
echocolor() { echo -en "$1"; shift; echo -e "$@"; echo -en "$remove";
} # use as follows: echo "$green" "Message"
A basic check for root is:
if [ -z $(id -u) -o "$(id -un)" = "root" ]; then echo root;else echo
normal user; fi # id needs to be /usr/xpg4/bin/id on Solaris...
A checkyes function might work well...
checkyes() { var="$1"; if [ "$var" = 'Y' -o "$var" = 'YES' ]; then
return 0; else return 1; fi; } # Expand as needed. Usable as follows:
if checkyes "$variable"; then ...; fi;

Gert
diondeville
Level 1
Level 1
Posts: 5
Joined: Wed Aug 04, 2010 9:35 am

Post by diondeville »

Gert, thank you very much for your tips. I'll be taking another look at the script again soon. I'll implement your tips then. Thank you.
Locked