Skip to content

Commit

Permalink
trying to fix linux GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Sep 11, 2024
1 parent 1829373 commit 704a27d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gui/src/main/modules/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getAppRoot() {
if ( process.platform === 'win32' ) {
return path.join( app.getAppPath(), '/../../' );
} else if ( process.platform === 'linux' ) {
return path.join( app.getAppPath(), '/../../' );
return path.join( app.getAppPath(), '/../../../' );
} else {
return path.join( app.getAppPath(), '/../../../../' );
}
Expand Down
14 changes: 11 additions & 3 deletions release/linux/build_package_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ PACKAGE_NAME=alphadia
# BUILD_NAME is taken from environment variables, e.g. 'alphadia-1.2.1-linux-x64'
rm -rf ${BUILD_NAME}.deb

BIN_PATH=dist_pyinstaller/${BUILD_NAME}/opt/${PACKAGE_NAME}/bin
mkdir -p ${BIN_PATH}
BIN_PATH=dist_pyinstaller/${BUILD_NAME}/usr/local/${PACKAGE_NAME}
mkdir -p ${BIN_PATH}/gui

# === GUI ===
echo "Copying GUI"
Expand All @@ -23,17 +23,25 @@ fi
KERNEL=$(uname -s | tr '[:upper:]' '[:lower:]')
echo ARCH=${ARCH} KERNEL=${KERNEL}

echo ls ./gui/out
ls ./gui/out
echo

GUI_BUILD="./gui/out/${PACKAGE_NAME}-gui-${KERNEL}-${ARCH}"
if [ ! -d "$GUI_BUILD" ]; then
echo "GUI build not found at $GUI_BUILD"
exit 1
fi

echo ls ${GUI_BUILD}
ls ${GUI_BUILD}
cp -a ${GUI_BUILD}/. ${BIN_PATH}
echo

cp -a ${GUI_BUILD}/. ${BIN_PATH}/gui

cd ${BIN_PATH}
ln -s ./gui/alphadia-gui ./alphadia-gui
cd -

# Wrapping the pyinstaller folder in a .deb package
mv dist_pyinstaller/${PACKAGE_NAME} ${BIN_PATH}
Expand Down

0 comments on commit 704a27d

Please sign in to comment.