Comments (3)
Hi @mckaygerhard ! Thanks for your reply :)
Since EBG is modular, first "bare" module is "easybashgui
" (it doesn't need any widget, since it simply uses bash), and, if you have not yet installed, you must set a path in your script (e.g.: source /home/me/easybashgui
), but, you know, "easybashgui
" could be wherever in your system.
Once "easybashgui
" is sourced, it tries to source the second module: easybashgui.lib
(where are functions with all widgets ) and easybashgui.lib
can be only in 5 places:
- installed in system's PATH
- in same script dir
- in "includes/" subdir (of same script dir ) -I added this for more order and nicer projects -
- in "$libexec_dir" (if this var is defined in your system )
- in lib path (if "$SHELL_LIBRARY_PATH" is defined in your system )
=>In case all 5 options are false (that is easybashgui.lib
is missing in all 5 cases), then first module easybashgui
provides "bare shell" functions, and that's it.
(Well, maybe simplest way is to put easybashgui
and easybashgui.lib
directly into script dir... so you've done! )
About manpage and wiki, you're very kind and I really would thank you. This one is the real good Open Source spirit !
You know, an old contributor wrote time ago the old original EBG manpage (you find it in tarball ), but unfortunately it is pretty old... For instance, there aren't new "notify_*" functions, very very useful for a background desktop service.
It is really a pity, that unlike .rpm systems (like Fedora and PCLinuxOS ), those .deb systems (Debian, Ubuntu, etc. ) never had a .deb package available!
from easybashgui.
Hi mckaygerhard ! Thank you for your support.
It's true that initial variable is libexec_dir="/usr/lib/easybashgui"
but the function eb_incl() manages easybashgui lib sourcing even if it's not installed in system:
`
function eb_incl() {
local module=$1
if [ "${module:-unspecified}" = "unspecified" ]
then
echo "$eb_runtime_invoke_name: eb_incl: No module specified." 1>&2
return 1
fi
if [ "x${eb_runtime_abs_invoke_dir:-notset}" == "xnotset" ]
then
echo "$eb_runtime_invoke_name: eb_incl: Error, eb_runtime_abs_invoke_dir not set."
exit 1
fi
if [ "x$eb_runtime_abs_invoke_dir" == "x" ]
then
echo "$eb_runtime_invoke_name: eb_incl: Error, eb_runtime_abs_invoke_dir is empty."
exit 1
fi
# if installed in system's PATH
if type "$module" &>/dev/null
then
source "$module"
return 0
# if in same dir
elif [ -e "$eb_runtime_abs_invoke_dir/$module" ]
then
source "$eb_runtime_abs_invoke_dir/$module"
return 0
# if in includes/ subdir
elif [ -e "$eb_runtime_abs_invoke_dir/includes" ] \
&& [ -e "$eb_runtime_abs_invoke_dir/includes/$module" ]
then
source "$eb_runtime_abs_invoke_dir/includes/$module"
return 0
# if in "libexec_dir"
elif [ -e "$libexec_dir/$module" ]
then
source "$libexec_dir/$module"
return 0
# if lib path is defined
elif [ "${SHELL_LIBRARY_PATH:-unset}" != "unset" ]
then
local saved_IFS="$IFS"
IFS=':'
for path in $SHELL_LIBRARY_PATH
do
if [ -e "$path/$module" ]
then
source "$path/$module"
return 0
fi
done
IFS="$saved_IFS"
fi
echo -e "$eb_runtime_invoke_name: eb_incl: Could not find requested module \"$module\" in \$PATH, $eb_runtime_abs_invoke_dir, an includes/ subdirectory, or \$SHELL_LIBRARY_PATH." 1>&2 && return 1`
So, it is possible using EBG even if it's not yet installed in your system, sourcing EBG in this way:
source [WHEREVER]/easybashgui/src/easybashgui
I have just tested it to make sure is always working:
#mv /usr/bin/easybashgui /usr/bin/PROVAeasybashguiPROVA
#mv /usr/lib/easybashgui/easybashgui.lib /usr/lib/easybashgui/PROVAeasybashgui.libPROVA
I copied "easybashgui.lib" in same script's directory, and it did work.
This is my simple test script:
`
#!/usr/bin/env bash
source ./easybashgui/src/easybashgui
message CIAOOOOOOOOOOOOOOOO
`
However, I must admit that there is no documentation about embedding (that is: using and not installing) EBG in this way... I have to update my site!
https://sites.google.com/site/easybashgui/
Please, let me know your opinion about... :)
from easybashgui.
hi @vaisarger thanks for confirmation.. i was checking such funtion but not so deep.. i was guessing that path is compatible but i prefers to confirms to you.. so the only i need to use the project is just sourcered the two files in same path of my new script so then:
- create a new script
- move
easybashgui
andeasybashgui.lib
to the same path of the new script - sourcered the
easybashgui
and NOTeasybashgui.lib
from the new script
so then that's wll nright?
if such thing is right way, the rest of files must be decribed and i can make a simple manpage for you.. and also some examples on the wiki too!
from easybashgui.
Related Issues (20)
- Input function produces error when using special characters HOT 2
- no documentation of embebed projects HOT 5
- please implement or enable discussion on github or use gitlab for better free software support HOT 2
- small error in volume level example HOT 5
- Allow dark theme (switchable) aka: Better website HOT 6
- makefile refers to README instead of README.md HOT 1
- bug: zenity version dont respect the exit of terminate_wait_for HOT 3
- bug: seems whiptail is not detected if used with wait_for HOT 3
- rare: if we use kdialog for wait_for only shows notification HOT 5
- New release with repaired makefile HOT 3
- website Dark Mode switch HOT 11
- include gum in console mode HOT 5
- file into forbidden arch path HOT 1
- update packages, or automatically use direct sources in OBS HOT 4
- website docs migration to github actions HOT 1
- When run on physical tty in whiptail mode, all *message dialogs are white. This appears to only happen when the console is not framebuffer. HOT 3
- Errors from bash when sourcing easybashgui HOT 4
- Need to display both tag and name in tagged_menu HOT 2
- suggestion: GUI maker for easybashgui HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easybashgui.