Skip to content

Commit

Permalink
feat: Add Toolbox support (#6)
Browse files Browse the repository at this point in the history
* feat: Initial Toolbox support

* feat: Add CLI instruction for use with Toolbox
  • Loading branch information
zelikos authored Sep 10, 2023
1 parent 6274867 commit aec3afc
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ then
echo "Please install either distrobox or toolbox to use this script."
exit
else
use_distrobox=false
echo "Toolbox found."
# TODO: Add Toolbox support
echo "Toolbox support is currently WIP. Please use distrobox for now."
exit
fi
else
use_distrobox=true
# UNCOMMENT AFTER TESTING
#use_distrobox=true
echo "Distrobox found."
fi
else
Expand All @@ -43,6 +42,7 @@ then
distrobox enter davincibox -- echo "davincibox initialized"
else
toolbox create -i ghcr.io/zelikos/davincibox:latest -c davincibox
toolbox run --container davincibox echo "davincibox initialized"
fi

# Extract DaVinci Resolve installer
Expand All @@ -55,7 +55,9 @@ then
# Workaround for an issue with Resolve's included libglib-2.0
# May not be needed in the future
distrobox enter davincibox -- sudo rm /opt/resolve/libs/libglib-2.0.so /opt/resolve/libs/libglib-2.0.so.0 /opt/resolve/libs/libglib-2.0.so.0.6800.4
# TODO: Add toolbox support
else
toolbox run --container davincibox sudo squashfs-root/AppRun -i -a -y
toolbox run --container davincibox sudo rm /opt/resolve/libs/libglib-2.0.so /opt/resolve/libs/libglib-2.0.so.0 /opt/resolve/libs/libglib-2.0.so.0.6800.4
fi
else
echo "${1} is not a DaVinci Resolve installer."
Expand All @@ -68,6 +70,7 @@ rm -rf squashfs-root/
# Prompt user about adding desktop launcher
add_launcher=false

# TODO: Better phrasing
echo "Add DaVinci Resolve launcher? y/N"
echo "Note: This currently requires administrative priveleges"
read response
Expand All @@ -84,17 +87,23 @@ then
# Because the .desktop file distrobox creatres requires the directory to exist
pkexec mkdir /opt/resolve
distrobox enter davincibox -- distrobox-export --app /opt/resolve/bin/resolve
# TODO: Toolbox support
else
echo "Launcher support for Toolbox is WIP."
fi
else
echo "If you would like to create a launcher later,"
echo "run the following command:"
if $use_distrobox
then
echo "run the following command:"
echo "distrobox enter davincibox -- distrobox-export --app /opt/resolve/bin/resolve"
# TODO: Toolbox
else
echo "Launcher support for Toolbox is WIP."
fi
echo ""
echo "Otherwise, to run DaVinci Resolve from the CLI, use:"
echo "distrobox enter davincibox -- /opt/resolve/bin/resolve"
if &use_distrobox
then
echo "distrobox enter davincibox -- /opt/resolve/bin/resolve"
else
echo "toolbox run --container davincibox /opt/resolve/bin/resolve
fi

0 comments on commit aec3afc

Please sign in to comment.