Check the one used by Miro at line 157 of the source code:
1. Try not to hard to find "PPC Mac OS X" or something like that, try to
find something small, just like "Win" or "Mac" or something like that.
2. Also, always provide an "else", if did you found "Linux" or "X11" at
least give me the option to download the source code tarball, or even
better, set a default package (I vote for .deb xD jejeje). I prefer that the
script offers me wrongly a rpm that anything.
3. Also, separate the architecture from the OS detection and put it in the
first level of the algorythm.
Check for "PPC", if found, you already know is MAC, so, why to search for
"Mac"? Already display for Mac PPC.
Then, check for 64bits, i think it was "x86_64"
1. Found? Good, now search for the OS.
2. Not found? Good, it's 32bits (no need to search nothing). Now search for
// OS Seach:
"Win"/"Windows" -:: Ok, found.
"Mac" -:: Ok, found.
ELSE (Linux by default (you can search for "X11"/"Linux" if you want))
-- Now decide if it's RPM or DEB
---- Search for "SLED", "Fedora", etc of the distros that use RPM. (Check
this one http://banshee.fm/theme/js/download.js)
---- Not found? Ok, DEB. (As the Banshee link, if specific distros
instrucciones exists, we can search for that specific distro here)
I think is a smarter algorythm. Sorry for the pseudocode, I'm in a hurry, I
hope you can understand it.
OS, Arch detection si black magic, we will never get there 100%, but al
least improve the one we have.
This site is very usefull:
This is for Firefox
As you can see, sometimes "Debian" is in the user string, sometimes not. And
that also happens with others distros.
Unsubscribe instructions: E-mail to email@example.com
List archive: http://www.libreoffice.org/lists/website/
*** All posts to this list are publicly archived for eternity ***
Impressum (Legal Info)
: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (MPLv2
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our trademark policy