Reorg and start to add packaging scripts
This commit is contained in:
parent
b5915cfdf2
commit
ae214cf1a2
|
|
@ -1,3 +1,4 @@
|
|||
/vulkan/build/
|
||||
/build/
|
||||
__pycache__
|
||||
*.zip
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
UUID="breezydesktop@xronlinux.com"
|
||||
|
||||
# fail on error
|
||||
set -e
|
||||
# log executed commands
|
||||
set -x
|
||||
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
echo "This script must NOT be run as root" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# https://stackoverflow.com/a/246128
|
||||
SCRIPTDIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
|
||||
SRCDIR="$SCRIPTDIR/../breezydesktop@xronlinux.com"
|
||||
TMPDIR=$(mktemp -d -t breezy-gnome-XXXXXXXXXX)
|
||||
DESTDIR="$TMPDIR/$UUID"
|
||||
|
||||
cd "$SCRIPTDIR" || exit 1
|
||||
|
||||
check_command() {
|
||||
if ! command -v "$1" &>/dev/null; then
|
||||
echo "Please install \"$1\" and make sure it's available in your \$PATH"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
compile_schemas() {
|
||||
check_command "glib-compile-schemas"
|
||||
mkdir -p "$DESTDIR/schemas/"
|
||||
|
||||
# the pack command also compiles the schemas but only into the zip file
|
||||
glib-compile-schemas --targetdir="$DESTDIR/schemas" "$SRCDIR/schemas/"
|
||||
}
|
||||
|
||||
copy_static_files() {
|
||||
# Copy non generated files to destdir
|
||||
cp $SRCDIR/*.js $DESTDIR/
|
||||
cp $SRCDIR/*.frag $DESTDIR/
|
||||
mkdir -p "$DESTDIR/schemas/"
|
||||
cp $SRCDIR/schemas/*.xml $DESTDIR/schemas/
|
||||
mkdir -p $DESTDIR/dbus-interfaces/
|
||||
cp $SRCDIR/dbus-interfaces/*.xml $DESTDIR/dbus-interfaces/
|
||||
cp $SRCDIR/metadata.json $DESTDIR/
|
||||
}
|
||||
|
||||
pack() {
|
||||
check_command "gnome-extensions"
|
||||
|
||||
# pack everything into a sharable zip file
|
||||
extra_source=()
|
||||
for file in "$DESTDIR"/*; do
|
||||
extra_source+=("--extra-source=$file")
|
||||
done
|
||||
|
||||
gnome-extensions pack --force "${extra_source[@]}" "$DESTDIR"
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
# No arguments, do everything
|
||||
compile_schemas
|
||||
copy_static_files
|
||||
pack
|
||||
elif [ "$1" == "build_local" ]; then
|
||||
compile_schemas
|
||||
copy_static_files
|
||||
elif [ "$1" == "pack" ]; then
|
||||
pack
|
||||
elif [ "$1" == "copy_static" ]; then
|
||||
copy_static_files
|
||||
fi
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 username [group]"
|
||||
exit 1
|
||||
fi
|
||||
user=$1
|
||||
user_home=/home/$user
|
||||
|
||||
# Check if a second parameter is provided, if not, use the username as the group
|
||||
if [ -z "$2" ]; then
|
||||
group=$user
|
||||
else
|
||||
group=$2
|
||||
fi
|
||||
|
||||
# go to the downloads directory in user_home
|
||||
pushd $user_home/Downloads
|
||||
|
||||
rm xrealAirLinuxDriver.tar.gz xreal_driver_setup
|
||||
wget https://github.com/wheaney/XRLinuxDriver/releases/download/breezy-test-v2/xrealAirLinuxDriver.tar.gz
|
||||
wget https://github.com/wheaney/XRLinuxDriver/releases/download/breezy-test-v2/xreal_driver_setup
|
||||
|
||||
chmod +x xreal_driver_setup
|
||||
chown $user:$group xreal*
|
||||
|
||||
sudo ./xreal_driver_setup $user_home/Downloads/xrealAirLinuxDriver.tar.gz
|
||||
|
||||
$user_home/bin/xreal_driver_config -e
|
||||
$user_home/bin/xreal_driver_config -vd
|
||||
|
||||
sed -i 's/virtual_display/breezy_desktop/g' $user_home/.xreal_driver_config
|
||||
|
||||
if [ ! -d breezy-desktop ]; then
|
||||
git clone https://github.com/wheaney/breezy-desktop.git
|
||||
|
||||
chown -R $user:$group breezy-desktop
|
||||
|
||||
pushd breezy-desktop
|
||||
git checkout gnome-45
|
||||
else
|
||||
pushd breezy-desktop
|
||||
|
||||
git fetch origin
|
||||
git reset --hard origin/gnome-45
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
extensions_dir=$user_home/.local/share/gnome-shell/extensions
|
||||
|
||||
if [ ! -d $extensions_dir ]; then
|
||||
mkdir -p $extensions_dir
|
||||
chown $user:$group $extensions_dir
|
||||
fi
|
||||
|
||||
# check if the symlink at $extensions_dir/breezydesktop@org.xronlinux already exists
|
||||
if [ ! -L $extensions_dir/breezydesktop@org.xronlinux ]; then
|
||||
ln -s $user_home/Downloads/breezy-desktop/gnome/breezydesktop@org.xronlinux $extensions_dir/breezydesktop@org.xronlinux
|
||||
chown -R $user:$group $extensions_dir/breezydesktop@org.xronlinux
|
||||
fi
|
||||
|
||||
glib-compile-schemas --targetdir=$extensions_dir/breezydesktop@org.xronlinux/schemas/ $extensions_dir/breezydesktop@org.xronlinux/schemas/
|
||||
|
||||
sudo cp $extensions_dir/breezydesktop@org.xronlinux/schemas/org.gnome.shell.extensions.breezy-desktop.gschema.xml /usr/share/glib-2.0/schemas/
|
||||
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
|
||||
|
||||
echo "Breezy Desktop extension is installed. Please log out, log back in, \
|
||||
and then run the following command to enable it:\
|
||||
gnome-extensions enable breezydesktop@org.xronlinux"
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schemalist gettext-domain="breezydesktop">
|
||||
<schema id="com.xronlinux.BreezyDesktop" path="/com/xronlinux/BreezyDesktop/">
|
||||
<key name="effect-enable" type="b">
|
||||
<default>
|
||||
true
|
||||
</default>
|
||||
<summary>Enable XR effect</summary>
|
||||
<description>
|
||||
Enable XR effect
|
||||
</description>
|
||||
</key>
|
||||
<key name="recenter-display-shortcut" type="as">
|
||||
<default>
|
||||
<![CDATA[['<Control><Super>space', 'Ctrl+Super+Space']]]>
|
||||
</default>
|
||||
<summary>Re-center display</summary>
|
||||
<description>
|
||||
Shortcut to re-center the virtual display.
|
||||
</description>
|
||||
</key>
|
||||
<key name="toggle-display-distance-shortcut" type="as">
|
||||
<default>
|
||||
<![CDATA[['<Control><Super>Return', 'Ctrl+Super+Return']]]>
|
||||
</default>
|
||||
<summary>Trigger change to display distance</summary>
|
||||
<description>
|
||||
Shortcut to change the display distance.
|
||||
</description>
|
||||
</key>
|
||||
<key name="display-distance" type="d">
|
||||
<default>
|
||||
1.05
|
||||
</default>
|
||||
<summary>Display distance</summary>
|
||||
<description>
|
||||
How far away the display appears. Farther will look smaller, closer will look larger.
|
||||
</description>
|
||||
</key>
|
||||
<key name="toggle-display-distance-start" type="d">
|
||||
<default>
|
||||
0.85
|
||||
</default>
|
||||
<summary>Display distance start</summary>
|
||||
<description>
|
||||
Start distance when using the "change distance" shortcut.
|
||||
</description>
|
||||
</key>
|
||||
<key name="toggle-display-distance-end" type="d">
|
||||
<default>
|
||||
1.05
|
||||
</default>
|
||||
<summary>Display distance end</summary>
|
||||
<description>
|
||||
End distance when using the "toggle display distance" shortcut.
|
||||
</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"uuid": "breezydesktop@org.xronlinux",
|
||||
"uuid": "breezydesktop@xronlinux.com",
|
||||
"name": "Breezy GNOME XR Desktop",
|
||||
"description": "XR virtual desktop for GNOME.",
|
||||
"settings-schema": "com.xronlinux.BreezyDesktop",
|
||||
|
|
@ -0,0 +1 @@
|
|||
../../../ui/data/com.xronlinux.BreezyDesktop.gschema.xml
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
"sources" : [
|
||||
{
|
||||
"type" : "dir",
|
||||
"url" : "../"
|
||||
"source" : "./"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue