-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving AppImage generation trials.
Tried to include dependencies from the system. It appears GLEW and FreeGLUT depend on drivers from the OS, since I'm running on NVIDIA it ties itself with it. Meaning that I need to build for NVIDIA/MESA/... etc.
- Loading branch information
1 parent
a88ae7c
commit 2bf4050
Showing
4 changed files
with
80 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# Author : Hemanth.HM | ||
# Email : hemanth[dot]hm[at]gmail[dot]com | ||
# License : GNU GPLv3 | ||
# | ||
|
||
function usage() | ||
{ | ||
cat << EOU | ||
Usage: bash $0 <path to the binary> <path to copy the dependencies> | ||
EOU | ||
exit 1 | ||
} | ||
|
||
#Validate the inputs | ||
[[ $# < 2 ]] && usage | ||
|
||
#Check if the paths are vaild | ||
[[ ! -e $1 ]] && echo "Not a vaild input $1" && exit 1 | ||
[[ -d $2 ]] || echo "No such directory $2 creating..."&& mkdir -p "$2" | ||
|
||
#Get the library dependencies | ||
echo "Collecting the shared library dependencies for $1..." | ||
deps=$(ldd $1 | awk 'BEGIN{ORS=" "}$1\ | ||
~/^\//{print $1}$3~/^\//{print $3}'\ | ||
| sed 's/,$/\n/') | ||
echo "Copying the dependencies to $2" | ||
|
||
#Copy the deps | ||
userLibs="/usr/lib/"* | ||
for dep in ${deps} | ||
do | ||
if [[ ${dep} = ${userLibs} ]]; then | ||
echo "Copying ${dep} to $2" | ||
cp "${dep}" "$2" | ||
else | ||
echo "Ignoring system dependency ${dep}" | ||
fi | ||
done | ||
|
||
echo "Done!" |