-
Notifications
You must be signed in to change notification settings - Fork 2
dev_templateGuide
-
What gets passed (in order)
-
programName/programTitle,
-
flatpakName
-
flatpakRepo
-
Function task(s):
- support for Flatpaks is done inside
- (installed if needed)
- Flathub support is checked for and/or installed (since so many things come from there anyway)
- the Flatpak is installed
- support for Flatpaks is done inside
-
-
How to use/call function:
flatpak install $flatpakInfo $flatpakRepo
-
What gets passed
-
programName/programTitle,
-
snapName
-
snapType
- the snapType would be
--classic
or--beta
, for example
- the snapType would be
-
How to use/call function:
snap install $snapType $snapName
-
- Tarball, Zip, RPM, DEB, Appimages (NOT Github links)
- (TODO)
-
function description:
-
this third party meta function(s), handles
- .tar.gz|.tgz|.tar.bz2|.zip
- .deb|.rpm|
- .AppImage
-
function tasks
- Strips info based on the URL: stripFileInfo function called
- Downloads files with extensions (listed above): downloadFile function called
- Extracts/Installs:
- function passed to: handleDownloaded
- Zip and Tar Archives:
- Extract zip, and tar archives
-
RPM:
- Installs RPM (using zypper or dnf over "rpm -i" since the former handles dependencies better)
-
DEB:
- Installs DEBs via "gdebi"
- reasoning: I heard gdebi handles dependencies better than "dpkg -i"
- this checks if gdebi is installed,
- if not, gdebi gets installed
- Installs DEBs via "gdebi"
-
AppImage:
- Asks if a user wants to "+x" the AppImage, to mark it as executable
- Zip and Tar Archives:
- function passed to: handleDownloaded
-
-
Issue:
- At the moment due to issues getting the exact file name, Sourceforge linked files MAY have to be hardcoded ... even if i dont like that.
- Update: the unrollURL type function i nabbed from deb-get may address this
- I renamed this to unpackURL and it's in the f_thirdparty.cfg file
- Update: the unrollURL type function i nabbed from deb-get may address this
- At the moment due to issues getting the exact file name, Sourceforge linked files MAY have to be hardcoded ... even if i dont like that.
-
What gets passed:
- packageName
-
Function tasks:
- What AUR Helper to use?:
-
Pass to a function to check if trizen or yay is installed: AURHelperCheck
- if both are installed, the user is prompted for which one they rather use
- I have a archSettings.cfg file that has this assigned in it, at some point.
- I can not remember if the file + var is detected, if i still ask the user what they want to do OR just use that default AUR Helper. If i dont ask the user in this case, the user CAN change the default elsewhere
- if one or the other (trizen or yay) is installed, the right steps are taken using that AUR Helper
-
installYay and installTrizen functions
- to actually install yay or trizen AUR Helpers
- this DOES NOT install any apps via those two AUR Helpers
- to actually install yay or trizen AUR Helpers
-
- What AUR Helper to use?:
-
The example below is a general guide, for a software function
-
Not all sections have to be filled out but I listed them all here, so you could copy and paste.
function installProgramFoobar { programName=""` programTitle=""` programHomepage="" debURL="" rpmURL="" tarURL="" # Universal Apps snapName="" snapType="" flatpak="" appImageURL="" case $distroBase in arch) ;; fedora) ;; opensuse) ;; solus) ;; ubuntu) ;; esac }
-
-
Supported formats: tar.gz. tgz, tar.bz2, DEB, RPM, AppImage
-
This is the setup for adding a PPA function
function install(appname)PPA { PPATitle="" PPAName="" PPASource="" PPARef="" packageNames="" supportedBase="" }
-
PPATitle
- The General name of the app or program you are using the PPA for
-
PPAName
- (not sure this is needed) Name of PPA (more shorten then PPATitle, i think was my idea)
-
PPASource
- PPA Source
- format:
-
PPARef
- PPA "Homepage" of the PPA (I am thinking Launchpad mostly)
- a URL
-
packageNames
- package name or names that will be installed
-
supportedBase -ubuntu bases supported by said-PPA
function installSMPlayerPPA() {
PPATitle="SMPlayer"
PPAName="smplayer"
PPASource="ppa:rvm/smplayer"
PPARef="https://launchpad.net/~rvm/+archive/ubuntu/smplayer/"
packageNames="smplayer smplayer-themes smplayer-skins"
supportedBase="bionic focal jammy"
universalAddRepo ${PPATitle} ${PPASource} ${packageNames}
}
- supported base - the list of ubuntu bases the ppa supports
-
- separate by spaces only
- ??? - I think I should have a case/if statement around the install code ... maybe even a var to control that "$ppaInstallApp" or something ... if yes/true ... the app installs ... if not ... it returns to the menu
- apps listed in PPAPackages var
-
This info is a summary of what is above
-
Snap Installs,
- [Idea] Shouldn't i have the first argument as the programName (pushing the snap name to second, and snapType to third argument)
- First Argument is the snap name (EXACTLY)
- The Second Argument is the snap type
- examples
- classic - installs with
snap install --classic
- beta - installs with
snap install --beta
- classic - installs with
- examples
-
Flatpak Installs,
- $flatpakRepo (example "flathub" ... i think)
- $flatpakName - EXACT name of flatpak
-
Third Party (DEB, AppImage, Tarballs, ..etc)
- the first argument is programName/programTitle (I haven't decided yet)
- the second argument varies but it is the link to the file, to be downloaded
- update: I think "programURL" is that var, exactly
- pass to "metaExternalDownload" IF not a github link
- pass to "gitDownload" (which passes to metaExternalDownload, later) if the link is a github link
- "metaExternalDownload" needs a URL passed and that is what gitDownload gets, so that is the reason for this
-
- gitDownload function called
- What is needed to be known here
- programName
- repoName
- fileFormat to download
- nameFormat
- (in software function so no need to assign that here)
- this helps determine the correct file to download, when say the programName or fileFormat variables are not enough
- Script Menus
- Software Menu
- Xmetal's Bulk Tasks
- Dev Documentation
- Distros
- Cleanup Menu
- Software Menus