-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Build System #26
base: develop
Are you sure you want to change the base?
New Build System #26
Changes from 8 commits
216e1a0
0326f03
b13f8cc
649c749
e38f37c
e07b46d
3423cac
a0df400
de7a16b
fbd61ac
8783ca3
36d8596
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
rm Archive.zip Archive.xpi | ||
zip -r Archive.zip manifest.json css/ icons/ js/ src/ | ||
zip -r Archive.xpi manifest.json install.rdf css/ icons/ js/ src/ | ||
mkdir -pv build/planner-helper | ||
mkdir -pv build/planner-helper/src/inject | ||
mkdir -pv build/planner-helper/src/bg | ||
mkdir -pv build/planner-helper/icons | ||
mkdir -pv build/planner-helper/js | ||
|
||
cp -v manifest.json build/planner-helper/ | ||
cp -v icons/* build/planner-helper/icons/ | ||
cp -v src/inject/inject.css build/planner-helper/src/inject/ | ||
cp -v js/*.min.js build/planner-helper/js/ | ||
|
||
JS=js/*.js | ||
BG=src/bg/*.js | ||
INJECT=src/inject/*.js | ||
|
||
for f in $FILES $BG $INJECT | ||
do | ||
uglifyjs -v $f -o build/planner-helper/$f | ||
done | ||
|
||
google-chrome --pack-extension=./build/planner-helper/ | ||
./createCRX.sh build/planner-helper build/planner-helper.pem | ||
|
||
rm -rv build/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash -e | ||
# | ||
# Purpose: Pack a Chromium extension directory into crx format | ||
|
||
# This was taken from https://developer.chrome.com/extensions/crx | ||
|
||
if test $# -ne 2; then | ||
echo "Usage: crxmake.sh <extension dir> <pem path>" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this use |
||
exit 1 | ||
fi | ||
|
||
dir=$1 | ||
key=$2 | ||
name=$(basename "$dir") | ||
crx="$name.crx" | ||
pub="$name.pub" | ||
sig="$name.sig" | ||
zip="$name.zip" | ||
trap 'rm -f "$pub" "$sig" "$zip"' EXIT | ||
|
||
# zip up the crx dir | ||
cwd=$(pwd -P) | ||
(cd "$dir" && zip -qr -9 -X "$cwd/$zip" .) | ||
|
||
# signature | ||
openssl sha1 -sha1 -binary -sign "$key" < "$zip" > "$sig" | ||
|
||
# public key | ||
openssl rsa -pubout -outform DER < "$key" > "$pub" 2>/dev/null | ||
|
||
byte_swap () { | ||
# Take "abcdefgh" and return it as "ghefcdab" | ||
echo "${1:6:2}${1:4:2}${1:2:2}${1:0:2}" | ||
} | ||
|
||
crmagic_hex="4372 3234" # Cr24 | ||
version_hex="0200 0000" # 2 | ||
pub_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$pub" | awk '{print $5}'))) | ||
sig_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$sig" | awk '{print $5}'))) | ||
( | ||
echo "$crmagic_hex $version_hex $pub_len_hex $sig_len_hex" | xxd -r -p | ||
cat "$pub" "$sig" "$zip" | ||
) > "$crx" | ||
echo "Wrote $crx" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,10 +193,9 @@ PlannerHelper.prototype.createElement = function () { | |
PlannerHelper.prototype.abort = function () { | ||
this.aborted = true; | ||
|
||
var message = ` | ||
Sorry, it appears that either WebReg or one of the data dependencies for Planner Helper | ||
have changed their format. An error report has been sent and an update will be released | ||
soon to make Planner Helper compatible with these changes.`; | ||
var message = "Sorry, it appears that either WebReg or one of the data dependencies for Planner Helper" + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There needs to be a space at the end of this string or else the output will look like "...Planner Helperhave changed...". (same goes for line 197) |
||
"have changed their format. An error report has been sent and an update will be released" + | ||
"soon to make Planner Helper compatible with these changes."; | ||
this.element.children('#planner-helper-data').text(message); | ||
this.disableSearchEvent(); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add
#!/bin/bash
to the top of this file?