## no more required gWidgets.zip & gWidgetsRGtk2.zip to install bear for R v4.0.x [🇷 for BE/BA]

Dear all bear users,

To make it quick, please do not request for gWidgets.zip & gWidgetsRGtk2.zip from me any more (see this). I have already received tons of requests since these two packages (gWidgets & gWidgetsRGtk2) have been orphaned/removed/retired/depredicated from R repositories. I know some users were not trying to install bear. They only need to install gWidgets & gWidgetsRGtk2 to run other packages. Google master pointed this Forum to them. Therefore, users can download preinst.r from SourceForge and run it AS the system administrator (for Windows OS & Linux-PC). However (there is always a 'however' or 'but'), it is only for x64 platforms. Sorry for x86 machines (who is still using a x86 machine right now?).

Here is the long story. Since it was reported that gWidgets & gWidgetsRGtk2 has been removed from R repositories (see this, and this and this), the disaster began. I did a little stats. about what R packages was affetced/removed together with gWIdgets & gWidgetsRGtk2. One of packages, RQDA, was also included and users tried seek out the solution for it. I found that the only problem was that only gWidgetsRGtk2 cannot be built from its source tarball on my Windows 10 (x64) only.(three onlys in this sentence.) Both gWidgets & gWidgetsRGtk2 can be built on macOS and Linux-PC from their source. Even gWidgets can be built on Windows 10 (x64). The error messages [in English] of gWidgetsRGtk2 on Windows 10 were
... Error in inDL(x, as.logical(local), as.logical(now), ...) :    unable to load shared object 'C:/.../library/RGtk2/libs/i386/RGtk2.dll':    LoadLibrary failure:  The specified module could not be found.

That meant R tried to build both x86 and x64 packages at the same time as default, even though for x64 platforms/machine. Please note that the dynamic lib. for i386 (.../library/RGtk2/libs/i386/RGtk2.dll) was there. But R just cannot find it when building the package. Then I googled these error messages and found it has been reported since 2011 by a user. The original error messages reported by that user were:
... Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'R:/Apps/R/R-2.13.0/library/RGtk2/libs/i386/RGtk2.dll': LoadLibrary failure:  Das angegebene Modul wurde nicht gefunden.

About this issue, Professor Ripley said:"...It is Microsoft's error message, not ours." Then I planed to email Mr. Gates. Before doing that, I found a nice post about installation of a R package (tidyselect) on stackoverflow that totally inspired me. Therefore, the solution is as follows:
this<-"https://cran.r-project.org/src/contrib/Archive/gWidgets/gWidgets_0.0-54.2.tar.gz" install.packages(this,repos=NULL,INSTALL_opts="--no-multiarch") and.this<- "https://cran.r-project.org/src/contrib/Archive/gWidgetsRGtk2/gWidgetsRGtk2_0.0-86.1.tar.gz" install.packages(and.this,repos=NULL,INSTALL_opts="--no-multiarch")

And it finally works. The key option of --no-multiarch here is used to build x64 package only. All these have been included in preinst.r now. Sorry to keep you waiting for a long,long time. My sincere apology.
[to be continued...]

All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear