-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpack-cmd.bat
50 lines (36 loc) · 1.7 KB
/
pack-cmd.bat
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
@echo off
set root-dir=%~dp0
set lib-utility-path=%root-dir%lib-utility\
set yuicompressor-path=%lib-utility-path%yuicompressor-2.4.6.jar
set pack-path=%root-dir%ready-to-pack\
set pack-js-path=%pack-path%js
set pack-css-path=%pack-path%css
set pack-image-path=%pack-path%i
set js-path=%root-dir%js
set css-path=%root-dir%css
set image-path=%root-dir%i
set zip-utility-path="%programfiles%\7-Zip\"
SET COPYCMD=/Y
echo "Copying scripts..."
xcopy %js-path% %pack-js-path% /i /d /s
echo "Copying css-styles..."
xcopy %css-path% %pack-css-path% /i /d /s
echo "Copying images..."
xcopy %image-path% %pack-image-path% /i /d /s
echo "Copying manifest..."
xcopy %root-dir%manifest.json %pack-path%manifest.json /d
echo "Copying error list..."
xcopy %root-dir%errorList.json %pack-path%errorList.json /d
echo "Copying html-pages..."
xcopy %root-dir%background.html %pack-path%background.html /d
xcopy %root-dir%options.html %pack-path%options.html /d
echo "Compessing and moving a content script..."
java -jar %yuicompressor-path% -o %pack-js-path%\content-script.js %js-path%\content-script.js
java -jar %yuicompressor-path% -o %pack-js-path%\DialogBox.js %js-path%\DialogBox.js
java -jar %yuicompressor-path% -o %pack-js-path%\ErrorListManager.js %js-path%\ErrorListManager.js
java -jar %yuicompressor-path% -o %pack-js-path%\HabraCorrector.js %js-path%\HabraCorrector.js
java -jar %yuicompressor-path% -o %pack-js-path%\HabraPage.js %js-path%\HabraPage.js
java -jar %yuicompressor-path% -o %pack-js-path%\background.js %js-path%\background.js
java -jar %yuicompressor-path% -o %pack-js-path%\options.js %js-path%\options.js
echo "Compresing files..."
%zip-utility-path%7z a -r -tzip -o{"%root-dir%"} "pack_extension.zip" ready-to-pack\*