void ldt_set_entry( WORD sel, LDT_ENTRY entry )
{
#ifdef linux
struct modify_ldt_s ldt_info = { .entry_number = sel >> 3 };
int ret;
ldt_info.base_addr = ldt_get_base( entry );
ldt_info.limit = entry.LimitLow | (entry.HighWord.Bits.LimitHi << 16);
ldt_info.seg_32bit = entry.HighWord.Bits.Default_Big;
ldt_info.contents = (entry.HighWord.Bits.Type >> 2) & 3;
ldt_info.read_exec_only = !(entry.HighWord.Bits.Type & 2);
ldt_info.limit_in_pages = entry.HighWord.Bits.Granularity;
ldt_info.seg_not_present = !entry.HighWord.Bits.Pres;
ldt_info.usable = entry.HighWord.Bits.Sys;
if ((ret = modify_ldt( &ldt_info ))) ERR( "modify_ldt failed %d\n", ret );
#elif defined(__APPLE__)
if (i386_set_ldt(sel >> 3, (union ldt_entry *)&entry, 1) < 0) perror("i386_set_ldt");
#else
fprintf( stderr, "No LDT support on this platform\n" );
exit(1);
#endif
}
I don't know how to patch files. If I try the old wow64 to compile three times, can it be done without modifying any files?Hi, looking at wine's code relevant to WoW64 mode, you will have to patch several files to support FreeBSD otherwise the current ifdefs are:
C:void ldt_set_entry( WORD sel, LDT_ENTRY entry ) { #ifdef linux struct modify_ldt_s ldt_info = { .entry_number = sel >> 3 }; int ret; ldt_info.base_addr = ldt_get_base( entry ); ldt_info.limit = entry.LimitLow | (entry.HighWord.Bits.LimitHi << 16); ldt_info.seg_32bit = entry.HighWord.Bits.Default_Big; ldt_info.contents = (entry.HighWord.Bits.Type >> 2) & 3; ldt_info.read_exec_only = !(entry.HighWord.Bits.Type & 2); ldt_info.limit_in_pages = entry.HighWord.Bits.Granularity; ldt_info.seg_not_present = !entry.HighWord.Bits.Pres; ldt_info.usable = entry.HighWord.Bits.Sys; if ((ret = modify_ldt( &ldt_info ))) ERR( "modify_ldt failed %d\n", ret ); #elif defined(__APPLE__) if (i386_set_ldt(sel >> 3, (union ldt_entry *)&entry, 1) < 0) perror("i386_set_ldt"); #else fprintf( stderr, "No LDT support on this platform\n" ); exit(1); #endif }
Check the wine-proton code (and the bug/review to push it to version 10) as that already includes wow64 patches (and maybe check with shkhln as he worked on that on the past).
No, the current wine sources don't work unpatched for WoW64.I don't know how to patch files. If I try the old wow64 to compile three times, can it be done without modifying any files?
I found this https://github.com/XaeroVincent/freebsd-wine-wow64. It's a 10.8 wine-wow64 and works fine. But I also don't what it is patched like wine-proton. May I need ask AI to do such thingNo, the current wine sources don't work unpatched for WoW64.
If you want wine with wow64 mode enabled use the wine-proton package (unless you want to figuring out how the patch command works), it's a bit old but it's heavily patched for gaming anyway.
Alternatively, just install the latest wine or wine-devel package and use two prefixes like suggested in the package message.
Can I just use this directly?That repo is a fork of shkhln's wine-devel 10.5, with an extra patch on top for cyberpunk. If you just want proton 10, check the repo from which it was forked has it has both wine-devel and wine-proton.
But in any case, if it's working for you that's enough, no?