Forum

Settings for Locale
 
Notifications
Clear all

Settings for Locale  

  RSS

maidis
(@maidis)
Active Member
Joined: 1 month ago
Posts: 6
19/01/2021 9:47 pm  

I managed to run an old Turkish-English dictionary using BoxedWine. But letters specific to Turkish such as ş, ı are displayed incorrectly.

https://github.com/maidis/boxedwine-moonstar
https://maidis.github.io/boxedwine-moonstar/boxedwine.html?app=MoonStar&p=MTU.EXE

Running Wine as follows in my locale is enough to solve this problem:

LC_ALL=tr_TR.utf8 wine ./MTU.EXE

What would you recommend me to run BoxedWine in Turkish locale? I found an old discussion but didn't get much benefit from it.

https://sourceforge.net/p/boxedwine/discussion/general/thread/879724e8/


Quote
James Bryant
(@admin)
Member Admin
Joined: 3 years ago
Posts: 46
19/01/2021 10:14 pm  

I was able to run your program and see the problem.  The fix for the Windows pre-built Boxedwine binary is to add a command line argument

-env "LC_ALL=tr_TR.utf8"

For example, I used

BoxedWine.exe -root root -zip Wine-5.0.zip -title "MTU.EXE" -w /home/username/.wine/drive_c/MoonStar -env "LC_ALL=tr_TR.utf8" /bin/wine MTU.EXE

So the good news is that it is possible for Boxedwine to render the font correctly.  The bad news is that I don't think we have way to pass env's for the emscriptem build.

Are you compiling this yourself?  If so you can modify the default environment variables to add your own.  In source/sdl/startupArgs.cpp, around line 289 you will see

 

envValues.push_back("HOME=/home/username");
envValues.push_back("LOGNAME=username");
envValues.push_back("USERNAME=username");
envValues.push_back("USER=username");
envValues.push_back("PWD="+this->workingDir);
envValues.push_back("DISPLAY=:0");

 

you can add

envValues.push_back("LC_ALL=tr_TR.utf8");


ReplyQuote
James Bryant
(@admin)
Member Admin
Joined: 3 years ago
Posts: 46
19/01/2021 10:49 pm  

One more thing, I was testing with the full Wine-5.0.zip file system.  I see that the file system we used for emscripten is a stripped down version of the file system and doesn't include the liberation full unicode font.  So my previous suggestion will not work for an emscriptem build.  I will continue to think about this to see what I can come up with.


ReplyQuote
James Bryant
(@admin)
Member Admin
Joined: 3 years ago
Posts: 46
19/01/2021 11:22 pm  

It is a lot bigger, 100MB vs 20MB, but if you use the full Wine 5.0 file system combined with my changes above to startupArgs.cpp, it should work for you.

 

https://sourceforge.net/projects/boxedwine/files/FileSystems/Full/v5/Debian10-Wine-5.0.zip/download

 

Rename Debian10-Wine-5.0.zip to boxedwine.zip and replace the one you were using. 


ReplyQuote
maidis
(@maidis)
Active Member
Joined: 1 month ago
Posts: 6
20/01/2021 8:07 pm  

Thanks James. You have already answered all of my future questions 🙂 Probably all my problems have been solved. But I can't see the result because of GitHub's file size limit.

With Git LFS, I can upload large files to GitHub. But these large files are now in a different place than they should be. https://maidis.github.io/boxedwine-moonstar/boxedwine.zip is just a plain text:

version https://git-lfs.github.com/spec/v1
oid sha256:4c95851ad01983747ddbdde1a07c59fac67607c6089396d8f309af730ba5a655
size 108755543

And new location of original zip file is:

https://media.githubusercontent.com/media/maidis/boxedwine-moonstar/main/boxedwine.zip

Can I use filesystem zip from this location or is it possible to reduce archive size by deleting a few files or by using a higher compression ratio?


ReplyQuote
James Bryant
(@admin)
Member Admin
Joined: 3 years ago
Posts: 46
20/01/2021 8:24 pm  

Yes, you can delete a lot of files in the file system.  The emscriptem file system was a normal file system that just had a lot of files that aren't commonly used.  It took a lot of trial and error to get it so small.

 

If your goal is just to run this one program, you can delete a few files and try it.

I think all files in /bin except wine.link can be removed, you can try removing all files from /usr/bin too

Removing /usr/share/doc removed 7MB from the zip, I'm pretty sure those aren't needed ( I should probably remove those from my official file systems)

The biggest bang will happen from removing wine files that aren't used by your program in /opt/wine/lib/wine

Obviously you need to keep things like shell32, ntdll, kernel32, user32 which are the 4 largest, but after that, you can try some you know you might not needed, like wine3d3 and maybe msvcp's


ReplyQuote
maidis
(@maidis)
Active Member
Joined: 1 month ago
Posts: 6
20/01/2021 9:30 pm  

With all your help I've fixed Turkish character problem. It seems that deleting a folder like doc is not a problem for BoxedWine.

 

Screenshot-20210121-002028


ReplyQuote
James Bryant
(@admin)
Member Admin
Joined: 3 years ago
Posts: 46
20/01/2021 9:35 pm  

Thanks for the update, when I refresh my file systems, I'll make a strong effort to keep them under 100MB just for this use case.


ReplyQuote
Kevin O'Dwyer
(@kevin)
Active Member
Joined: 3 years ago
Posts: 19
02/02/2021 5:00 pm  

Late update:
The emscripten build now have a parameter for setting ENV variables.
Use:

?env="LC_ALL:tr_TR.utf8"

Note the use of ':' rather than '='

Multiple vars can be separated by ';'

Ie:
?env="LIBGL_NPOT:2;LIBGL_DEFAULT_WRAP:0;LIBGL_MIPMAP:3;"


ReplyQuote
maidis
(@maidis)
Active Member
Joined: 1 month ago
Posts: 6
02/02/2021 8:45 pm  

ENV variables really great improvement for BoxedWine and it will be very useful for me. Thanks 🙂 I'll compile and test it as soon as possible.

By the way, I'm having problems with keyboard layouts. I cannot enter some Turkish characters on my notebook's built-in (TR) keyboard (Linux, US locale). But on a computer using an external (TR) keyboard at work (Windows, TR locale), although the location of the keys is not exactly correct, I can enter Turkish characters that I have had problems with before.

I'll check Debian's keyboard documentation, do you have any additional resource advice or anything you can say?


ReplyQuote
maidis
(@maidis)
Active Member
Joined: 1 month ago
Posts: 6
02/02/2021 9:17 pm  

ENV variables really great improvement for BoxedWine and it will be very useful for me. Thanks 🙂 I'll compile and test it as soon as possible.

By the way, I'm having problems with keyboard layouts. I cannot enter some Turkish characters on my notebook's built-in (TR) keyboard (Linux, US locale). But on a computer using an external (TR) keyboard at work (Windows, TR locale), although the location of the keys is not exactly correct, I can enter Turkish characters that I have had problems with before.

I'll check Debian's keyboard documentation, do you have any additional resource advice or anything you can say?

Edit: I updated my repo but ENV variables seem not to affect:

https://github.com/maidis/boxedwine-moonstar/commit/b359d32361ea6758b6fcea4f023666df1ce16132

https://maidis.github.io/boxedwine-moonstar/boxedwine.html?env=%22LC_ALL:tr_TR.utf8%22&app=MoonStar&p=MTU.EXE

https://ibb.co/TTdmbKh


ReplyQuote
Kevin O'Dwyer
(@kevin)
Active Member
Joined: 3 years ago
Posts: 19
03/02/2021 4:58 pm  

I have made a further change.

Can you try again? Same ?env="LC_ALL:tr_TR.utf8"

If you are getting to code from github, it may take a day for the new code to appear.

I'm afraid I don't know about the keyboard layout. I think the documentation is your best bet and maybe try stackoverflow.


ReplyQuote
maidis
(@maidis)
Active Member
Joined: 1 month ago
Posts: 6
03/02/2021 6:51 pm  

When I added ?env="LC_ALL:tr_TR.utf8" to the end of the url I get following error:

Launching "/bin/wine" "MTU.EXE?env"
0009:err:module:__wine_process_init L"C:\\windows\\system32\\MTU.EXE?env" not found

When it added to begining to URL, BoxedWine run fine but Turkish characters not shown properly. Same when it placed into middle.

I get BoxedWine code from SF:

git clone https://git.code.sf.net/p/boxedwine/source boxedwine-source


ReplyQuote
Share: