-
Notifications
You must be signed in to change notification settings - Fork 33
/
README
74 lines (48 loc) · 1.51 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
README
This is a fork of Adam Goucher's PHP Formatter for Selenium IDE.
Example build scripts via Adam Goucher : http://adam.goucher.ca/?p=1331
--------------------------------------------------
BUILD.BAT
@echo off
setlocal
set APP_NAME="php-formatter"
set CHROME_PROVIDERS="content"
set ROOT_DIR=%CD%
set TMP_DIR="build"
rem remove any left-over files from previous build
del /Q %APP_NAME%.xpi
del /S /Q %TMP_DIR%
mkdir %TMP_DIR%\chrome\content
robocopy content %TMP_DIR%\chrome\content /E
copy install.rdf %TMP_DIR%
copy chrome.manifest %TMP_DIR%
rem generate the XPI file
cd %TMP_DIR%
echo "Generating %APP_NAME%.xpi..."
"c:\program files\7-zip\7z.exe" a -r -y -tzip ../%APP_NAME%.zip *
cd %ROOT_DIR%
rename %APP_NAME%.zip %APP_NAME%.xpi
del /S /Q %TMP_DIR%
rmdir /S /Q %TMP_DIR%
endlocal
--------------------------------------------------
BUILD.SH
#!/bin/bash
APP_NAME=php-formatter # short-name, jar and xpi files name. Must be lowercase with no spaces
CHROME_PROVIDERS="content" # which chrome providers we have (space-separated list)
ROOT_DIRS="defaults" # ...and these directories (space separated list)
ROOT_DIR=`pwd`
TMP_DIR=build
# remove any left-over files from previous build
rm -f $APP_NAME.jar $APP_NAME.xpi
rm -rf $TMP_DIR
mkdir -p $TMP_DIR/chrome/content
cp -v -R src/content $TMP_DIR/chrome
cp -v src/install.rdf $TMP_DIR
cp -v src/chrome.manifest $TMP_DIR
# generate the XPI file
cd $TMP_DIR
echo "Generating $APP_NAME.xpi..."
zip -r ../$APP_NAME.xpi *
cd "$ROOT_DIR"
rm -rf $TMP_DIR