Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: coreplayer2 on December 29, 2014, 05:53:21 PM

Title: Firefox - Extension to install the latest version
Post by: coreplayer2 on December 29, 2014, 05:53:21 PM
First, this script was designed to download and package as a tcz extension the latest version of firefox for TC-5.x and TC-6.x, however it has become a little more than that.

This version will attempt to detect the current latest official firefox download, then package it up as a firefox-official extension and install it.
There are options to specify the exact version desired if this differs from the latest, or if this script is no longer able to detect the latest version.because of a change in the mozilla latest web page..??
Additionally, an option to manually edit the firefox download http or ftp address is provided should anyone have specific localization requests.

This script is an updater and an installer.  it does not require any previous install of firefox at all.
This version of the script supports

tc-5-x86
tc-5-x86_64
tc-6-x86
tc-6-x86_64

The newly created firefox-official extension is a direct replacement, therefore will upgrade a previously installed version if found
eg: firefox-official.tcz from both tc-5-x86 & tc-6-x86 repo's

Additionally is a direct replacement for
firefox.tcz from the tc-5-x86_64 repo, however this extension will not be automatically upgraded, there will be an option to uninstall it before the script exit's

With this script (soon to be extension) these previously mentioned firefox-official extensions will no longer be supported and are likely redundant.

In the case of
firefox.tcz from the tc-5-x86_64 and
firefox.tcz from both tc-5-x86 & tc-6-x86 repo's
there is provided a means of uninstalling these outdated firefox extensions if currently installed in the systems onboot.lst
this script will not uninstall any previously installed firefox extensions unless you opt-in to do so
The onus is on the user to uninstall older and possibly conflicting firefox extensions, but I've tried to do the next best thing in that regard.

The only drawback as far as I can see is the process will probably require a reasonably good connection and some free space in terms of memory and permanent storage. 

I'll be grateful for feedback and suggestions



A huge thank you to those who have been helping to test this script.
I should also thank aus9 who's original script inspired me

Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on December 29, 2014, 06:01:15 PM
To use:

download the script
set executable permissions
run the script until completion
uninstall old version as required
then reboot

:)
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: Misalf on December 29, 2014, 07:27:29 PM
Quote
The only drawback as far as I can see is the process will probably require a reasonably good connection [...]

I will test and report back as soon as my 3G connection limit kicks in (after downloading 5GB of data the speed is limited to 56Kbit/s). For now I know it works flawlessly at ~2Mbit/s. I'll go watching some youtube with firefox-official. (;
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on December 29, 2014, 08:00:48 PM
I'm guessing if you have no problems with a 3G connection then I think we're safe!!  concern debunked..   2Mbit/s is fast compared to data plans we used to have





Sent from my iPhone using Tapatalk
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on December 29, 2014, 08:05:57 PM
So how long did it take to download the Firefox tar file, 20 seconds?


Sent from my iPhone using Tapatalk
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: Misalf on December 29, 2014, 08:47:24 PM
~260 - ~310 Kilo Bytes per second it takes about 2 minutes 37 seconds. Just tested.

~8 Kilo Bytes per second, for a 40+ MB file will probably take like two hours. At least.. q:

Still downloading random stuff. (:
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on December 30, 2014, 12:33:51 AM
Yikes but that is in throttled me de?


Sent from my iPad using Tapatalk HD
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: Misalf on December 30, 2014, 02:37:08 PM
2h would be throttled mode, yes. I'm living in the stone age of the internet from time to time. ):
However, my ISP is either too lazy or doesn't care to check my bandwidth consumption or it really likes me because the bandwidth limit don't want to kick in this month for some reason. It usually does. Yay! (:

Anyway, I'm using a quite simple wget script to make sure a troublesome download will not totally fail:
Some stuff might look familiar.. (:
Code: [Select]
#!/bin/sh
## Author: Misalf
## v 0.1
## Jun-6-2014

echo -e "\033]0;Wget...\007"

#. /etc/init.d/tc-functions
#useBusybox

trap 'echo -e "\033]0;$\007" ; line="=" ; f_line ; trap 2 ; kill -2 $$' 1 2 3 13 15

##******************************************************************************************************************
##***************************************************Functions******************************************************
## coreplayer2

## Draws a line at full screen-width  ( use xy=(line#) for row position ;   linecolor=([0]-[7]) linebold=([0]-[7]) ;  line=([char]) )
f_line() {
wide=`stty size | cut -d" " -f2`
#printf "\033[3;0H"
echo -ne "\033[0${linebold};3${linecolor}m "
printf '%*s\n' "$(( wide-2 ))" '' | tr ' ' $line
printf "\033[00m"
}

## Check Connection / URL
f_chkconn () {
echo -ne "\033[00;35m Using\033[01;30m: \033[00;32m${WGET} \033[01;30m::"
echo -e "\033[00;35m URL\033[01;30m: \033[00;36m${URL}"

line="-"
f_line

echo -ne "\033[00;36m Testing connection to server\033[01;30m... \033[00m"
${WGET} -s -T 20 "${URL}" 2>/dev/null &
rotdash $!
case $? in
0) echo -e "\033[00;32mOK \033[00m"; cx=0;;
1) echo -e "\033[00;31mFail\033[00;33m!\033[00m"; cx=1; f_line; exit 1;;
esac
}
##******************************************************************************************************************
##******************************************************************************************************************

f_resolve_url() {
url=$1
domain=`echo $url | sed 's-^[^/]*/*\([^/]*\)/\?.*$-\1-'`
ipaddr=`ping -c 1 $domain | sed -n 's@^.*(\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*$@\1@p' | head -1`
req_url=`echo $url | sed "s-/[^/]\+-/$ipaddr-"`
wget $req_url
}

##******************************************************************************************************************

#WGET="$(which wget)"
WGET="$(which busybox) wget"

if [ -z "$1" ]; then
echo -e "\033[00;31m No download specified\033[01;30m."
echo -e "\033[00;33m Exiting\033[01;30m..."
sleep 3
exit 1
else
if [ -z "$2" ]; then
DIR="."
URL="$1"
else
DIR="$1"
if [ ! -d "${DIR}" ]; then
echo -e "\033[00;31m Directory does not exist\033[01;30m:"
echo -e "\033[01;34m ${DIR}/"
echo -e "\033[00;33m Exiting\033[01;30m..."
sleep 3
exit 1
fi
URL="$2"
fi
fi

linebold=1
linecolor=0
line="="
f_line

f_chkconn

echo -e "\033[00;35m Downloading to\033[01;30m:"
echo -e "\033[00;34m ${DIR}/\033[00;33m${URL##*/}"
line="-"
f_line

if [ -f ${DIR}/${URL##*/} ]; then
echo -e "\033[00;35m Continuing download\033[01;30m..."
else
echo -e "\033[00;35m Starting download\033[01;30m..."
fi

##******************************************************************************************************************

echo -ne "\033]0;Wget: ${URL##*/}\007"

RETRYNUM=0
while true; do
RETRYNUM=$((RETRYNUM+1))
###xterm -title "Wget: ${URL}" -e $(which busybox) wget -P ${DIR} -c ${URL}
echo -ne "\033[00;32m"
#${WGET} -P ${DIR} -c ${URL} && (echo -e "\n\033[00;33m DONE.") ; break || (echo -e "\033[00;31mERROR\033[01;30m = \033[00;33m$?\n\n\033[00;35mRetrying...\033[00m" ; sleep 2)
${WGET} -P ${DIR} -c ${URL}
EL=$?
case $EL in
0)
echo -e "\n\033[00;33m DONE. Press any key to exit."
line="="
f_line
break
;;
*)
echo -e "\033[00;31m ERROR\033[01;30m = \033[00;33m${EL}"
linebold=0
linecolor=1
line="-"
f_line
linebold=1
linecolor=0
echo -ne "\033[00;35m Waiting 5 seconds\033[01;30m... \033[00;33m"
sleep 5 &
rotdash $!
echo -e "\033[00;35mRetrying\033[01;30m (\033[00;35m#${RETRYNUM}\033[01;30m)\033[00m"
;;
esac
done

read junk

echo -e "\033[00m"

Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on January 05, 2015, 04:31:05 PM
For now I know it works flawlessly at ~2Mbit/s. I'll go watching some youtube with firefox-official. (;

I take that as the script is working as intended..  :)

ok extension submitted ( named it  "firefox-latest.tcz" )
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on January 07, 2015, 06:36:42 PM
I just noticed that Firefox v35.0 is soon to be released..    Unfortunately the download links and release page hasn't been updated yet..

The update script probably will not auto detect an update until 35.0.1 or higher is released :(


Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on January 17, 2015, 11:24:06 PM
**Update**

Get Latest Firefox script now updated to support cloud mode install (issue found and fixed while testing on TinyCorePure64.ISO/CD boot )
and fixed Firefox major version update detection
eg: firefox v34.0.05 to v35.0 now properly detected.

new script attached and updated extension submitted

Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on January 26, 2015, 09:48:32 PM
firefox-latest.tcz (extension) installs (or updates firefox-official to) latest version 35.0.1
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on April 02, 2015, 12:37:39 AM
firefox-latest.tcz (extension) creates a new firefox-official extension (or updates a previously installed firefox-official.tcz) to latest version 37.0

in the following versions and architectures
tc-5-x86
tc-5-x86_64
tc-6-x86
tc-6-x86_64

Code: [Select]
Repo in use: http://repo.tinycorelinux.net/6.x/x86/tcz
 TCE directory in use: /mnt/sda2/tc6-x86/optional
 Warning! sda2 has only 10% free space remaining 
===============================================================================

 Fetching dependencies..
 Verifying connection to server, please wait...
 connection ok
squashfs-tools is already downloaded.
/etc/sysconfig/tcedir/optional/squashfs-tools.tcz: OK
wget is already downloaded.
wget.tcz: OK
bzip2 is already downloaded.
bzip2-lib.tcz: OK
bzip2.tcz: OK
file is already downloaded.
file is already installed!
gtk2 is already downloaded.
gtk2 is already installed!
libasound is already downloaded.
libasound is already installed!
dbus-glib is already downloaded.
dbus-glib is already installed!
hicolor-icon-theme is already downloaded.
hicolor-icon-theme is already installed!
cairo is already downloaded.
cairo is already installed!
gamin is already downloaded.
gamin is already installed!

 Acquiring latest version..
 You may choose from the selection at any time, however
   (1) The Latest version 37.0 is
       automatically processed after (30sec) timeout.
 
 Alternatively, choose a download option as desired
   (2) Specify firefox version, or
   (3) Edit download path directly,
       eg. for localization, version..

Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on April 03, 2015, 10:46:20 PM
Within a couple of days since Firefox version 37.0 release, there is yet another update..  version 37.0.1  is available

At least is a few Mb smaller


use firefox-latest.tcz to get it (install new or update current version)
or use update script from http://forum.tinycorelinux.net/index.php/topic,17942.msg108498.html#msg108498 (http://forum.tinycorelinux.net/index.php/topic,17942.msg108498.html#msg108498)
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on April 23, 2015, 05:23:10 PM
Firefox v37.0.2 is available

Use firefox-latest.tcz extension to fetch and create the latest firefox-official.tcz,
simply reboot to install.

Consider deleting the 'firefox-official.tcz.md5.txt' file to prevent Apps > Update from downgrading to an older version when you next run Apps > Update

Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on May 17, 2015, 11:52:18 AM
Firefox v38.0.1 is available

Finally a version where flash v11.x works effortlessly

Use firefox-latest.tcz extension to fetch and create the latest firefox-official.tcz,
simply reboot to install.

Consider deleting the 'firefox-official.tcz.md5.txt' file to prevent Apps > Update from downgrading to an older version when you next run Apps > Update
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: Misalf on May 17, 2015, 12:36:43 PM
Great!
Effortlessly for the update script or for Firefox itself?
If the latter, what effort was needed before?
I use the getFlash11 extension regularly to update Flash and it just-works in my personal custom Firefox extension.
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on May 17, 2015, 01:00:05 PM
the latter,   it seem there was always some occasional minor glitch which required a restart to make flash work...   I'm pleased to find in v38.0.1 no such glitches :)


The update extension is working great also


However I've not tested yet the phenomena where Flash fails to load when there is no sound module loaded, this is not a firefox issue though..
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on September 29, 2015, 07:46:21 PM
Update!!

With the help of many testers, thanks guys for your valuable feedback.   We have been updating this extension in stages.

Stage 1,   (completed)
Updates the architecture detection to automatically create Firefox for
i)   x86 (tc-32bit),
ii)  x64 (tc-32bit user-space apps on x86_64 kernel) and
iii) corepure64 (pure x86_64) configurations.

Stage 2,   (completed)
Updated to provide Firefox with locale support (complete language support as provided by Mozilla).
Detection of local language support is based on the "lang=xxxx" bootcode which modifies the download script resulting in creation of a locale specific, latest Firefox extension

Stage 3,   (in progress)
Support for .mar incremental upgrades for folks who are bandwidth challenged (if I can get this to work as advertised).


Other fixes
1. detection of free-space remaining,   (completed)
Which now reports free space in MB's available (instead of %).  This feature also limits firefox download and extension creation with less than 200MB remaining.  (fixed)

2. timeout menu's,   (in progress)
Will try to replace time-out menus with command line arguments.  the idea behind this is to assist in efficient uninterrupted extension build without missing the menu objective.

3, Name changes,    (in progress)
With the current forum discussion of older unsafe Firefox versions in repo's, perhaps it's time to revisit a name change for the created firefox extension.

a, I'm thinking simply firefox.tcz (replacing firefox-official.tcz). 

b, Perhaps also take the opportunity to submit and maintain the current firefox-ESR to the repo, this being the latest Extended Support Release.  long lasting secure revision for the repo, with less frequent updates is easier to maintain..?

c, Also maybe appropriate to change the name of this extension with an appropriate description.
I'm thinking "firefox-getLatest.tcz"  in keeping with the creation of a latest extension as opposed to firefox-latest.tcz which implies is the latest version..?

4, some minor cleanup..



thoughts..??


I've attached here the current script which incorporates the above completed changes, extension will be updated soon.
Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 06, 2015, 04:20:57 PM
Progress Update!!

New firefox-getLatest.tcz  (submitted for all x86 and x86_64 repos) which
creates a new firefox.tcz (extension) with locale support, more details below.

Updates to architecture detection for creation of firefox.tcz for  (completed)
i)   core x86 (tc-32bit),
ii)  core64 x64 (tc-32bit user-space apps on x86_64 kernel) and
iii) corepure64 (pure x86_64) configurations.


Locale support  (completed)
locale support for Firefox; complete language support as provided by Mozilla.     
Detection of local language support is based on the "lang=xxxx" bootcode which modifies the
download script resulting in creation of a locale specific, latest Firefox extension


Support for .mar incremental upgrades for folks who are bandwidth challenged (if I can get this to work as advertised).
 (in progress)


Other fixes 
1. detection of free-space remaining,  (completed)
Which now reports free space in MB's available (instead of %).  This feature also limits Firefox download and extension creation with less than 200MB remaining.


2. timeout menu's, (completed)
Replace time-out menus with command line arguments.  the idea behind this is to assist in uninterrupted extension build process


3, Name changes,   (completed)
With the current forum discussion of older unsafe Firefox versions in repo's, perhaps it's also time to revisit a name change for the created firefox extension.

a, Now simply firefox.tcz (replacing firefox-official.tcz).  (completed)

c, Also changed the name of this extension with an appropriate description.
"firefox-getLatest.tcz"  in keeping with the creation of a latest extension as opposed to firefox-latest.tcz which implies is the latest version  (completed)

d, changed permissions of created extension in keeping with tc guidelines

4, some minor cleanup..


Note: the new firefox-getLatest.tcz  replaces
the depreciated firefox-latest.tcz currently in repo
Additionally the newly created Firefox.tcz extension
replaces the depreciated local firefox-official.tcz extension

Title: Re: Topic: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 06, 2015, 04:54:24 PM
I've attached the latest script used in the new firefox-getlatest.tcz (extension) here
Title: Re: Firefox - Extension to install the latest version
Post by: Lee on October 07, 2015, 11:40:50 AM
Quote
I've attached the latest script used in the new firefox-getlatest.tcz (extension) here
* firefox-getLatest.sh (14.3 kB - downloaded 3 times.)

I tried out this script under Core 4.7.7 / x86 and it worked except for one instance where the target of wget didn't explicitly start with either "http://" nor "ftp://".  Once I changed

Code: [Select]
wget -q $latestVER
to

Code: [Select]
wget -q http://$latestVER
it ran and produced the extension as expected.

Very nice!

It is, however, an  annoyance that the script goes so far as to add the new extension to onboot.lst.

(FWIW, its also annoys me that tce-load -wi adds things to onboot.lst.  Making an extension load onboot should be available but should be an "opt-in" choice, not an "opt-out" choice.)
Title: Re: Firefox - Extension to install the latest version
Post by: gerald_clark on October 07, 2015, 02:46:12 PM
Then don't do tce-load -iw.  Instead do
tce-load -w
tce-load -i
Title: Re: Firefox - Extension to install the latest version
Post by: yiyus on October 07, 2015, 04:00:47 PM
To be honest, the options are quite confusing.

When you want a new package, you can use -wi if you want to add it to onboot, -wo if you want to add it to ondemand, or -wil if you just want to install it for this session. If you only want to download it, you can use -w. Then, later you can install with -i, but the result you get is not like running -wi, it is like running -wil.

I find this not only counter intuitive, but also inconvenient, because I usually just want to try the package (so I use -wil) and decide later if I want to load it on boot, but I have to edit the onboot file for that, tce-load knows how to do it  but it does not handle this case.

Wouldn't it be more natural to have a flag to download, a flag to install, and a flag to add to onboot or ondemmand and combine these flags? I guess it would be hard to find the right moment to make a change like this, but I hope it eventually gets fixed.

(Sorry for the off-topic. The firefox extension looks good, but it has not hit the repos near to me yet).
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 07, 2015, 10:10:49 PM
I tried out this script under Core 4.7.7 / x86 and it worked except for one instance where the target of wget didn't explicitly start with either "http://" nor "ftp://".  Once I changed
Code: [Select]
wget -q $latestVERto
Code: [Select]
wget -q http://$latestVERit ran and produced the extension as expected.

Very nice!


Lee, I'm a little baffled by this because the address to download the web page with current release information always begins ftp.

The base address defined earlier in the script is always this, which includes ftp.
Code: [Select]
latestVER="ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/en-US"
this address variable is then modified during the architecture check and then again during a locale check
Code: [Select]
latestVER=${latestVER/linux-i686/linux-x86_64}parameter substitution replaces arch (and locale). therefore (assuming en_US locale, the result can only be either
ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/en-US , or
ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US



Interestingly this is not related to the Firefox archive download and placing http in front an ftp address should have failed to determine the current release version. 
so I think there is possibility the script failed because of some other reason,  perhaps during one of the intentional connection checks.  Then when you tried again the connection quality had improved.. 

Please try again after removing the http://  prefix, I'm anxious to hear the result

:)

Title: Re: Firefox - Extension to install the latest version
Post by: curaga on October 08, 2015, 12:38:30 AM
@coreplayer2, older busybox wget always required http:// or ftp:// in urls. I submitted a patch for that some time ago, where it adds http:// if no protocol prefix exists. 4.x must be before that.
Title: Re: Firefox - Extension to install the latest version
Post by: yiyus on October 08, 2015, 02:23:27 AM
Quote
It is, however, an  annoyance that the script goes so far as to add the new extension to onboot.lst.

After a second thought, I think there is an easy fix for this. Just change line 550 to:

Code: [Select]
grep -q firefox-getLatest.tcz ${tce_dir}/$bootlist && grep -q firefox.tcz ${tce_dir}/$bootlist || echo "firefox.tcz" >> ${tce_dir}/$bootlist

(or maybe it would be even better to do a s/firefox-getLatest.tcz/firefoz.tcz/ substitution)

Then, firefox.tcz will be added to the onboot list only if firefox-getLatest was in that list, which I think is more polite than always adding firefox.tcz.
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 08, 2015, 06:52:17 AM
@curaga    ok I hear you now..    We need to test for wget version ?? 



@lee   sorry I misunderstood  (I think)


Will look at a resolution to this asap
Title: Re: Firefox - Extension to install the latest version
Post by: curaga on October 08, 2015, 01:03:01 PM
No need to test if you always include the protocol.
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 11, 2015, 09:13:04 AM
I tried out this script under Core 4.7.7 / x86 and it worked except for one instance where the target of wget didn't explicitly start with either "http://" nor "ftp://".  Once I changed

Code: [Select]
wget -q $latestVER
to

Code: [Select]
wget -q http://$latestVER
it ran and produced the extension as expected.

Very nice!

OK Lee, I understand the problem now.  I  assume the one instance where it failed was on tc-4.x ? which the script has not been tested on otherwise I would have probably caught the issue.  has been tested on tc-5.x and tc-6.x only, in any case busybox version of wget is forced.   I was wrong with the protocol prefix so have added http:// to latestVER="ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/en-US" 
I'll have to look for an old tc-4.x to test on.  Thanks for pointing this out.

code now reads
Code: [Select]
latestVER="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-i686/en-US"
this also gave me another idea  (more later..)

Quote
It is, however, an  annoyance that the script goes so far as to add the new extension to onboot.lst.
Isn't this the default action of APPS?   
I'm thinking that anyone wanting to download or update a commonly used application would want the browser available each time they boot.. am I wrong in that assumption..??
If I'm wrong with that assumption, then the philosophy behind Apps is also wrong..?
I don't honestly know where to go with this..  I think the consensus would be to have a commonly used application available on every boot.

It's an easy fix but my fear is it would confuse many folks

Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 11, 2015, 10:18:02 AM
I forgot to include a screenshot, getting the latest Firefox...

(https://db.tt/C9pNXZ5K)
Title: Re: Firefox - Extension to install the latest version
Post by: nitram on October 11, 2015, 12:03:09 PM
Both arguments have merit.

// Isn't this the default action of APPS?
Apps defaults to 'OnBoot' but patiently waits for user to press 'Go', providing option to toggle Onboot/OnDemand before install. User also has option via CLI, tce-load -wi vs tce-load -wo.

// I'm thinking that anyone wanting to download or update a commonly used application would want the browser available each time they boot.. am I wrong in that assumption..??
It's also the heaviest application many users have in /optional, so i could see how some would prefer an OnDemand option. Personally, firefox.tcz resides in OnDemand as i want quick boots to compile/test extensions, often use a lighter browser, don't use Firefox every session.

// It's an easy fix but my fear is it would confuse many folks
Maybe clarify. Don't understand how an OnBoot/OnDemand option would be confusing. That's how TC works, user has full control over the install process. In situations like Lee and myself, user wouldn't need to clean up onboot.lst after install.

Just providing feedback, it's your script so you can write how you want :)
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 11, 2015, 02:09:53 PM
Thank you nitram for your interesting view on this subject, here is my view

I'm convinced that majority of new tc users are not entirely familiar with onboot or ondemand usage and simply expect a downloaded application to be installed and loaded on every boot.  similarly most new users are confused when recent changes to their system are not replicated on each and every reboot, clearly this is evident when they haven't grasped the application of persistence.
In my experience and I'm referring back when I was new to TC, I wanted every app downloaded to be installed on every boot up.  If there wasn't a need for an application on every bootup I simply wouldn't download it, or would remove it.  But I'm wiser now and at least know I can choose to download to my local extension store or have it available each reboot or ondemand.

Experienced users like yourself will undoubtedly know the benefits of onboot or ondemand and would setup their boot lists accordingly to taste or system ability.
For example I setup my ondemand and onboot items based on frequently used applications;  my main GoTo applications in onboot and less frequently used applications in ondemand; like this
Code: [Select]
onboot
firefox.tcz

ondemand
firefox-getLatest.tcz
 

Quote
Apps defaults to 'OnBoot' but patiently waits for user to press 'Go', providing option to toggle Onboot/OnDemand before install
or other choices which are unclear to the new user.  when presented with choices they don't yet fully understand new users will always accept the default as being the best choice based on experienced users who developed the menu.   It's hard to see a toggle choice as an argument in opposition of onboot, when onboot is still the preferred default.

Quote
Maybe clarify. Don't understand how an OnBoot/OnDemand option would be confusing
Quote
It's an easy fix but my fear is it would confuse many folks
I remember when new to TC and being confused, if I had downloaded an app to the tcz store and it did not load on the next or successive reboots was my reference..   In those scenarios I came to use "Apps > Load app locally"  way too frequently..   

Quote
User also has option via CLI, tce-load -wi vs tce-load -wo.
How many new tc users are even aware an tce-load cli option exists...??  experienced users have the choice to change / load anyway they want to. 

I could be wrong but I think anyone connected to the internet will want a browser on every boot as their GoTo app (eg firefox not only browses the web but has builtin support to read text files, image files and pdf files and likely more that I haven't discovered yet..).  If anyone has gone to the effort of installing one regardless of which brand, it's most likely their most important app for everything they do on a day to day basis.  so why not have it available on every boot?
You might say that installing via Apps you have the choice??  well I would argue only experienced users know that choice exists, for everybody else (ie the vast majority) the default is onboot.

As an updater to an existing installation; firefox-getLatest could easily be configured to load onboot if an onboot entry existed (actually wouldn't need to do much since the solution already exists).
As an initial installer; firefox-getLatest could easily be configured to download then load on a one-time basis,  leaving it to the user to figure out they have to add firefox to the onboot list to have it appear on a reboot.  (maybe that view is biased but shows exactly what I'm trying to avoid..??)

New users simply want things to work without delving into the mechanics of the system, while experienced users can choose to change the way their system operates as they wish, as usual.

I'm a believer of the "What's right, not who's right concept"  so what's the right thing to do here to respect new users and  experienced users alike..?

perhaps a Poll??
Title: Re: Firefox - Extension to install the latest version
Post by: yiyus on October 11, 2015, 05:37:05 PM
I have proposed a similar solution before, but I messed up with the formatting so you may have missed it.

You could grep for firefox-getLatest in onboot and ondemand and add the generated extension only to the lists in which getLatest is found. Then, new users will get firefox by default just pressing Ok and it will not get too much in the way of more advanced users.

I can send you a patch if you want.

For an installer extension I am working on (for plan9port), what I am doing is to try to load the generated extension when the installer is loaded and generate it if not present, so that the user just have to install the installer however he wants and it will work as expected.
Title: Re: Firefox - Extension to install the latest version
Post by: nitram on October 11, 2015, 07:16:34 PM
// Thank you nitram for your interesting view...
Get that a lot :)

//I'm convinced that majority of new tc users are not entirely familiar with onboot or ondemand usage and simply expect a downloaded application to be installed and loaded on every boot.
If you're convinced then good enough, just keep as is.

My view is different:
  - New users will not likely use your script and will simply install firefox-ESR via Apps
  - By the time they use your script, the user will understand the difference between OnBoot and OnDemand
  - You're only a new user once for a brief period of time, the script will be used regularly (Firefox release cycle) and they might appreciate the option

//...most new users are confused when recent changes to their system are not replicated on each and every reboot, clearly this is evident when they haven't grasped the application of persistence.
OnBoot, OnDemand and persistence are clearly documented (eg wiki, Core book).
It's not your fault if users don't read documentation.
The script could be adjusted to read something like:
    Which version? enter_version_#
    Install (1) OnBoot or (2) OnDemand, inexpereienced users please enter 1 (OnBoot): enter_1_or_2

//How many new tc users are even aware an tce-load cli option exists...??
As above, it's clearly documented.
Apps browser 'OnBoot' is clearly a choicebox dropdown.

// I'm a believer of the "What's right, not who's right concept"  so what's the right thing to do here to respect new users and  experienced users alike..?
Give users a choice, everyone will benefit.
If the OnBoot 'default' is clearly described and OnDemand is an option, why not?

// perhaps a Poll??
  - Might not be fair, new users won't likely vote
  - Can't see why experienced users wouldn't appreciate the option
  - Don't believe this forum supports polls

Stimulating chat. As before, it's your script so however you think is best is the way to go. I appreciate it takes a lot of work to make even minor changes to a script in regards to coding, testing and distributing. Maybe just a non-committed 'to do' review for later?
Title: Re: Firefox - Extension to install the latest version
Post by: Lee on October 13, 2015, 07:16:04 PM
Sorry - I was out of touch for couple of days.  Took me all day to read up on the the thread and write (I was trying to do it between tasks at work)...

coreplayer2 said:
Quote
I  assume the one instance where it failed was on tc-4.x ?

Yes - I was only testing on 4.7.7.

Quote
Isn't this the default action of APPS?
Yes, but that doesn't make it right.  :)

Quote
I'm thinking that anyone wanting to download or update a commonly used application would want the browser available each time they boot.
I was thinking that since it is getting "the latest version" of firefox that it would be more commonly used by people just wanting to try out the new version without committing to it as their primary browser.

Quote
am I wrong in that assumption..??
I do regularly find myself on the minority side in matters of opinion.

Quote
If I'm wrong with that assumption, then the philosophy behind Apps is also wrong..?
Yeah - just in the choice of the default value of the button.  I would have made it default to "download and load" instead of "onboot".  I didn't mean to make waves.  I'm certainly capable of editing a file like onboot.lst by hand and I regularly do so - I guess that's why  I'm touchy about things changing it as their default action.

----

Nitram said:
Quote
Just providing feedback, it's your script so you can write how you want :)

Exactly.  I thank you for the effort you have put into this.  I was just sort of hoping the majority of users felt like I do and it was only a matter of nobody bothering to mention it.

----

Coreplayer2 said:
Quote
similarly most new users are confused when recent changes to their system are not replicated on each and every reboot, clearly this is evident when they haven't grasped the application of persistence.

Yeah, I think I remember seeing that come up in the forums once or twice.   ;)

More seriously though, if they aren't going to learn about tce-load, Apps and/or persistence, I can't imagine why they're using Core in the first place.  (Every one beat me up for that - I probably deserve it.)

----

nitram said
Quote
// Thank you nitram for your interesting view...
Get that a lot :)

I usually don't ever type "LOL", but this time I really did.  I get that, too.

Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 13, 2015, 08:17:08 PM
Thanks for everyone's feedback.   I have revisited the firefox-getLatest extension and have modified it's script to address these concerns.   This took quite a while because the options provided so many conditions and of course all needed to be tested...

1. I mistakenly saw ftp. as a shortcut for the protocol in the test for latest version address, it wasn't...   so have fixed this for users of busybox wget in tc-4.x   (I tested only in TC5.x & TC6.x)
2. I have changed the install logic so that firefox.tcz is only added to the current onboot.lst if a previous version (ie: firefox-official or firefox-ESR) was already installed in that onboot.lst (supporting personal onboot.lst's)
3. If updating an older version of firefox.tcz there will be no change in onboot or ondemand status, all updates are handled via TC extension upgrade procedure occurring the next reboot.
4. If firefox.tcz in not discovered in an onboot.lst then users will be advised (reminded of this fact) before the script prompts to quit.
5. Old or depreciated Firefox extensions (ie: firefox-official.tcz firefox-ESR.tcz) will be scheduled for removal via the usual tce-audit during a subsequent reboot.
6. Any condition which require users to be advised (ie: uninstalling old Firefox versions, or advised to reboot to complete upgrade, etc. etc..)  then the script prompts the user to exit allowing time to read any notes before quitting.
 
I think we got this covered :)
Title: Re: Firefox - Extension to install the latest version
Post by: nitram on October 13, 2015, 09:51:27 PM
Thanks for your hard work coreplayer2. Received your message and will test drive later tonight. On behalf of all TC users who would prefer the OnDemand option - thank-you :)
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 23, 2015, 03:15:24 PM
Oct 23rd 2015 Update..

I've updated the firefox-getLatest extension to help acquire latest available firefox version, to accommodate Mozilla's recently updated directory structure and web site previously used to obtain the latest release.

Also added some other minor improvements, for example a better "firefox-getLatest.sh -h" menu description of how to obtain beta versions.  Also improved connection tests, since the repo had a temporary issue this week

Attached is the updated script from the extension update submitted today


Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on October 31, 2015, 06:33:25 PM
OK, to avoid conflicts with future Lang variations I made a minor change to the script.  Unfortunately this didn't work out so well for our German friends

So I'll modify the extension to reflect the current language directory status for de users and others, meanwhile I've attached a temporary modified script for those requiring DE language version.

 
Title: Re: Firefox - Extension to install the latest version
Post by: Misalf on November 01, 2015, 01:16:56 AM
Sorry if I drop my two cents here without actually knowing what the problem is about LANG=de (and variants) - I'm not asking; I trust you coreplayer2. However, I'm hoping that  kmaps  will be left out of the equation? As I'm using German keyboard layout but English language (default LANG=C).
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on November 01, 2015, 07:02:27 AM
Quote
I'm hoping that  kmaps will be left out of the equation?
Yes, the script uses only the $LANG variable

Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on November 04, 2015, 06:22:00 PM
Firefox Update v42.0

latest script (attached below) has been updated to fix the change in Mozilla's latest directory structure
extension update will be submitted tomorrow

In this grabber screenshot Firefox v42.0 in German language is being downloaded and packaged for tinycore
(https://db.tt/2kKdkvAt)

Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on November 15, 2015, 07:02:28 PM
Hello Firefox fans

Updated extension firefox-getLatest.tcz now posted to repo

Use the above extension to get the latest Firefox v42.0
Title: Re: Firefox - Extension to install the latest version
Post by: raj on November 20, 2015, 06:50:23 AM
Hi coreplayer2,

>> Updated extension firefox-getLatest.tcz now posted to repo
Neither firefox-getLatest.tcz nor firefox-getLatest.sh work anymore.  I managed to get it working last week but on new Tiny Core 6.4.1 is doesn't work!  I suspect Mozilla have changed their web-site location.

Thanks in advance for help.

Best regards,
raj

Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on November 20, 2015, 12:45:00 PM
Since Mozilla can't be consistent from one week to the next I have come up with a new plan to prevent the wget from spitting out errors but it will be next week before I can implement the change

So meanwhile Firefox-ESR is available for those who need a current Firefox browser


Sent from my iPhone using Tapatalk
Title: Re: Firefox - Extension to install the latest version
Post by: raj on November 20, 2015, 03:14:50 PM
Thank you coreplayer2,

Look forward to the new solution  :)
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on November 22, 2015, 01:05:38 PM
Many minor changes this week, mostly due to Mozilla's restructuring of their servers again.   Seems to be a weekly occurrence so this time I've incorporated a fallback method to overcome these frequent directory changes.  The script will use the fallback method if the version checker fails to find the latest version.


Also restored the manual selection method to full functionality.
remember to use this feature use the "firefox-getLatest.sh -m" command.

extension submitted, but as always pm me if you would like to get the tcz asap

Maybe I can get to adding some useful features now instead of chasing my tail..
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on November 22, 2015, 02:20:52 PM
I feel we're making great progress,  this update brings additional Firefox_"Private" and "Safe-mode" browsing desktop menu items

Desktop menu items
    firefox
        Firefox
        Firefox_private
        Firefox_safe-mode

(https://db.tt/iUmCifqm)

Thanks Misalf for the contribution
:)



Title: Re: Firefox - Extension to install the latest version
Post by: raj on November 23, 2015, 01:04:37 PM
Thank you coreplayer2 for swiftly updating the script. Much appreciated.
Title: Re: Firefox - Extension to install the latest version
Post by: grandadruss on November 24, 2015, 04:56:15 PM
Downloaded script above (17.13kb) - had to search and replace 34.0.5 with 42.0 to get it to work. No joy with -m 42.0
Just in case this helps someone.
All up-to-date now with extra menu items, thanks to all!  :)
Title: Firefox - Extension to install the latest version
Post by: coreplayer2 on November 24, 2015, 07:20:06 PM
you shouldn't have to change anything.  We've been testing the script for the last few days without any issue getting the correct version.   Unless there's been a change at Mozilla within the last 30mins otherwise Ivan explain what happened in your scenario
A screenshot or terminal output would really help with troubleshooting please

If manually entering the version the command is

./firefox-getLatest.sh -m

Then at the prompt type 42.0 enter

Usually this is a backup method, or installing a previous version.

Sent from my iPhone using Tapatalk
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on November 24, 2015, 09:49:36 PM
During recent firefox-getLatest testing, we discovered an issue with FLWM and FLWM_Topside Window Managers.   It appears the new desktop menu feature providing Firefox "Private viewing" and "Safe-Mode" has brought to the forefront an WM incompatibility when two similar extension names are loaded via the onboot.lst, for example "firefox" and "firefox-getLatest" and at least one of the extensions has desktop sub-menu items.  We've discovered the issue is present in all versions of FLWM topside or standard from either tc-5.x or tc-6.x (x86 & x86_64).   Whereas Hackedbox is unaffected.  Openbox is not directly effected by this issue but has another problem mentioned below.
The result of this anomaly occurs when the WM loads at boot, it appears the menu building function can not differentiate between extension names with either Capital letters or Hyphens, resulting in corrupted sub menus. 

Meanwhile, an underscore is recognized by FLWM and when our firefox-getLatest extension is rebuild as firefox_getLatest the desktop menus are build uncorrupted.  So....

Because of this issue I have decided to rename firefox-getLatest.tcz to firefox_getLatest.tcz on all future update submissions to the repo.   Unfortunate as this is it's the easiest resolution to the dilemma.



Note; Openbox require the use of 2x underscores or Hyphens in a menu item name to be recognized and written as one. Not ideal but not as sever as the resulting corruption when building sub-menus in FLWM with Hyphens

Attached for your pleasure is the updated script reflecting this name change,  this will appear in the repo's soon
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on December 15, 2015, 06:40:44 PM
I've been waiting almost a month for Mozilla to update Firefox again, needed to verify firefox_getLatest extension will perform as expected, I'm happy to say it does :)  Though I was hoping for a minor version update before going straight to v43.0, will try to stay ahead of that..


Run firefox_getLatest from the desktop menu (note: Sorry, had to change the extension name again, a result of an issue with flwm.
So make sure you've downloaded the latest version from the repo).

Anyhow,  Firefox version 43.0 is out and is available for x86, x86_64 in all supported languages as required
(https://db.tt/ALkVH8vp)
...
(https://db.tt/hT1qc060)


Anyone needing a different/specific version can always use firefox_getLatest.sh -m from the terminal to fetch their desired version,
see here for more:  firefox_getLatest.sh -h
(https://db.tt/UHQ1elAP)


If interested, this is the current mechanism for detecting Firefox  current/latest version, which appears to be working quite well.
Code: [Select]
addressX='https://download.mozilla.org/?product=firefox-latest&os=linux&lang=en-US'
curl -s $addressX 2>/dev/null | grep -o '[[:digit:]]*\.[[:digit:]]' 2>/dev/null | sort -u | tail -1 >/tmp/ffversion
curl -s $addressX 2>/dev/null | grep -o '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]' 2>/dev/null | sort -u | tail -1 >>/tmp/ffversion
VER=$(cat /tmp/ffversion | sort -u | tail -1)



Latest script is attached in case of difficulty getting the correct extension
Title: Re: Firefox - Extension to install the latest version
Post by: Misalf on December 17, 2015, 01:58:56 PM
Seems Firefox version 43 crashes on YouTube.com when playing a video and  ffmpeg.tcz  is not loaded.
Also, if  ffmpeg.tcz  is loaded, Firefox falls back to Flash even though I set YT to use HTML5.
Title: Re: Firefox - Extension to install the latest version
Post by: Misalf on December 17, 2015, 03:13:25 PM
Hmm, no. Settings that were suggested in order to enable HTML5 video actually prevented Firefox from working correctly.
So at  about:config  I set these settings back to default:
media.fragmented-mp4.*
media.mediasource.*
That fixed the crash and HTML5 video works again.
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on December 18, 2015, 09:27:20 PM
Interesting....   so all is well on the Firefox HTML5 and YouTube front  :)
I wish I could say the same for the new signing of add-on's in v43+, but add-ons will catch up eventually..

Meanwhile I didn't have to wait long to test minor updates with the latest script because Firefox v43.0.1 is out and the mechanism works well

No one should experience any difficulties getting the very latest firefox,  enjoy

Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on January 09, 2016, 05:42:06 PM
Attached "firefox_getLatest.sh" script has been updated to v2.1

with improvements to
I)  detection of older squashfs-tools for compatibility with tc-4.x & tc-5  (x86 versions)
2) detection of architecture

Has been tested on tc-5, tc-6, tc-7 with all possible architectures

Will submit the updated extension asap
thanks for your patience
Title: Re: Firefox - Extension to install the latest version
Post by: tp4web on March 18, 2016, 09:09:41 AM
Hi, when I try the firefox_getLatest.sh from repository, it does download Firefox 45, seems to install fine and also creates a icon on wbar, but will not launch Firefox. It seems to create all files.

I tried it on VMWare and from SD card (installed using TinyCore but using corepure64.gz and vmlinuz64.gz). I can run Firefox ESR fine but not the latest 45. Using flwm or fluxbox has no impact.

Manually trying to execute using PCManFM shows error message [Failed to execute child process "/tmp/tcloop/firefox/usr/local/firefox/firefox" (No such file or directory)]
Title: Re: Firefox - Extension to install the latest version
Post by: gerald_clark on March 18, 2016, 09:26:54 AM
It sounds like you have not loaded firefox.tcz.
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on March 18, 2016, 10:39:57 AM
Exactly, firefox has most likely not been installed correctly. 
Also remember that you can not have both firefoxESR and firefox installed at the same time.  firefox_getLatest will attempt to remove old versions if installed, however if you've manually downloaded firefoxESR afterwards then there may be a conflict.

firefox_getLatest is setup to be almost fool proof, but as always you can interfere with the install process if you're not that familiar with how TC installs applications.  firefox_getLatest iirc will not install firefox.tcz to the onboot list unless an older variant was previously installed there.

As Gerald suggested firefox hasn't been allowed to install correctly along with it's deps.  So to fix that please use "Apps" to remove any previously installed firefoxESR editions, then proceed to install firefox.tcz correctly to your "onboot.lst"   Or manually install for this session.   Either way, attempting to launch firefox without the correct path will most likely fail, as you've experienced using the file manager probably will not work as desired.

If you prefer to use the commandline, then use

tce-load -i firefox

remember to add firefox.tcz to your onboot.lst using Apps if you choose to have firefox loaded after each bootup.

good luck
Title: Re: Firefox - Extension to install the latest version
Post by: tp4web on March 18, 2016, 12:33:44 PM
Sorry, I did not make it clear. This is on TinyCorePure64-7.0. Right after booting from ISO, I goto Apps -> Select fastest Mirror -> search for firefox. I select firefox_getLatest.tcz. I select  "Download + Load" option and click Go. TCE: path shows as /tmp/tce/optional. After it says OK, I open terminal and type firefox_getLatest.sh. The output of this is what I attached in my previous post.

I am not adding firefox.tcz to OnBoot.lst as I guess should not matter as I am using this machine for just one boot cycle. In the sense, boot and load TinyCore from any computer, go to website, do something, shutdown computer.

I just repeated the same steps now, and I get this new message (I sweat I had not seen that before):
grep: /etc/sysconfig/tcedir/onboot.lst: No such file or directory

Doing: tce-load -i firefox shows firefox is already installed!
Title: Re: Firefox - Extension to install the latest version
Post by: gerald_clark on March 18, 2016, 02:26:27 PM
The ISO is not writable.  Use a standard disk based installation.
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on March 18, 2016, 04:35:22 PM
so..

I found that in this scenario booting to a tinycore64.iso (burned to a cd) the symlink required by Firefox is not being created.    though it works fine if installed to a USB drive (last time i checked).
 at the terminal, type
Code: [Select]
ln -s /lib /lib64then launch firefox


normally you would launch firefox_getLatest from the desktop menu, then after installing the latest (now 45.0.1) launch firefox from the wbar icon


I'm typing this from tinycore64 cd from where I installed firefox_getLatest, then created the symlink and launched firefox from the firefox icon
Title: Re: Firefox - Extension to install the latest version
Post by: tp4web on March 18, 2016, 04:54:46 PM
Thanks, I tried it again now using my USB drive and firefox_getLatest.sh was able to install firefox 45.0.1 and after reboot, firefox is working fine.
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on March 18, 2016, 05:13:39 PM
Your welcome

It should work from a cd as I've tested the script from many scenarios.  Maybe it is related to the file system, however now that I'm looking at the startup file I see where this needs work and will fix it ASAP


Sent from my iPhone using Tapatalk
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on May 28, 2016, 11:58:02 PM
Updated "firefox_getLatest.tcz" extension submitted to x86 and x86_64 repo's.

Updates dep files for for addition of GTK3 and contains "lib64" fix for corepure64.



Script v2.2 is attached for your perusal or if preferred to update firefox.tcz (rather than wait for extension submission process)
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on August 03, 2017, 03:57:36 PM
Updated "firefox_getLatest" extension submitted to x86 and x86_64 repo's

To comply with latest busybox changes.


In case anyone has difficulty with the current extension no longer completing the connection check, an updated script has been attached to this post
Title: Re: Firefox - Extension to install the latest version
Post by: coreplayer2 on December 18, 2018, 09:07:24 AM
Updated "firefox_getLatest.tcz" extension posted to x86 and x86_64 repo's.

Updates include addition of run time dependencies (one is critical for firefox v64.0)

gcc_libs.tcz
gdk-pixbuf2.tcz