Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Update XULRunner to 9.0.1 #162

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion gallery/ereader-transcoder
Submodule ereader-transcoder deleted from b7a294
1 change: 0 additions & 1 deletion gallery/focusTimer
Submodule focusTimer deleted from 386140
1 change: 0 additions & 1 deletion gallery/simple-text-editor
Submodule simple-text-editor deleted from c2e79b
1 change: 0 additions & 1 deletion gallery/webian
Submodule webian deleted from b2feec
7 changes: 4 additions & 3 deletions impl/appifier/_win32.py
Expand Up @@ -44,9 +44,10 @@ def output_app_shell(self, browser_code_dir, dev_mode, verbose=True):
final_binary_path = os.path.join(output_dir, app_info.name + ".exe")
shutil.copy(xulrunner_stub_path, final_binary_path)

# and move the mozcrt19.dll file into place (next to the binary that
# requires it)
dllsrc = os.path.join(output_dir, "xulrunner", "mozcrt19.dll")
# With XULRunner 11.0 you may need to copy "gkmedias.dll" from the
# xulrunner directory to the root directory
# See https://developer.mozilla.org/en/XULRunner/Deploying_XULRunner_1.8
dllsrc = os.path.join(output_dir, "xulrunner", "gkmedias.dll")
shutil.move(dllsrc, output_dir)

return { "xulrunner_app_dir": output_dir, "output_dir": output_dir }
2 changes: 1 addition & 1 deletion impl/appifier/resources/application.ini.template
Expand Up @@ -8,7 +8,7 @@ ID=${developer_email}

[Gecko]
MinVersion=6.0.2
MaxVersion=6.0.2
MaxVersion=11.0

[XRE]
EnableExtensionManager=true
43 changes: 25 additions & 18 deletions impl/mozfetcher/_config.py
@@ -1,35 +1,42 @@
software = {
"Linux_64bit": {
"url": "http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/6.0.2/runtimes/xulrunner-6.0.2.en-US.linux-x86_64.tar.bz2",
"md5": "a1e98013cbb4d9685461465e09b3c7c7",
"bin": {
"path": "xulrunner/xulrunner",
"sig": "e473d9a27a10b9bf1ffb1bd8a3e6d668"
}
"url": "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/runtimes/xulrunner-11.0.en-US.linux-x86_64.tar.bz2",
"md5": "e477d76af746a720ffcf1ddbe0c8c8b8",
"bin": {
"path": "xulrunner/xulrunner",
"sig": "2a5cfa5c3ab7d993e34d6079b80d1519"
}
},
"Darwin_64bit": {
"url": "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/sdk/xulrunner-11.0.en-US.mac-x86_64.sdk.tar.bz2",
"md5": "ff7d517399572f8b233707caaabbe7c7",
"bin": {
"path": "xulrunner-sdk/bin/xulrunner-bin",
"sig": "e2188dc589505a0471b44e96fe581105"
}
},
# for both 32 and 64 bit darwin we'll use 32 bit binaries
( "Darwin_64bit", "Darwin_32bit" ): {
"url": "http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/6.0.2/sdk/xulrunner-6.0.2.en-US.mac-i386.sdk.tar.bz2",
"md5": "a645c56fb9f3dacc8e7f96166bfb288d",
"Darwin_32bit": {
"url": "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/sdk/xulrunner-11.0.en-US.mac-i386.sdk.tar.bz2",
"md5": "d2e1891f0588e8176b4b7f7ad9f56ec5",
"bin": {
"path": "xulrunner-sdk/bin/xulrunner-bin",
"sig": "fa285003839fd8e128b9a2171ca89757"
"sig": "9b83b7b4d1462d3b222c7fc366aadd27"
}
},
( "Windows_32bit", "Windows_64bit" ): {
"url": "http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/6.0.2/runtimes/xulrunner-6.0.2.en-US.win32.zip",
"md5": "173502a8f48d8eb74baa9c7326d91733",
("Windows_32bit", "Windows_64bit"): {
"url": "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/runtimes/xulrunner-11.0.en-US.win32.zip",
"md5": "bb82f6769eeccdf78a3b526ab14a3501",
"bin": {
"path": "xulrunner/xulrunner.exe",
"sig": "0f7b375432357138ff6a1127d54a8403"
"sig": "19e10c8c9acb0ad715894989e14b012e"
}
},
"Linux_32bit": {
"url": "http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/6.0.2/runtimes/xulrunner-6.0.2.en-US.linux-i686.tar.bz2",
"md5": "b348164d69ab9d1b226e98a4893029f2",
"url": "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/runtimes/xulrunner-11.0.en-US.linux-i686.tar.bz2",
"md5": "3b1064cac2b547b8ac7d424b225f642c",
"bin": {
"path": "xulrunner/xulrunner",
"sig": "e473d9a27a10b9bf1ffb1bd8a3e6d668"
"sig": "2a5cfa5c3ab7d993e34d6079b80d1519"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/internal/main.js
Expand Up @@ -174,8 +174,8 @@ exports.main = function main(options, testCallbacks) {
they set inner document width and height */
appWindow = new contentWindow.Window({
url: startPage,
width: 800,
height: 600,
width: ai.width != undefined ? ai.width : 800,
height: ai.height != undefined ? ai.height : 600,
resizable: ai.resizable ? true : false,
menubar: ai.menubar ? true : false,
injectProps : {
Expand Down
8 changes: 8 additions & 0 deletions modules/lib/appinfo.js
Expand Up @@ -121,6 +121,14 @@ function validate(manf) {
required: true,
check: nonEmptyStringCheck
},
width: {
required: false,
check: isInteger
},
height: {
required: false,
check: isInteger
},
resizable: {
required: false,
check: booleanCheck
Expand Down
200 changes: 200 additions & 0 deletions xulupdate.sh
@@ -0,0 +1,200 @@
#!/bin/bash

# extract any file, just call `extract filename`
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.z) uncompress $1 ;;
*) echo "unrecognized file extension: '$1'" ;;
esac
else
echo "argument is not a file: '$1'"
fi
}

#extract md5 sum
mdsum() {
md5sum "$1"|awk '{print $1}'
}

#output error and die
err_exit() {
echo "$1" >&2
exit
}

#downloads all files to current working dir
download_version() {
if [[ "x$1" == "x" ]]; then
err_exit "Please specify the version to download"
return
fi

#set variables and download urls
version="$1"
dl_root="http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$version"
urls=("$dl_root/runtimes/xulrunner-$version.en-US.linux-x86_64.tar.bz2" "$dl_root/runtimes/xulrunner-$version.en-US.linux-i686.tar.bz2" "$dl_root/runtimes/xulrunner-$version.en-US.win32.zip" "$dl_root/sdk/xulrunner-$version.en-US.mac-x86_64.sdk.tar.bz2" "$dl_root/sdk/xulrunner-$version.en-US.mac-i386.sdk.tar.bz2")

#now we download them
for url in ${urls[*]}
do
wget "$url"
done
}
#creates md5s
create_pkg_md5() {
if [[ "x$1" == "x" ]]; then
err_exit "Please specify the version to use"
return
fi

#set variables and download urls
version="$1"
if [[ "x$2" == "xtrue" ]]; then
keep=true
else
keep=false
fi
dl_root="http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$version"

#all files, names, urls
names=('"Linux_64bit"' '"Darwin_64bit"' '"Darwin_32bit"' '("Windows_32bit", "Windows_64bit")' '"Linux_32bit"')
files=("xulrunner-$version.en-US.linux-x86_64.tar.bz2" "xulrunner-$version.en-US.mac-x86_64.sdk.tar.bz2" "xulrunner-$version.en-US.mac-i386.sdk.tar.bz2" "xulrunner-$version.en-US.win32.zip" "xulrunner-$version.en-US.linux-i686.tar.bz2")
urlPrefixes=("runtimes" "sdk" "sdk" "runtimes" "runtimes")
exes=("xulrunner/xulrunner" "xulrunner-sdk/bin/xulrunner-bin" "xulrunner-sdk/bin/xulrunner-bin" "xulrunner/xulrunner.exe" "xulrunner/xulrunner")

#output config file
echo "software = {"

#loop over all files
for (( i=0; i<${#urlPrefixes[*]}; i++ ));
do
type="${names[$i]}"
fname="${files[$i]}"
url="$dl_root/${urlPrefixes[$i]}/$fname"
exename="${exes[$i]}"

#extract if not extracted
echo "Extracting $type" >&2
if [[ ! -d "$fname.dir" ]]
then
mkdir "$fname.dir"
cd "$fname.dir"
extract "../$fname" 1>&2 >/dev/null
else
cd "$fname.dir"
echo "Using previous extraction..." >&2
fi

#mdsum
echo "Calculating md5 sums" >&2
md=$(mdsum "../$fname")
mdexe=$(mdsum "$exename")

#clean up
cd ../
if [[ $keep == false ]]
then
echo "Removing extraction" >&2
rm -rf "$fname.dir"
fi

#output script
if [[ $(($i + 1)) < ${#urlPrefixes[*]} ]];then
coma=","
else
coma=""
fi
cat <<endl
$type: {
"url": "$url",
"md5": "$md",
"bin": {
"path": "$exename",
"sig": "$mdexe"
}
}$coma
endl

done
echo "}"
}

if [[ "x$1" == "x" ]]; then
err_exit "Please specify the version to download. ex: '$0 10.0.2 [--keep]'"
fi

xulversion="$1"
dldirectory="xulrunner.$xulversion"

#have we run recently, and therfore the directory exists and has files in it?
if [[ -d "$dldirectory" && "$(ls -A "$dldirectory")" ]]; then

#keep running until valid input
invalid=true
while [[ $invalid == true ]]; do

read -p "'$dldirectory' has files in it. [D]elete, [a]rchive, or [u]se? " -n 1 result
echo "" # new line
case "$result" in
#delete
""|d|D)
rm -rf "$dldirectory"
echo "Deleted!"

mkdir "$dldirectory"
invalid=false

cd "$dldirectory"
download_version "$xulversion"
cd ../
;;
#archive
a|A)
mv "$dldirectory" "$dldirectory.`date`"
echo "Moved!"

mkdir "$dldirectory"
invalid=false

cd "$dldirectory"
download_version "$xulversion"
cd ../
;;
#use
u|U)
echo "Using..."
invalid=false
;;
esac
done
else
echo "No prior runs, downloading..."
[[ -d "$dldirectory" ]] || mkdir "$dldirectory" # make directory if not exist
cd "$dldirectory"
download_version "$xulversion"
cd ../
fi

#check if we should keep files
keep=false
if [[ "x$2" == "x--keep" || "x$2" == "x-keep" || "x$2" == "x-k" || "x$2" == "xkeep" ]]; then
keep=true
fi
outfile="_config.py.$xulversion.head"

#generate md5's and save to $outfile
cd "$dldirectory"
create_pkg_md5 "$xulversion" $keep > "../$outfile"

echo "Wrote to $outfile"
#done!