-
Notifications
You must be signed in to change notification settings - Fork 0
/
pack-cmd.bat
35 lines (24 loc) · 1.09 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
@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-image-path=%pack-path%i
set js-path=%root-dir%js
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 images..."
xcopy %image-path% %pack-image-path% /i /d /s
echo "Copying manifest..."
xcopy %root-dir%manifest.json %pack-path%manifest.json /d
echo "Compessing and moving a content script..."
java -jar %yuicompressor-path% -o %pack-js-path%\main.js %js-path%\main.js
java -jar %yuicompressor-path% -o %pack-js-path%\inject.js %js-path%\inject.js
java -jar %yuicompressor-path% -o %pack-js-path%\collectBonuses.js %js-path%\collectBonuses.js
java -jar %yuicompressor-path% -o %pack-js-path%\background.js %js-path%\background.js
echo "Compresing files..."
%zip-utility-path%7z a -r -tzip -o{"%root-dir%"} "pack_extension.zip" ready-to-pack\*