-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildExtension.py
49 lines (41 loc) · 1.28 KB
/
buildExtension.py
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
import zipfile
print("[All] Started Building Extension")
files_global = [
"./_locales/en/messages.json",
"./_locales/es/messages.json",
"./_locales/fr/messages.json",
"./src/dashboard.js",
"./src/dashboard.css",
"./src/dashboard.html",
"./src/custom.min.css",
"./src/extension_image.png",
"./icon_64x64.png",
"./icon_128x128.png",
"./icon-bg.png",
"./icon.png"
]
files_chromium = [
"./chromium/background.js",
"./chromium/manifest.json"
]
files_gekko = [
"./gekko/background.js",
"./gekko/manifest.json"
]
print("[Chromium] Creating ZIP File")
chromium = zipfile.ZipFile('anonymousExtension_EdgeChrome.zip', 'w')
print("[FireFox] Creating ZIP File")
firefox = zipfile.ZipFile('anonymousExtension_FireFox.zip', 'w')
with chromium as container:
for file in (files_global + files_chromium):
print("[Chromium] Writing", file)
container.write(file, arcname = file.replace("chromium/", ""))
print("[Chromium] Closing ZIP File")
chromium.close()
with firefox as container:
for file in (files_global + files_gekko):
print("[FireFox] Writing", file)
container.write(file, arcname = file.replace("gekko/", ""))
print("[FireFox] Closing ZIP File")
firefox.close()
print("[All] Finished Building Extension")