|
|
| (2 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| | {{Outdated}} |
| | <strike> |
| == HowTo repackage Lightning for Linux and Windows == | | == HowTo repackage Lightning for Linux and Windows == |
|
| |
|
| Line 4: |
Line 6: |
|
| |
|
| Basically you'll need to: | | Basically you'll need to: |
| * download [http://releases.mozilla.org/pub/mozilla.org/addons/2313/lightning-0.9-tb-linux.xpi lightning-0.9-tb-linux.xpi] and [http://releases.mozilla.org/pub/mozilla.org/addons/2313/lightning-0.9-tb-win.xpi lightning-0.9-tb-win.xpi] | | * download [http://releases.mozilla.org/pub/mozilla.org/addons/2313/lightning-0.9-tb-linux.xpi lightning-0.9-tb-linux.xpi] and [http://releases.mozilla.org/pub/mozilla.org/addons/2313/lightning-0.9-tb-win.xpi lightning-0.9-tb-win.xpi] '''(these files only work for Thunderbird 2)''' |
| | |
| | '''For Thunderbird 3.0 you'll need Lightning 1.0b1 and for Thunderbird 3.1 it works with Lightning 1.0b2!''' |
| | |
| * rename both .xpi files to .zip and extract them to the same folder | | * rename both .xpi files to .zip and extract them to the same folder |
| * create new subfolder ./platform/Linux_x86-gcc3/components | | * create new subfolder ./platform/Linux_x86-gcc3/components |
| Line 29: |
Line 34: |
| <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform> | | <em:targetPlatform>Linux_x86-gcc3</em:targetPlatform> |
| * package all files in a new zip archive and rename it from .zip to .xpi | | * package all files in a new zip archive and rename it from .zip to .xpi |
| | </strike> |
|
| |
|
| == Scripted version == | | == This does also work on 64bit systems! == |
| | |
| Put the Windows and Linux XPIs in one directory, place this script in that same directory, and run it, to get a "lightning-0.x-tb-dual-boot.xpi" install file!
| |
| | |
| <pre><nowiki>#/bin/bash
| |
| | |
| # This script performs the packaging necessary for creating a Lightning extension
| |
| # package compatible with both Windows and Linux. This is based off the
| |
| # instructions here: <https://wiki.mozilla.org/User:Ssitter/UnifiedLightning>
| |
| # - Edward Z. Yang <edwardzyang@thewritingpot.com>
| |
| | |
| VERSION="$1"
| |
| if [ "$VERSION" = "" ]
| |
| then
| |
| echo "Please pass version as first parameter"
| |
| exit 1
| |
| fi
| |
| | |
| NAME="lightning-$VERSION-tb"
| |
| LINUX="$NAME-linux"
| |
| WINDOWS="$NAME-win"
| |
| DUAL="$NAME-dual-boot"
| |
| | |
| if [ ! -f "$LINUX.xpi" ]
| |
| then
| |
| echo "Could not find Linux XPI"
| |
| exit 1
| |
| fi
| |
| | |
| if [ ! -f "$WINDOWS.xpi" ]
| |
| then
| |
| echo "Could not find Windows XPI"
| |
| exit 1
| |
| fi
| |
| | |
| if [ -f "$DUAL.xpi" ]
| |
| then
| |
| echo "Dual-boot XPI already exists"
| |
| exit 1
| |
| fi
| |
| | |
| if [ -d "$NAME" ]
| |
| then
| |
| echo "Output directory $NAME already exists"
| |
| exit 1
| |
| fi
| |
| | |
| mkdir "$NAME"
| |
| cp "$LINUX.xpi" "$NAME"
| |
| cp "$WINDOWS.xpi" "$NAME"
| |
| | |
| # extract XPIs to the same folder
| |
| cd "$NAME"
| |
| unzip "$LINUX.xpi"
| |
| unzip -o "$WINDOWS.xpi"
| |
| rm "$LINUX.xpi" "$WINDOWS.xpi"
| |
| | |
| # create new subfolders
| |
| mkdir platform
| |
| mkdir platform/Linux_x86-gcc3
| |
| mkdir platform/Linux_x86-gcc3/components
| |
| mkdir platform/WINNT_x86-msvc
| |
| mkdir platform/WINNT_x86-msvc/components
| |
| | |
| # move platform dependent files
| |
| mv -t platform/Linux_x86-gcc3/components components/*.so
| |
| mv -t platform/WINNT_x86-msvc/components components/*.dll
| |
| | |
| # replace <em:targetPlatform>
| |
| cp install.rdf old-install.rdf
| |
| sed 's#<em:targetPlatform>[^<]*</em:targetPlatform>#<em:targetPlatform>WINNT_x86-msvc</em:targetPlatform><em:targetPlatform>Linux_x86-gcc3</em:targetPlatform>#' \
| |
| < old-install.rdf > install.rdf
| |
| | |
| # zip it all up
| |
| zip -r "$DUAL.xpi" *
| |
| mv "$DUAL.xpi" ..
| |
| cd ..
| |
| rm -rf "$NAME"
| |
| </nowiki></pre>
| |