-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Create dedicated browser app emulator/desktop browser for development use #5
Comments
Out of curiosity I checked both the Wii U and 3DS Miiverse apps. They use WebKit versions:
536.28 is on GitHub, https://github.com/WebKit/WebKit/tree/safari-536.28-branch, so that's not too bad. But I can't find a single source download for 532.7 anywhere. GitHub doesn't have it, and neither does https://chromium.googlesource.com/external/github.com/WebKit/webkit/+refs. The oldest I can find a download for is 533 I was able to find mentions of older versions on places like https://bugs.webkit.org/show_bug.cgi?id=32690, but I can't find a single source download. At least not a convenient one. The previous link says:
Which has a link to a single commit WebKit/WebKit@c6540e1. However this isn't a link to a 532.7 release That makes sourcing an accurate version of WebKit somewhat difficult. It seems like it would actually be fairly trivial to get this idea working for the Wii U? But the 3DS is an issue here. If we can find a working release for 532.7 then maybe, but for now all we have is 536.28 |
This # * Use an old Ubuntu 12.04 base image to have older tools
FROM ubuntu:12.04
# * Switch out the default Ubuntu repository for old-releases (since 12.04 is EOL)
RUN sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list \
&& sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list
# * Update apt-get and install a bunch of dependencies WebKit seems to need
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gperf \
bison \
flex \
python \
libglib2.0-dev \
libgtk2.0-dev \
libcairo2-dev \
libpango1.0-dev \
libicu-dev \
libsqlite3-dev \
libxslt1-dev \
libjpeg-dev \
libpng12-dev \
libwebp-dev \
libcurl4-gnutls-dev \
autoconf \
automake \
libtool \
pkg-config \
git \
subversion \
gettext \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# * Cloned from https://github.com/WebKit/WebKit/tree/safari-536.28-branch
# * Before this step I manually delete the WebKit-536.38/.git folder because it has 11GB of history
COPY WebKit-536.38/ /webkit
# * Create a new non-root user and make them own the WebKit source.
# * build-webkit cannot be run as root, but the files aren't owned
# * by the non-root user so they fail to be modified
RUN useradd -ms /bin/bash builder
RUN chown -R builder:builder /webkit
USER builder
WORKDIR /webkit
# TODO - Patch Tools/jhbuild/jhbuild-wrapper to remove some of the git operations. Comment out uses of update_jhbuild() and MANUALLY clone https://gitlab.gnome.org/GNOME/jhbuild to WebKitBuild/Dependencies/Source and MANUALLY checkout 1eedc423f75c605224b430579e4c303292199507
# * Build WebKit in release mode for GTK
RUN ./Tools/Scripts/build-webkit --gtk --release
CMD ["/bin/bash"] It starts to build everything but dies eventually, and requires editing the source a bit. It ends up dying with:
But it doesn't tell me where things start to die? It doesn't seem to have any sort of Python errors being logged. I THINK it's making it's way to |
I've made it even farther. Rather than dealing with local copies of the source, I instead opted to mirror them and clone them in the container. This was done because there's weird bootstrapping going on where some code and libraries are generated on the fly and use the full system path of the host, it was just a mess. A copy of the WebKit version can be found at https://github.com/jonbarrow/webkit-536.28. All this does is mirror WebKit at the time of 536.28 but removes all the git history (since there's 11GB in total) and handles some minor modifications for dead dependency links. Due to the issues with jhbuild, I have also mirrored it (with it's full git history, as that's required) here https://github.com/jonbarrow/jhbuild. Updating the # * Use an old Ubuntu 12.04 base image to have older tools
FROM ubuntu:12.04
# * Switch out the default Ubuntu repository for old-releases (since 12.04 is EOL)
RUN sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list \
&& sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list
# * Update apt-get and install a bunch of dependencies WebKit seems to need
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gperf \
bison \
flex \
python \
libglib2.0-dev \
libgtk2.0-dev \
libcairo2-dev \
libpango1.0-dev \
libicu-dev \
libsqlite3-dev \
libxslt1-dev \
libjpeg-dev \
libpng12-dev \
libwebp-dev \
libcurl4-gnutls-dev \
autoconf \
automake \
libtool \
pkg-config \
git \
subversion \
gettext \
ca-certificates \
wget \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# * Create a new non-root user and make them own the WebKit source.
# * build-webkit cannot be run as root, but the files aren't owned
# * by the non-root user so they fail to be modified
RUN useradd -ms /bin/bash builder
USER builder
RUN git clone https://github.com/jonbarrow/webkit-536.28 /home/builder/webkit
WORKDIR /home/builder/webkit
# * Build WebKit in release mode for GTK
RUN ./Tools/Scripts/build-webkit --gtk --release
CMD ["/bin/bash"] Now gets the compilation MUCH farther. However it still ends up failing. It exits with:
I'm really not sure what's happening at this stage tbh. The |
I've got gnutls to build now, and the compilation gets extremely far it seems. This is the new Dockerfile:
This setup seems to almost complete the build, however it fails with errors such as:
and:
It looks like there's 2 issues happening here, neither of which I think we have any control over?
I dug around a bit and made some conclusions:
Which all together tells me one of:
|
Current Dockerfile:
With the latest changes to my mirror of WebKit this now fully begins the build process. However it fails in the end for 2 reasons:
Note:
Error 1 is caused because of the following line: Error 2 is caused #if USE(ACCELERATED_COMPOSITING)
RenderLayer* RenderLayer::enclosingCompositingLayer(bool includeSelf) const
{
if (includeSelf && isComposited())
return const_cast<RenderLayer*>(this);
for (const RenderLayer* curr = compositingContainer(this); curr; curr = compositingContainer(curr)) {
if (curr->isComposited())
return const_cast<RenderLayer*>(curr);
}
return 0;
}
#endif #if USE(ACCELERATED_COMPOSITING)
// It's not necessary to do the second pass if the scrollbars paint into layers.
if ((m_hBar && layerForHorizontalScrollbar()) || (m_vBar && layerForVerticalScrollbar()))
return;
#endif
IntRect localDamgeRect = damageRect;
localDamgeRect.moveBy(-paintOffset);
if (!overflowControlsIntersectRect(localDamgeRect))
return;
RenderView* renderView = renderer()->view();
RenderLayer* paintingRoot = enclosingCompositingLayer(); // line 2615
if (!paintingRoot)
paintingRoot = renderView->layer();
paintingRoot->setContainsDirtyOverlayScrollbars(true);
return;
} these are just actual bugs in WebKit it seems |
An issue that has come up a number of times is the ability to quickly and easily work with apps on the Wii U and 3DS which render their UIs using an embedded browser (Miiverse, eShop, Wii U Account Settings, etc.)
These have a number of challenges that must be overcome to work with them, such as (but not limited to):
Additionally, the actual developer experience is not great. The platforms themselves have a number of issues, such as:
We should consider looking into fixing this through the use of a dedicated tool to test these browser apps. We have 2 options for this:
The text was updated successfully, but these errors were encountered: