treewide: Fix multiarch and scaling
This commit is contained in:
parent
5abee4e932
commit
7a1dba27cd
23
build.sh
23
build.sh
@ -4,23 +4,28 @@ sed -e
|
|||||||
|
|
||||||
rm *.tar.gz
|
rm *.tar.gz
|
||||||
|
|
||||||
pkgname=vscodium
|
dlarch="$1"
|
||||||
pkgver=1.65.0
|
if [ "$1" == "amd64" ]; then
|
||||||
srcdir=$ROOT/build/aarch64-linux-gnu/app
|
dlarch="x64"
|
||||||
pkgdir=$srcdir/install
|
fi
|
||||||
mkdir -p $srcdir $pkgdir
|
|
||||||
|
|
||||||
wget https://github.com/VSCodium/vscodium/releases/download/$pkgver/VSCodium-linux-$1-$pkgver.tar.gz
|
|
||||||
mkdir -p $srcdir/vscodium/VSCodium-linux-$1-$pkgver
|
|
||||||
tar xvf ./VSCodium-linux-$1-$pkgver.tar.gz -C $pkgdir
|
|
||||||
|
|
||||||
CLICK_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
|
CLICK_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
|
||||||
CLICK_FRAMEWORK=ubuntu-sdk-16.04.5
|
CLICK_FRAMEWORK=ubuntu-sdk-16.04.5
|
||||||
|
|
||||||
|
pkgver=1.65.0
|
||||||
|
srcdir=$BUILD_DIR
|
||||||
|
pkgdir=$INSTALL_DIR
|
||||||
|
mkdir -p $srcdir $pkgdir
|
||||||
|
|
||||||
|
wget https://github.com/VSCodium/vscodium/releases/download/$pkgver/VSCodium-linux-$dlarch-$pkgver.tar.gz
|
||||||
|
tar xvf ./VSCodium-linux-$dlarch-$pkgver.tar.gz -C $pkgdir
|
||||||
|
|
||||||
cp $ROOT/manifest.json $pkgdir/
|
cp $ROOT/manifest.json $pkgdir/
|
||||||
sed -i "s/@CLICK_ARCH@/$CLICK_ARCH/g" $pkgdir/manifest.json
|
sed -i "s/@CLICK_ARCH@/$CLICK_ARCH/g" $pkgdir/manifest.json
|
||||||
sed -i "s/@CLICK_FRAMEWORK@/$CLICK_FRAMEWORK/g" $pkgdir/manifest.json
|
sed -i "s/@CLICK_FRAMEWORK@/$CLICK_FRAMEWORK/g" $pkgdir/manifest.json
|
||||||
cp $ROOT/codium.apparmor $pkgdir/
|
cp $ROOT/codium.apparmor $pkgdir/
|
||||||
cp $ROOT/codium.desktop $pkgdir/
|
cp $ROOT/codium.desktop $pkgdir/
|
||||||
|
cp $ROOT/codium.wrapper $pkgdir/
|
||||||
|
chmod a+x $pkgdir/codium.wrapper
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=VSCodium
|
Name=VSCodium
|
||||||
Exec=env GDK_BACKEND=x11 GDK_SCALE=2 ./codium --force-device-scale-factor=2 %U
|
Exec=./codium.wrapper %U
|
||||||
Icon=./resources/app/resources/linux/code.png
|
Icon=./resources/app/resources/linux/code.png
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
8
codium.wrapper
Executable file
8
codium.wrapper
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCALE=$(( $GRID_UNIT_PX / 8 ))
|
||||||
|
|
||||||
|
export GDK_BACKEND=x11
|
||||||
|
export GDK_SCALE=$SCALE
|
||||||
|
|
||||||
|
exec ./codium --force-device-scale-factor=$SCALE "$@"
|
Reference in New Issue
Block a user