-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from UsernameFodder/devcontainer
Add devcontainer
- Loading branch information
Showing
4 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
FROM ubuntu:22.04 | ||
|
||
# Link python -> python3 convenience | ||
RUN ln -s python3 /usr/bin/python | ||
|
||
# Basic utils | ||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
bash-completion \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
gnupg \ | ||
groff \ | ||
make \ | ||
pkg-config \ | ||
unzip \ | ||
software-properties-common \ | ||
sudo \ | ||
vim \ | ||
wget \ | ||
xvfb | ||
|
||
# Decomp tools | ||
RUN dpkg --add-architecture i386 | ||
RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key | ||
RUN add-apt-repository ppa:cybermax-dexter/sdl2-backport | ||
RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources | ||
# We don't need Mono/Gecko | ||
ENV WINEDLLOVERRIDES="mscoree=d;mshtml=d" | ||
# Hide the annoying wine-internal "fixme" messages | ||
ENV WINEDEBUG="fixme-all" | ||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-downgrades --install-recommends \ | ||
g++-10-multilib \ | ||
linux-libc-dev \ | ||
binutils-arm-none-eabi \ | ||
p7zip-full \ | ||
libpng-dev \ | ||
libpugixml-dev \ | ||
winehq-stable | ||
|
||
RUN apt-get clean | ||
|
||
RUN useradd -m -s /bin/bash -g sudo muttski | ||
# Passwordless sudo for convenience | ||
RUN echo "muttski ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/muttski | ||
USER muttski | ||
|
||
ENV CC=gcc-10 | ||
ENV CXX=g++-10 | ||
|
||
COPY onCreate.sh /opt/devcontainer/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"runArgs": ["--init"], | ||
"onCreateCommand": "/opt/devcontainer/onCreate.sh ${containerWorkspaceFolder}", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"dan-c-underwood.arm", | ||
"ms-python.python" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
WORKSPACE="$1" | ||
cd /tmp | ||
|
||
if [ ! -d "$WORKSPACE/tools/mwccarm" ]; then | ||
wget https://cdn.discordapp.com/attachments/698589325620936736/845499146982129684/mwccarm.zip | ||
unzip mwccarm.zip | ||
mv -v mwccarm "$WORKSPACE/tools" | ||
fi | ||
|
||
if [ ! -d "$WORKSPACE/tools/bin" \ | ||
-o ! -f "$WORKSPACE/sub/ARM7-TS.lcf.template" \ | ||
-o ! -f "$WORKSPACE/ARM9-TS.lcf.template" \ | ||
-o ! -f "$WORKSPACE/mwldarm.response.template" ]; then | ||
wget https://cdn.discordapp.com/attachments/698589325620936736/722822401963851797/NitroSDK-3_2-060901.7z | ||
7z x NitroSDK-3_2-060901.7z | ||
rm -rf "$WORKSPACE/tools/bin" | ||
mv -v NitroSDK-3_2-060901/tools/bin "$WORKSPACE/tools" | ||
mv -v NitroSDK-3_2-060901/include/nitro/specfiles/ARM7-TS.lcf.template "$WORKSPACE/sub/" | ||
mv -v NitroSDK-3_2-060901/include/nitro/specfiles/ARM9-TS.lcf.template "$WORKSPACE/" | ||
mv -v NitroSDK-3_2-060901/include/nitro/specfiles/mwldarm.response.template "$WORKSPACE/" | ||
fi | ||
|
||
# Set up wine under a virtual X11 server to hide the annoying GUI popup. | ||
# Setting this up here means wine won't need to do setup on first build. | ||
# Note that this doesn't work if done in the Dockerfile directly, it | ||
# needs to be done in the running devcontainer. | ||
xvfb-run wineboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters