Skip to content

Commit

Permalink
Get manual build working
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Dec 14, 2023
1 parent 4dbf5c9 commit 4c0c3fc
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ dmypy.json

# Updates folder from running the application
updates/
rm-docker/
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "Installing dependencies"
python -m pip install -r requirements.txt

echo "Building codexctl"
pyinstaller \
python -m PyInstaller \
--noconfirm \
--runtime-tmpdir /tmp \
--onefile \
Expand Down
59 changes: 52 additions & 7 deletions scripts/install_build_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,75 @@ set -eu
opkg update

echo "Installing basic build tools"
opkg install gcc binutils busybox gawk ldd make sed tar patchelf
opkg install \
gcc \
binutils \
busybox \
gawk \
ldd \
make \
sed \
tar \
patchelf

echo "Installing recommended build tools"
opkg install coreutils-install diffutils ldconfig patch pkg-config --force-overwrite
opkg --force-overwrite \
install \
coreutils-install \
diffutils \
ldconfig \
patch \
pkg-config

echo "Installing automake, cmake, meson, and ninja"
opkg install automake libintl-full libtool-bin cmake icu libopenssl bash git git-http python3-pip python3-setuptools coreutils-od python3-psutil python3-bcrypt python3-cryptography
opkg install \
automake \
libintl-full \
libtool-bin \
cmake \
icu \
libopenssl \
bash \
git \
git-http python3-pip \
python3-setuptools \
coreutils-od \
python3-psutil \
python3-bcrypt \
python3-cryptography

python3 -m pip install -U wheel
cd /opt/tmp
git clone https://github.com/ninja-build/ninja.git
cd ./ninja
git checkout release
CONFIG_SHELL=/opt/bin/bash python3 ./configure.py --bootstrap
install -Dm0755 -t /opt/bin ./ninja
cd /opt/tmp && rm -Rf /opt/tmp/ninja
cd /opt/tmp
rm -Rf /opt/tmp/ninja
python3 -m pip install -U meson

echo "Installing header files"
opkg install --force-overwrite --force-reinstall libncurses-dev libxml2-dev python3-dev ruby-dev zlib-dev
opkg install --force-overwrite --force-reinstall \
libncurses-dev \
libxml2-dev \
python3-dev \
ruby-dev \
zlib-dev

/opt/bin/busybox wget -qO- "$(/opt/bin/busybox sed -Ene \
's|^src/gz[[:space:]]entware[[:space:]]https?([[:graph:]]+)|http\1/include/include.tar.gz|p' \
/opt/etc/opkg.conf)" | /opt/bin/busybox tar x -vzC /opt/include

echo "Installing python dependencies"
opkg install python3-cryptography python3-bcrypt python3-requests python3-psutil
opkg install \
python3-cryptography \
python3-bcrypt \
python3-requests \
python3-psutil

ln -s /opt/lib/libffi.so.8 /opt/lib/libffi.so
python3 -m pip install -U pip setuptools
python3 -m pip install -U \
pip \
setuptools \
pyinstaller
8 changes: 7 additions & 1 deletion scripts/run_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ set -e

run_vm.sh -serial null -daemonize
wait_ssh.sh
rsync -avr --exclude ".git" /src root@localhost:/opt/tmp
rsync -avr \
--exclude ".git" \
--exclude "rm-docker" \
--filter=':- .gitignore' \
/src \
root@localhost:/opt/tmp
ssh root@localhost 'bash -l -c /opt/bin/build.sh'
rsync -avr root@localhost:/opt/tmp/src/dist /src
save_vm.sh

0 comments on commit 4c0c3fc

Please sign in to comment.