-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into fix/bestorders-overflow
- Loading branch information
Showing
9 changed files
with
584 additions
and
7 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,2 @@ | ||
.git | ||
.github |
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 |
---|---|---|
|
@@ -88,3 +88,4 @@ atomic_legacy_imgui | |
.vscode/settings.json | ||
.vscode/tasks.json | ||
bundled | ||
build.log |
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,121 @@ | ||
FROM docker.io/ubuntu:20.04 AS base | ||
|
||
LABEL authors=<[email protected]> | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
ENV SHELL=/bin/bash | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
WORKDIR /build/komodo-wallet-desktop | ||
COPY . /build/komodo-wallet-desktop | ||
RUN rm -rf .git build logs tmp | ||
|
||
RUN apt-get update -y && \ | ||
apt-get install -y build-essential \ | ||
libgtk-3-dev \ | ||
libgdk-pixbuf2.0-dev \ | ||
libglib2.0-dev \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
libgl1-mesa-dev \ | ||
ca-certificates \ | ||
zip \ | ||
tar \ | ||
sudo \ | ||
python3-dev \ | ||
python3-venv \ | ||
python3-pip \ | ||
python-is-python3 \ | ||
curl \ | ||
wget \ | ||
zstd \ | ||
software-properties-common \ | ||
lsb-release \ | ||
libpulse-dev \ | ||
libtool \ | ||
autoconf \ | ||
unzip \ | ||
libfuse2 \ | ||
libssl-dev \ | ||
libxkbcommon-x11-0 \ | ||
libxcb-icccm4 \ | ||
libxcb-image0 \ | ||
qt5-gtk-platformtheme \ | ||
libxcb1-dev \ | ||
libxcb-keysyms1-dev \ | ||
libxcb-render-util0-dev \ | ||
libxcb-xinerama0 \ | ||
libxcb-shape0-dev \ | ||
libxcb-xfixes0-dev \ | ||
libxcb-image0-dev \ | ||
libxcb-randr0-dev \ | ||
libxcb-xinerama0-dev \ | ||
libxcb-icccm4-dev \ | ||
libxcb-sync-dev \ | ||
libxcb-present-dev \ | ||
libxcb-dri3-dev \ | ||
libxcb-glx0-dev \ | ||
libxcomposite-dev \ | ||
libxdamage-dev \ | ||
libxrandr-dev \ | ||
libxcursor-dev \ | ||
libxi-dev \ | ||
libxtst-dev \ | ||
libx11-xcb-dev \ | ||
libxrender-dev \ | ||
gtk2-engines-pixbuf \ | ||
libgtk2.0-0 \ | ||
libgtk2.0-dev \ | ||
libgbm-dev \ | ||
git \ | ||
libnss3-dev \ | ||
libnspr4-dev \ | ||
libgstreamer-plugins-base1.0-dev \ | ||
libasound2-dev | ||
|
||
RUN git config --global --add safe.directory /build/komodo-wallet-desktop | ||
RUN cd /build/komodo-wallet-desktop && ./ci_tools_atomic_dex/ci_scripts/linux_script_docker.sh | ||
|
||
|
||
ENV CXX=clang++-12 | ||
ENV CC=clang-12 | ||
#ENV CXXFLAGS="-stdlib=libc++ -std=c++20" | ||
#ENV LDFLAGS="-stdlib=libc++" | ||
|
||
# Install Qt | ||
RUN python3 -m venv /build/.venv && \ | ||
/build/.venv/bin/pip install aqtinstall==3.1.1 && \ | ||
/build/.venv/bin/python -m aqt install-qt linux desktop 5.15.2 -O $HOME/Qt -b https://qt-mirror.dannhauer.de/ -m qtcharts debug_info qtwebengine | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV SHELL=/bin/bash | ||
ENV QT_INSTALL_CMAKE_PATH=/root/Qt/5.15.2/gcc_64/lib/cmake | ||
ENV QT_ROOT=/root/Qt/5.15.2 | ||
ENV PATH=/root/Qt/5.15.2/gcc_64/bin:$PATH | ||
|
||
|
||
# Install Nim | ||
ENV CHOOSENIM_CHOOSE_VERSION=1.6.2 | ||
RUN /build/komodo-wallet-desktop/ci_tools_atomic_dex/ci_scripts/choosenim.sh -y && \ | ||
export PATH=/root/.nimble/bin:$PATH && \ | ||
chmod +x /root/.choosenim/toolchains/nim-1.6.2/bin/* | ||
ENV PATH=/root/.nimble/bin:$PATH | ||
|
||
RUN cd /build/komodo-wallet-desktop/ci_tools_atomic_dex/vcpkg-repo && ./bootstrap-vcpkg.sh | ||
|
||
|
||
# USAGE: ### | ||
# | ||
# To build the build container | ||
# docker build -t kw-build-container . --progress=plain --no-cache | ||
# | ||
# To build the app | ||
# ./docker-build-linux.sh | ||
# | ||
# To enter container for debugging | ||
# docker run -it kw-build-container bash | ||
### | ||
|
||
CMD [ "bash" ] |
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,52 @@ | ||
#!/bin/bash | ||
|
||
|
||
# Update `ninja` to the latest compatible version (>= 1.10.2) | ||
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip | ||
sudo unzip -o ninja-linux.zip -d /usr/bin/ | ||
sudo chmod +x /usr/bin/ninja | ||
|
||
# Install LLVM/Clang | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod +x llvm.sh | ||
sudo ./llvm.sh 12 | ||
|
||
# Set Clang as the default compiler | ||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 777 | ||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 777 | ||
|
||
# Set GCC/G++ 9 as the fallback compiler | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 777 | ||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 777 | ||
|
||
# Install libc++ for C++20 support | ||
sudo apt-get install -y libc++-11-dev libc++abi-11-dev | ||
|
||
# Set environment variables for Clang | ||
export CXX=clang++-12 | ||
export CC=clang-12 | ||
|
||
# Install CMake 3.27.1 | ||
wget https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-linux-x86_64.tar.gz | ||
tar -xvzf cmake-3.27.1-linux-x86_64.tar.gz | ||
sudo cp -r cmake-3.27.1-linux-x86_64/* /usr/local/ | ||
sudo cp -r cmake-3.27.1-linux-x86_64/* /usr/ | ||
cmake --version | ||
|
||
## tar | ||
wget --timeout=10 --tries=3 https://ftp.gnu.org/gnu/tar/tar-1.32.tar.gz || wget --timeout=10 --tries=3 https://mirrors.sjtug.sjtu.edu.cn/gnu/tar/tar-1.32.tar.gz | ||
tar xvf tar-1.32.tar.gz | ||
cd tar-1.32 | ||
export FORCE_UNSAFE_CONFIGURE=1 | ||
./configure | ||
sudo make -j install | ||
sudo ln -sf /bin/tar /usr/local/bin/tar | ||
sudo update-alternatives --install /usr/bin/tar tar /usr/local/bin/tar 777 | ||
|
||
# get libwally | ||
git clone https://github.com/KomodoPlatform/libwally-core.git --recurse-submodules | ||
cd libwally-core | ||
./tools/autogen.sh | ||
./configure --disable-shared | ||
sudo make -j3 install | ||
cd .. |
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
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
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Define the target for the build (Debug or Release) | ||
TARGET="${1:-Debug}" | ||
|
||
docker run -v "$(pwd)":/build/komodo-wallet-desktop \ | ||
kw-build-container \ | ||
bash -c "cd /build/komodo-wallet-desktop/ci_tools_atomic_dex && \ | ||
nimble build -y && \ | ||
./ci_tools_atomic_dex build $TARGET && \ | ||
./ci_tools_atomic_dex bundle $TARGET" 2>&1 | tee build.log | ||
|
||
# Check if the build was successful | ||
if [ "${PIPESTATUS[0]}" -eq 0 ]; then | ||
echo "Build completed successfully!" | ||
else | ||
echo "Build failed. Check build.log for details." | ||
echo "Make sure you run 'docker build -t kw-build-container -f .docker/Dockerfile .' first" | ||
exit 1 | ||
fi |
Oops, something went wrong.