Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MinyazevR committed Nov 10, 2024
1 parent 1932b7b commit a9e6798
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/common_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:
uses: ./.github/workflows/installer.yml
with:
os: ubuntu-latest
container_name: altlinux/base:latest
container_name: alt:latest
artifact_name: ubuntu-latest-installer

install-archlinux-installer:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
steps:

- name: Install dependencies
run: apt-get update && apt-get -y dist-upgrade && apt-get install -y glibc git p7zip curl
run: apt-get update && apt-get -y dist-upgrade && apt-get install -y glibc git-core p7zip curl sudo
if: startsWith(inputs.container_name, 'altlinux') == true

- name: Install dependencies
run: yum install -y epel-release && yum update -y && yum install -y git-core findutils p7zip
run: yum install -y epel-release && yum update -y && yum install -y git-core findutils p7zip sudo
if: startsWith(inputs.container_name, 'rocky') == true

- name: Install dependencies
run: pacman -Sy && pacman -S git p7zip --noconfirm
run: pacman -Sy && pacman -S git p7zip sudo --noconfirm
if: startsWith(inputs.container_name, 'arch') == true

- name: Install dependencies
Expand Down Expand Up @@ -82,18 +82,18 @@ jobs:
- name: Run minimal tests
run: |
TWOD_EXEC_NAME=$(ls -1d "$BIN_DIR"/2D-model* | head -n 1)
for i in $GITHUB_WORKSPACE/testing_small/*; do "$TWOD_EXEC_NAME" -b -s 5 "$i" --platform minimal; done
for i in "$GITHUB_WORKSPACE"/testing_small/*; do "$TWOD_EXEC_NAME" -b -s 5 "$i" --platform minimal; done
- name: Run minimal JavaScript interpeter tests
run: |
TWOD_EXEC_NAME=$(ls -1d "$BIN_DIR"/2D-model* | head -n 1)
for i in $GITHUB_WORKSPACE/testing_small/*; do "$TWOD_EXEC_NAME" --generate-path "$i".js --generate-mode javascript \
-b -s 5 --direct-script-path "$i".js "$i" --platform minimal; done
for i in "$GITHUB_WORKSPACE"/testing_small/*; do "$TWOD_EXEC_NAME" --generate-path "$i".js --generate-mode javascript \
-b -s 5 --script-path "$i".js "$i" --platform minimal; done
- name: Run minimal Python interpeter tests
run: |
TRIK_PYTHONPATH_BUNDLE_DIR="$LIB_DIR"/python-runtime
export TRIK_PYTHONPATH=.:"${TRIK_PYTHONPATH_BUNDLE_DIR}/base_library.zip:${TRIK_PYTHONPATH_BUNDLE_DIR}/lib-dynload:${TRIK_PYTHONPATH_BUNDLE_DIR}"
TWOD_EXEC_NAME=$(ls -1d $BIN_DIR/2D-model* | head -n 1)
for i in $GITHUB_WORKSPACE/testing_small/*; do "$TWOD_EXEC_NAME" --generate-path "$i".py \
-b -s 5 --direct-script-path "$i".py "$i" --platform minimal; done
for i in "$GITHUB_WORKSPACE"/testing_small/*; do "$TWOD_EXEC_NAME" --generate-path "$i".py \
-b -s 5 --script-path "$i".py "$i" --platform minimal; done
4 changes: 2 additions & 2 deletions .github/workflows/setup_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ jobs:

steps:
- name: Install dependencies
run: apt-get update && apt-get -y dist-upgrade && apt-get install -y glibc git
run: apt-get update && apt-get -y dist-upgrade && apt-get install -y glibc git sudo
if: startsWith(inputs.container_name, 'altlinux') == true


- name: Install dependencies
run: yum update -y && yum install -y git-core
run: yum update -y && yum install -y git-core sudo
if: startsWith(inputs.container_name, 'rocky') == true

- name: Configure git
Expand Down
2 changes: 1 addition & 1 deletion buildScripts/github/build_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ case $RUNNER_OS in
TSNAME="trik-studio-installer-mac-$BRANCH_NAME.dmg"
;;
Linux)
QTIFWBIN=$(find /Qt/Tools -name "bin" | head -n 1)
QTIFWBIN=$(find "$HOME"/Qt/Tools -name "bin" | head -n 1)
ID=$(grep '^ID=' /etc/os-release | cut -d'=' -f2)
TSNAME="trik-studio-installer-linux-$BRANCH_NAME-$ID.run"
;;
Expand Down
31 changes: 17 additions & 14 deletions buildScripts/github/install_installer_Linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,47 @@ set -eux
ID=$(grep '^ID=' /etc/os-release | cut -d'=' -f2)

if [ "$ID" = "altlinux" ]; then
apt-get update && apt-get install -y libxkbcommon-x11 libX11 fontconfig libxcbutil-icccm \
sudo apt-get update && sudo apt-get install -y libxkbcommon-x11 libX11 fontconfig libxcbutil-icccm \
libxcbutil-image libdbus libxcbutil-keysyms libxcb-render-util
elif [ "$ID" = "ubuntu" ]; then
sudo apt-get update && sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 \
sudo apt-get update && sudo apt-get install -y --no-install-recommends libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 \
libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-sync1 libxcb-xfixes0 \
libxcb-shape0 libx11-xcb1 libfreetype6 libfontconfig1 libdbus-1-3
elif [ "$ID" = "arch" ]; then
pacman -Sy && pacman -S libxkbcommon-x11 xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil fontconfig libx11 --noconfirm
sudo pacman -Sy && sudo pacman -S libxkbcommon-x11 xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil fontconfig libx11 --noconfirm
elif [[ "$ID" = "rocky" || "$ID" = '"rocky"' ]]; then
yum update -y && yum install -y libxkbcommon-x11 xcb-util-wm libX11 xcb-util-image \
sudo yum update -y && sudo yum install -y libxkbcommon-x11 xcb-util-wm libX11 xcb-util-image \
dbus-libs xcb-util-keysyms xcb-util-renderutil fontconfig libX11-xcb
fi

INSTALLER_NAME="$INSTALLER_NAME.run"
chmod +x "$INSTALLER_NAME"

./$INSTALLER_NAME --verbose --script trik_studio_installscript.qs --platform minimal --mco "$CONCURRENCY"
# Default value --- 0
./"$INSTALLER_NAME" --verbose --script trik_studio_installscript.qs --platform minimal --mco "$CONCURRENCY"

PREFIX=/opt
if [ "$ID" = "ubuntu" ]; then
PREFIX=$HOME
PREFIX="$HOME"
fi

BIN_DIR=$PREFIX/TRIKStudio/bin && echo "BIN_DIR=$BIN_DIR" >> $GITHUB_ENV
LIB_DIR=$PREFIX/TRIKStudio/lib && echo "LIB_DIR=$LIB_DIR" >> $GITHUB_ENV
APP_DIR=$PREFIX/TRIKStudio && echo "APP_DIR=$APP_DIR" >> $GITHUB_ENV
BIN_DIR="$PREFIX"/TRIKStudio/bin && echo "BIN_DIR=$BIN_DIR" >> $GITHUB_ENV
LIB_DIR="$PREFIX"/TRIKStudio/lib && echo "LIB_DIR=$LIB_DIR" >> $GITHUB_ENV
APP_DIR="$PREFIX"/TRIKStudio && echo "APP_DIR=$APP_DIR" >> $GITHUB_ENV

export QT_PLATFORM_QPA=minimal
export LD_LIBRARY_PATH="$LIB_DIR"
"$BIN_DIR"/2D-model --version --platform minimal
"$APP_DIR"/maintenance --version --platform minimal
"$APP_DIR"/trik-studio --version --platform minimal
"$BIN_DIR"/2D-model --version
"$APP_DIR"/maintenance --version
"$APP_DIR"/trik-studio --version
"$BIN_DIR"/patcher --version

cd "$LIB_DIR"

ls *.so* | xargs ldd | grep -Ev "not found$" | grep so | sed -e '/^[^\t]/ d' | sed -e 's/\t//' \
# Find dependencies that have not been packaged, but are still in the system
ls -- *.so* | xargs ldd | grep -Ev "not found$" | grep so | sed -e '/^[^\t]/ d' | sed -e 's/\t//' \
| sed -e 's/.*=..//' | sed -e 's/ (0.*)//' | grep -Ev "lib(c|dl|m|pthread|rt)\.so.*" \
| grep -Ev "$LD_LIBRARY_PATH" | grep -Ev "ld|linux-vdso"

ls *.so* | xargs ldd | grep "not found" || exit 0
ls -- *.so* | xargs ldd | grep "not found" || exit 0
exit 1
17 changes: 9 additions & 8 deletions buildScripts/github/install_installer_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ GCC_VERSION=${GCC_VERSION:-13}
TRIK_PYTHON="python3.${TRIK_PYTHON3_VERSION_MINOR}"
TRIK_QT_VERSION=${TRIK_QT_VERSION:-5.15}

yum update -y && yum install -y epel-release
yum install --allowerasing -y sudo which libusbx-devel curl wget make gcc-toolset-"$GCC_VERSION"-{gcc-c++,libasan-devel,libubsan-devel,gdb} \
sudo yum update -y && sudo yum install -y epel-release
sudo yum install --allowerasing -y sudo which libusbx-devel curl wget make gcc-toolset-"$GCC_VERSION"-{gcc-c++,libasan-devel,libubsan-devel,gdb} \
git-core ccache zlib-devel rsync "$TRIK_PYTHON"-{devel,pip,urllib3} mesa-libGL-devel systemd-devel fontconfig p7zip xz time findutils
yum install -y pulseaudio-libs-glib2 qt5-qtbase-gui libwayland-{server,client,cursor} libxkbcommon-x11
sudo yum install -y pulseaudio-libs-glib2 qt5-qtbase-gui libwayland-{server,client,cursor} libxkbcommon-x11
echo "source scl_source enable gcc-toolset-$GCC_VERSION" >> ~/.bash_profile

"$TRIK_PYTHON" -m venv venv
. ./venv/bin/activate
"$TRIK_PYTHON" -m pip install -U pip
"$TRIK_PYTHON" -m pip install aqtinstall
"$TRIK_PYTHON" -m aqt install-qt linux desktop "$TRIK_QT_VERSION" -O /Qt -m qtscript qtwaylandcompositor --archives qtbase qtmultimedia qtsvg qtscript \
"$TRIK_PYTHON" -m aqt install-qt linux desktop "$TRIK_QT_VERSION" -O "$HOME"/Qt -m qtscript qtwaylandcompositor --archives qtbase qtmultimedia qtsvg qtscript \
qttools qtserialport qtimageformats icu qtwayland qtdeclarative

#libQt5WaylandCompositor.so.5.15: libQt5Quick.so.5 libQt5Qml.so.5 libQt5QmlModels.so.5

QT_ROOT_DIR=$(ls -1d /Qt/$TRIK_QT_VERSION*/gcc_64 | head -n 1)
QT_ROOT_DIR=$(ls -1d "$HOME"/Qt/$TRIK_QT_VERSION*/gcc_64 | head -n 1)
echo "$QT_ROOT_DIR/bin" >> $GITHUB_PATH

if [ "$BUILD_INSTALLER" = "true" ]; then
"$TRIK_PYTHON" -m pip install -U pip
"$TRIK_PYTHON" -m pip install aqtinstall
"$TRIK_PYTHON" -m aqt install-tool -O /Qt linux desktop tools_ifw
"$TRIK_PYTHON" -m aqt install-tool -O "$HOME"/Qt linux desktop tools_ifw
fi
deactivate
6 changes: 3 additions & 3 deletions buildScripts/github/install_installer_macOS.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/bash
set -euxo pipefail
set -eux

sudo hdiutil attach "$INSTALLER_EXT_NAME"
sudo cp -rf "/Volumes/$INSTALLER_NAME/$INSTALLER_NAME.app" $GITHUB_WORKSPACE
sudo hdiutil detach /Volumes/"$INSTALLER_NAME"
./$INSTALLER_NAME.app/Contents/MacOS/$INSTALLER_NAME --verbose --script trik_studio_installscript.qs
./"$INSTALLER_NAME".app/Contents/MacOS/$INSTALLER_NAME --verbose --script trik_studio_installscript.qs

BIN_DIR="/Applications/TRIKStudio/TRIK Studio.app/Contents/MacOS" && echo "BIN_DIR=$BIN_DIR" >> $GITHUB_ENV
LIB_DIR="/Applications/TRIKStudio/TRIK Studio.app/Contents/Lib" && echo "LIB_DIR=$LIB_DIR" >> $GITHUB_ENV
APP_DIR="/Applications/TRIKStudio/TRIK Studio.app/Contents/MacOS" && echo "APP_DIR=$APP_DIR" >> $GITHUB_ENV

sudo rm -rf $INSTALLER_NAME.app
sudo rm -rf "$INSTALLER_NAME".app
ls "/Applications/TRIKStudio/TRIK Studio.app/Contents/MacOS"
export DYLD_LIBRARY_PATH="$LIB_DIR"
"$BIN_DIR"/2D-model --version
Expand Down

0 comments on commit a9e6798

Please sign in to comment.