Ely Office: six offline-first desktop apps in Rust and GPUI
ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git), ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
This commit is contained in:
817 files changed
+143101
No files matched your search
@@ -0,0 +1,8 @@
|
||||
ely-doc ElyDoc Office;WordProcessor; 1
|
||||
ely-table ElyTable Office;Spreadsheet; 1
|
||||
ely-show ElyShow Office;Presentation; 1
|
||||
ely-pdf ElyPDF Office;Viewer; 1
|
||||
ely-mail ElyMail Network;Email; 2
|
||||
ely-tree ElyTree Development;RevisionControl; 1
|
||||
ely-mark ElyMark Utility;TextEditor; 1
|
||||
ely-agent ElyAgent Development; 2
|
||||
|
@@ -0,0 +1,57 @@
|
||||
"""Notices of every crate built into packages. Usage: crates.py <package>..."""
|
||||
import json
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
NAMES = ("licen", "copying", "notice", "copyright", "unlicense")
|
||||
|
||||
root = pathlib.Path(__file__).resolve().parent.parent
|
||||
standard = root / "packaging" / "licenses"
|
||||
host = next(line.split()[1] for line in subprocess.run(
|
||||
["rustc", "-vV"], check=True, capture_output=True, text=True).stdout.splitlines() if line.startswith("host:"))
|
||||
# Only what this machine's build links.
|
||||
meta = json.loads(subprocess.run(
|
||||
["cargo", "metadata", "--format-version", "1", "--locked", "--filter-platform", host,
|
||||
"--manifest-path", str(root / "Cargo.toml")],
|
||||
check=True, capture_output=True, text=True).stdout)
|
||||
by_id = {package["id"]: package for package in meta["packages"]}
|
||||
own = set(meta["workspace_members"])
|
||||
nodes = {node["id"]: node for node in meta["resolve"]["nodes"]}
|
||||
# What links in: normal edges, for this machine's target.
|
||||
wanted, stack = set(), [pid for pid in own if by_id[pid]["name"] in sys.argv[1:]]
|
||||
if len(stack) != len(sys.argv) - 1:
|
||||
sys.exit(f"crates.py: unknown package among {sys.argv[1:]}")
|
||||
while stack:
|
||||
pid = stack.pop()
|
||||
if pid in wanted:
|
||||
continue
|
||||
wanted.add(pid)
|
||||
for dep in nodes[pid]["deps"]:
|
||||
if any(kind["kind"] is None for kind in dep["dep_kinds"]):
|
||||
stack.append(dep["pkg"])
|
||||
|
||||
out, missing = [], []
|
||||
for pid in sorted(wanted - own, key=lambda pid: (by_id[pid]["name"], by_id[pid]["version"])):
|
||||
package = by_id[pid]
|
||||
folder = pathlib.Path(package["manifest_path"]).parent
|
||||
files = sorted(path for path in folder.iterdir()
|
||||
if path.is_file() and path.name.lower().startswith(NAMES))
|
||||
if package.get("license_file"):
|
||||
files.append(folder / package["license_file"])
|
||||
head = f"{package['name']} {package['version']} — {package['license'] or 'no licence field'}"
|
||||
out.append("=" * 78 + f"\n{head}\n" + "=" * 78)
|
||||
if files:
|
||||
out += [f"--- {path.name}\n{path.read_text(errors='replace')}" for path in dict.fromkeys(files)]
|
||||
else:
|
||||
# No file shipped: the expression's standard text, with its authors.
|
||||
ids = (package["license"] or "").replace("(", " ").replace(")", " ").replace("/", " ").split()
|
||||
text = next((standard / f"{spdx}.txt" for spdx in ids if (standard / f"{spdx}.txt").is_file()), None)
|
||||
if text is None:
|
||||
missing.append(head)
|
||||
continue
|
||||
authors = ", ".join(package["authors"]) or package["name"] + " developers"
|
||||
out.append(f"Copyright (c) {authors}\n--- {text.stem}\n{text.read_text()}")
|
||||
if missing:
|
||||
sys.exit("crates.py: no licence text for:\n " + "\n ".join(missing))
|
||||
print("\n".join(out))
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
# Renders assets/icons/<slug>.{icns,png,ico} from the SVG masters.
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
[ "$(uname)" = Darwin ] || { echo "build.sh: macOS only (AppKit draws the icons)" >&2; exit 1; }
|
||||
icons=$root/assets/icons
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
swiftc -O -o "$work/icon" "$root/packaging/icons/icon.swift"
|
||||
# The small cut, where one exists, below 48 px.
|
||||
master() { # slug, variant ("" or -macos), px
|
||||
local small=$icons/$1-small$2.svg
|
||||
if [ "$3" -lt 48 ] && [ -f "$small" ]; then echo "$small"; else echo "$icons/$1$2.svg"; fi
|
||||
}
|
||||
cut -f1 "$root/packaging/apps.tsv" | while read -r slug; do
|
||||
set=$work/$slug.iconset
|
||||
mkdir "$set"
|
||||
for px in 16 32 128 256 512; do
|
||||
"$work/icon" "$px" "$(master "$slug" -macos "$px")" "$set/icon_${px}x${px}.png"
|
||||
"$work/icon" $((px * 2)) "$(master "$slug" -macos $((px * 2)))" "$set/icon_${px}x${px}@2x.png"
|
||||
done
|
||||
iconutil -c icns -o "$icons/$slug.icns" "$set"
|
||||
"$work/icon" 512 "$icons/$slug.svg" "$icons/$slug.png"
|
||||
sizes=()
|
||||
for px in 16 24 32 48 64 128 256; do
|
||||
"$work/icon" "$px" "$(master "$slug" "" "$px")" "$work/$slug-$px.png"
|
||||
sizes+=("$work/$slug-$px.png")
|
||||
done
|
||||
python3 "$root/packaging/icons/ico.py" "$icons/$slug.ico" "${sizes[@]}"
|
||||
echo "$icons/$slug.{icns,png,ico}"
|
||||
done
|
||||
@@ -0,0 +1,16 @@
|
||||
"""Packs PNGs into a Windows .ico. Usage: ico.py out.ico in.png..."""
|
||||
import struct
|
||||
import sys
|
||||
|
||||
out, pngs = sys.argv[1], sys.argv[2:]
|
||||
images = [open(path, "rb").read() for path in pngs]
|
||||
header = struct.pack("<HHH", 0, 1, len(images))
|
||||
offset = len(header) + 16 * len(images)
|
||||
entries = b""
|
||||
for data in images:
|
||||
# Size from the PNG header; 256 is written as 0.
|
||||
width, height = struct.unpack(">II", data[16:24])
|
||||
entries += struct.pack("<BBBBHHII", width % 256, height % 256, 0, 0, 1, 32, len(data), offset)
|
||||
offset += len(data)
|
||||
with open(out, "wb") as ico:
|
||||
ico.write(header + entries + b"".join(images))
|
||||
@@ -0,0 +1,22 @@
|
||||
// Renders SVGs to transparent PNGs. Usage: icon <px> <in.svg> <out.png>...
|
||||
import AppKit
|
||||
|
||||
let args = CommandLine.arguments
|
||||
guard args.count >= 4, args.count % 2 == 0, let size = Int(args[1]) else {
|
||||
FileHandle.standardError.write("usage: icon <px> <in.svg> <out.png>...\n".data(using: .utf8)!)
|
||||
exit(2)
|
||||
}
|
||||
for pair in stride(from: 2, to: args.count, by: 2) {
|
||||
guard let svg = NSImage(contentsOfFile: args[pair]) else {
|
||||
FileHandle.standardError.write("icon: cannot read \(args[pair])\n".data(using: .utf8)!)
|
||||
exit(1)
|
||||
}
|
||||
let rep = NSBitmapImageRep(bitmapDataPlanes: nil, pixelsWide: size, pixelsHigh: size,
|
||||
bitsPerSample: 8, samplesPerPixel: 4, hasAlpha: true, isPlanar: false,
|
||||
colorSpaceName: .deviceRGB, bytesPerRow: 0, bitsPerPixel: 0)!
|
||||
NSGraphicsContext.saveGraphicsState()
|
||||
NSGraphicsContext.current = NSGraphicsContext(bitmapImageRep: rep)
|
||||
svg.draw(in: NSRect(x: 0, y: 0, width: size, height: size))
|
||||
NSGraphicsContext.restoreGraphicsState()
|
||||
try rep.representation(using: .png, properties: [:])!.write(to: URL(fileURLWithPath: args[pair + 1]))
|
||||
}
|
||||
Executable
+174
@@ -0,0 +1,174 @@
|
||||
#!/usr/bin/env python3
|
||||
# Writes the icon masters, drawn on Papirus's 192 grid.
|
||||
import os
|
||||
import sys
|
||||
|
||||
out = sys.argv[1] if len(sys.argv) > 1 else os.path.join(os.path.dirname(__file__), '../../assets/icons')
|
||||
|
||||
|
||||
def tint(hex_, amount):
|
||||
# Mixes a colour towards white.
|
||||
rgb = [int(hex_[i:i + 2], 16) for i in (1, 3, 5)]
|
||||
return '#%02X%02X%02X' % tuple(round(c + (255 - c) * amount) for c in rgb)
|
||||
|
||||
|
||||
def rect(x, y, w, h, r):
|
||||
return f'<rect x="{x}" y="{y}" width="{w}" height="{h}" rx="{r}"/>'
|
||||
|
||||
|
||||
def circle(x, y, r):
|
||||
return f'<circle cx="{x}" cy="{y}" r="{r}"/>'
|
||||
|
||||
|
||||
def path(d):
|
||||
return f'<path d="{d}"/>'
|
||||
|
||||
|
||||
def line(points, width):
|
||||
pts = ' '.join(f'{x},{y}' for x, y in points)
|
||||
return (f'<polyline points="{pts}" fill="none" stroke-width="{width}" '
|
||||
'stroke-linecap="round" stroke-linejoin="round"/>')
|
||||
|
||||
|
||||
def curve(d, width):
|
||||
return f'<path d="{d}" fill="none" stroke-width="{width}" stroke-linecap="round"/>'
|
||||
|
||||
|
||||
# The page: 128 by 160, top-right corner folded.
|
||||
PAGE = 'M40 16H112L160 64V168A8 8 0 0 1 152 176H40A8 8 0 0 1 32 168V24A8 8 0 0 1 40 16Z'
|
||||
FOLD = 'M112 16V56A8 8 0 0 0 120 64H160Z'
|
||||
|
||||
# Part: (svg, colour, shadow, small). Shadow 'body', 'part' or None.
|
||||
APPS = {}
|
||||
|
||||
BLUE = '#3D7FE5'
|
||||
APPS['ely-doc'] = [
|
||||
(path(PAGE), BLUE, 'body', True), (path(FOLD), tint(BLUE, .45), 'fold', True),
|
||||
(rect(56, 84, 64, 12, 4), '#FFFFFF', 'part', True),
|
||||
(rect(56, 108, 80, 8, 4), '#FFFFFF', 'part', True),
|
||||
(rect(56, 124, 80, 8, 4), '#FFFFFF', 'part', True),
|
||||
(rect(56, 140, 80, 8, 4), '#FFFFFF', 'part', False),
|
||||
(rect(56, 156, 48, 8, 4), tint(BLUE, .55), 'part', False),
|
||||
]
|
||||
|
||||
GREEN = '#2E9E5B'
|
||||
APPS['ely-table'] = [
|
||||
(path(PAGE), GREEN, 'body', True), (path(FOLD), tint(GREEN, .45), 'fold', True),
|
||||
(path('M52 92H140V156H52ZM60 108H92V120H60ZM100 108H132V120H100Z'
|
||||
'M60 128H92V140H60ZM100 128H132V140H100Z').replace('<path', '<path fill-rule="evenodd"'),
|
||||
'#FFFFFF', 'part', True),
|
||||
(rect(100, 128, 32, 12, 0), '#FFD54F', None, False),
|
||||
]
|
||||
|
||||
ORANGE = '#F07B2A'
|
||||
APPS['ely-show'] = [
|
||||
(line([(96, 136), (64, 176)], 12), '#5D5D5D', 'part', True),
|
||||
(line([(96, 136), (128, 176)], 12), '#5D5D5D', 'part', True),
|
||||
(rect(16, 28, 160, 112, 10), ORANGE, 'body', True),
|
||||
(rect(16, 28, 160, 16, 8), tint(ORANGE, .3), None, False),
|
||||
(rect(32, 52, 128, 72, 4), '#FFFFFF', 'part', True),
|
||||
(rect(48, 96, 16, 16, 2), ORANGE, None, True),
|
||||
(rect(72, 80, 16, 32, 2), ORANGE, None, True),
|
||||
(rect(96, 66, 16, 46, 2), ORANGE, None, True),
|
||||
(path('M136 66A16 16 0 1 0 152 82H136Z'), '#5D7FC9', None, False),
|
||||
]
|
||||
|
||||
RED = '#E0344F'
|
||||
APPS['ely-pdf'] = [
|
||||
(path(PAGE), RED, 'body', True), (path(FOLD), tint(RED, .45), 'fold', True),
|
||||
(rect(52, 88, 88, 60, 6), '#FFFFFF', 'part', True),
|
||||
(path('M60 140L82 112L98 128L108 118L132 140Z'), RED, None, True),
|
||||
(circle(112, 104, 7), tint(RED, .4), None, False),
|
||||
(rect(52, 156, 56, 8, 4), tint(RED, .55), 'part', False),
|
||||
]
|
||||
|
||||
SKY = '#1E8FE0'
|
||||
APPS['ely-mail'] = [
|
||||
(rect(16, 40, 160, 112, 12), SKY, 'body', True),
|
||||
(path('M28 40H164L104 92A12 12 0 0 1 88 92Z'), tint(SKY, .35), None, True),
|
||||
(line([(30, 54), (96, 108), (162, 54)], 12), '#FFFFFF', 'part', True),
|
||||
(line([(32, 138), (72, 104)], 8), tint(SKY, .35), None, False),
|
||||
(line([(160, 138), (120, 104)], 8), tint(SKY, .35), None, False),
|
||||
]
|
||||
|
||||
PURPLE = '#7E57C2'
|
||||
APPS['ely-tree'] = [
|
||||
(line([(64, 44), (64, 148)], 20), PURPLE, 'part', True),
|
||||
(curve('M64 128C64 92 128 104 128 72', 20), PURPLE, 'part', True),
|
||||
(circle(64, 40, 24), PURPLE, 'part', True), (circle(64, 40, 11), '#FFFFFF', None, True),
|
||||
(circle(128, 64, 24), PURPLE, 'part', True), (circle(128, 64, 11), '#FFFFFF', None, True),
|
||||
(circle(64, 152, 24), '#F2A900', 'part', True), (circle(64, 152, 11), '#FFFFFF', None, True),
|
||||
]
|
||||
|
||||
APPS['ely-mark'] = [
|
||||
(rect(28, 24, 136, 152, 10), '#ECECEC', 'body', True),
|
||||
(path('M38 24H154A10 10 0 0 1 164 34V52H28V34A10 10 0 0 1 38 24Z'), '#4F4F4F', None, True),
|
||||
(rect(46, 32, 10, 14, 5), '#FFFFFF', None, False), (rect(70, 32, 10, 14, 5), '#FFFFFF', None, False),
|
||||
(rect(94, 32, 10, 14, 5), '#FFFFFF', None, False), (rect(118, 32, 10, 14, 5), '#FFFFFF', None, False),
|
||||
(rect(142, 32, 10, 14, 5), '#FFFFFF', None, False),
|
||||
(path('M44 156V76H66L82 100L98 76H120V156H100V110L82 136L64 110V156Z'), '#3E4A5C', 'part', True),
|
||||
(path('M128 76H148V124H164L138 158L112 124H128Z'), '#F2A900', 'part', True),
|
||||
]
|
||||
|
||||
APPS['ely-agent'] = [
|
||||
(rect(16, 32, 160, 140, 12), '#4F4F4F', 'body', True),
|
||||
(rect(16, 32, 160, 24, 12), '#5F5F5F', None, False),
|
||||
(rect(16, 44, 160, 12, 0), '#5F5F5F', None, False),
|
||||
(circle(32, 44, 4), '#FF6B8B', None, False), (circle(46, 44, 4), '#FFC857', None, False),
|
||||
(circle(60, 44, 4), '#5FD38D', None, False),
|
||||
(line([(44, 92), (72, 116)], 16), '#FFFFFF', 'part', True),
|
||||
(line([(72, 116), (44, 140)], 16), '#A2A2A2', 'part', True),
|
||||
(rect(84, 132, 48, 16, 4), '#FFFFFF', 'part', True),
|
||||
(path('M148 64C151 84 156 89 176 92C156 95 151 100 148 120C145 100 140 95 120 92C140 89 145 84 148 64Z'),
|
||||
'#FF6B8B', 'part', True),
|
||||
]
|
||||
|
||||
# Apple's squircle on the 256 canvas; n = 5.
|
||||
SQ = ('M231 128C231 229.764 229.764 231 128 231C26.236 231 25 229.764 25 128'
|
||||
'C25 26.236 26.236 25 128 25C229.764 25 231 26.236 231 128Z')
|
||||
SHADOWS = {'body': (4, 2.88), 'fold': (2, 0.96), 'part': (2, 1.28)}
|
||||
|
||||
|
||||
def paint(svg, colour):
|
||||
if 'stroke-width' in svg:
|
||||
return svg.replace('fill="none"', f'fill="none" stroke="{colour}"', 1)
|
||||
return svg.replace('/>', f' fill="{colour}"/>', 1)
|
||||
|
||||
|
||||
def draw(parts, small):
|
||||
body, filters = [], set()
|
||||
for svg, colour, shadow, keep in parts:
|
||||
if small and not keep:
|
||||
continue
|
||||
if shadow and not small:
|
||||
dy, _ = SHADOWS[shadow]
|
||||
filters.add(shadow)
|
||||
body.append(f'<g transform="translate(0 {dy})" opacity="0.2" filter="url(#{shadow})">'
|
||||
f'{paint(svg, "#000000")}</g>')
|
||||
body.append(paint(svg, colour))
|
||||
return ''.join(body), filters
|
||||
|
||||
|
||||
def svg(parts, macos, small):
|
||||
body, used = draw(parts, small)
|
||||
defs = ''.join(f'<filter id="{name}" x="-0.2" y="-0.2" width="1.4" height="1.4">'
|
||||
f'<feGaussianBlur stdDeviation="{SHADOWS[name][1]}"/></filter>'
|
||||
for name in sorted(used))
|
||||
if macos:
|
||||
# A light squircle; the object fills 86 % of it.
|
||||
scale = 0.86 * 206 / 192
|
||||
offset = 128 - 96 * scale
|
||||
content = (f'<path fill="#F4F4F2" d="{SQ}"/>'
|
||||
f'<g transform="translate({offset:.3f} {offset + 4:.3f}) scale({scale:.4f})">{body}</g>')
|
||||
else:
|
||||
content = f'<g transform="scale({256 / 192:.6f})">{body}</g>'
|
||||
return ('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256">'
|
||||
f'<defs>{defs}</defs>{content}</svg>\n')
|
||||
|
||||
|
||||
for slug, parts in APPS.items():
|
||||
for macos in (False, True):
|
||||
for small in (False, True):
|
||||
name = f'{out}/{slug}{"-small" if small else ""}{"-macos" if macos else ""}.svg'
|
||||
with open(name, 'w') as file:
|
||||
file.write(svg(parts, macos, small))
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<oor:data xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oor="http://openoffice.org/2001/registry">
|
||||
<dependency file="calc"/>
|
||||
<dependency file="main"/>
|
||||
<oor:component-data oor:package="org.openoffice.Office" oor:name="Calc">
|
||||
<node oor:name="Formula">
|
||||
<node oor:name="Syntax">
|
||||
<prop oor:name="Grammar">
|
||||
<value>1</value>
|
||||
</prop>
|
||||
<prop oor:name="SeparatorArg">
|
||||
<value>,</value>
|
||||
</prop>
|
||||
<prop oor:name="SeparatorArrayCol">
|
||||
<value>,</value>
|
||||
</prop>
|
||||
<prop oor:name="SeparatorArrayRow">
|
||||
<value>;</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name="Load">
|
||||
<prop oor:name="OOXMLRecalcMode">
|
||||
<value>0</value>
|
||||
</prop>
|
||||
<prop oor:name="ODFRecalcMode">
|
||||
<value>0</value>
|
||||
</prop>
|
||||
</node>
|
||||
</node>
|
||||
<node oor:name="Input">
|
||||
<prop oor:name="WarnActiveSheet">
|
||||
<value>false</value>
|
||||
</prop>
|
||||
</node>
|
||||
</oor:component-data>
|
||||
<oor:component-data oor:package="org.openoffice.Office" oor:name="UI">
|
||||
<node oor:name="ColorScheme">
|
||||
<node oor:name="ColorSchemes">
|
||||
<node oor:name="COLOR_SCHEME_ELY_DARK" oor:op="replace">
|
||||
<node oor:name="DocColor"><prop oor:name="Color"><value>2894892</value></prop></node>
|
||||
<node oor:name="AppBackground"><prop oor:name="Color"><value>2434341</value></prop></node>
|
||||
<node oor:name="FontColor"><prop oor:name="Color"><value>15987184</value></prop></node>
|
||||
<node oor:name="DocBoundaries"><prop oor:name="Color"><value>5592405</value></prop></node>
|
||||
<node oor:name="TableBoundaries"><prop oor:name="Color"><value>5592405</value></prop></node>
|
||||
<node oor:name="CalcGrid"><prop oor:name="Color"><value>5592405</value></prop></node>
|
||||
<node oor:name="Links"><prop oor:name="Color"><value>8303091</value></prop></node>
|
||||
<node oor:name="LinksVisited"><prop oor:name="Color"><value>12297192</value></prop></node>
|
||||
<node oor:name="Shadow"><prop oor:name="Color"><value>0</value></prop></node>
|
||||
<node oor:name="WriterFieldShadings"><prop oor:name="Color"><value>4144959</value></prop></node>
|
||||
<node oor:name="WriterIdxShadings"><prop oor:name="Color"><value>4144959</value></prop></node>
|
||||
<node oor:name="CalcNotesBackground"><prop oor:name="Color"><value>3417617</value></prop></node>
|
||||
<node oor:name="CalcPageBreak"><prop oor:name="Color"><value>6052440</value></prop></node>
|
||||
<node oor:name="CalcHiddenColRow"><prop oor:name="Color"><value>6052440</value></prop></node>
|
||||
<node oor:name="CalcCellFocus"><prop oor:name="Color"><value>6922728</value></prop></node>
|
||||
<node oor:name="WriterPageBreaks"><prop oor:name="Color"><value>6052440</value></prop></node>
|
||||
<node oor:name="DrawGrid"><prop oor:name="Color"><value>5592405</value></prop></node>
|
||||
</node>
|
||||
<node oor:name="COLOR_SCHEME_ELY_LIGHT" oor:op="replace">
|
||||
<node oor:name="DocColor"><prop oor:name="Color"><value>16777215</value></prop></node>
|
||||
<node oor:name="AppBackground"><prop oor:name="Color"><value>15987184</value></prop></node>
|
||||
<node oor:name="FontColor"><prop oor:name="Color"><value>0</value></prop></node>
|
||||
<node oor:name="DocBoundaries"><prop oor:name="Color"><value>12632256</value></prop></node>
|
||||
<node oor:name="TableBoundaries"><prop oor:name="Color"><value>12632256</value></prop></node>
|
||||
<node oor:name="CalcGrid"><prop oor:name="Color"><value>12632256</value></prop></node>
|
||||
<node oor:name="Links"><prop oor:name="Color"><value>128</value></prop></node>
|
||||
<node oor:name="LinksVisited"><prop oor:name="Color"><value>8388736</value></prop></node>
|
||||
<node oor:name="Shadow"><prop oor:name="Color"><value>8421504</value></prop></node>
|
||||
<node oor:name="WriterFieldShadings"><prop oor:name="Color"><value>12632256</value></prop></node>
|
||||
<node oor:name="WriterIdxShadings"><prop oor:name="Color"><value>12632256</value></prop></node>
|
||||
<node oor:name="CalcNotesBackground"><prop oor:name="Color"><value>16777152</value></prop></node>
|
||||
<node oor:name="CalcPageBreak"><prop oor:name="Color"><value>128</value></prop></node>
|
||||
<node oor:name="CalcHiddenColRow"><prop oor:name="Color"><value>2894633</value></prop></node>
|
||||
<node oor:name="CalcCellFocus"><prop oor:name="Color"><value>2777241</value></prop></node>
|
||||
<node oor:name="WriterPageBreaks"><prop oor:name="Color"><value>128</value></prop></node>
|
||||
<node oor:name="DrawGrid"><prop oor:name="Color"><value>6710886</value></prop></node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</oor:component-data>
|
||||
</oor:data>
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
# Writes an app's licences and notices. Usage: licenses.sh <slug> <dir>
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/.." && pwd)
|
||||
slug=${1:?app slug}
|
||||
out=${2:?licence folder}
|
||||
put() { # into, files...
|
||||
local into=$out/$1
|
||||
shift
|
||||
mkdir -p "$into"
|
||||
for file in "$@"; do
|
||||
[ -s "$file" ] || {
|
||||
echo "licenses.sh: no $file; the release cannot ship without it" >&2
|
||||
exit 1
|
||||
}
|
||||
cp "$file" "$into/"
|
||||
done
|
||||
}
|
||||
put . "$root/LICENSE"
|
||||
case $slug in
|
||||
ely-doc | ely-table | ely-show) crates=(ely-lok) ;;
|
||||
ely-pdf) crates=(ely-pdf-engine) ;;
|
||||
ely-mark) crates=(ely-web-content) ;;
|
||||
*) crates=() ;;
|
||||
esac
|
||||
python3 "$root/packaging/crates.py" "$slug" ${crates[@]+"${crates[@]}"} >"$out/rust-crates.txt"
|
||||
lo=${ELY_LO_APP:-$root/engines/lo-src/instdir/LibreOffice.app}/Contents/Resources
|
||||
case $slug in
|
||||
ely-doc | ely-table | ely-show)
|
||||
put LibreOffice "$lo/LICENSE" "$lo/LICENSE.html" "$lo/NOTICE" "$lo/CREDITS.fodt"
|
||||
;;
|
||||
ely-pdf)
|
||||
put MuPDF "$root/engines/mupdf-src/COPYING"
|
||||
# Every third party the MuPDF build compiled in.
|
||||
for part in "$root"/engines/mupdf-build/thirdparty/*; do
|
||||
name=${part##*/}
|
||||
found=$(find "$root/engines/mupdf-src/thirdparty/$name" -maxdepth 1 -type f \
|
||||
\( -iname 'licen[cs]e*' -o -iname 'copying*' -o -iname '*-license.txt' \))
|
||||
[ "$name" = libjpeg ] && found=$root/engines/mupdf-src/thirdparty/libjpeg/README
|
||||
[ -n "$found" ] || { echo "licenses.sh: no licence for MuPDF's $name" >&2; exit 1; }
|
||||
# shellcheck disable=SC2086
|
||||
put "MuPDF/$name" $found
|
||||
done
|
||||
# Every font family MuPDF built into the worker.
|
||||
for part in "$root"/engines/mupdf-build/generated/resources/fonts/*; do
|
||||
name=${part##*/}
|
||||
fonts=$root/engines/mupdf-src/resources/fonts/$name
|
||||
found=$(find "$fonts" -maxdepth 1 -type f \( -iname 'licen[cs]e*' -o -iname 'copying*' -o -iname 'notice*' -o -iname 'ofl*' \))
|
||||
[ -n "$found" ] || { echo "licenses.sh: no licence for MuPDF's $name fonts" >&2; exit 1; }
|
||||
# A README tells the fonts' source; never the licence.
|
||||
found="$found $(find "$fonts" -maxdepth 1 -type f -iname 'readme*')"
|
||||
# shellcheck disable=SC2086
|
||||
put "MuPDF/fonts/$name" $found
|
||||
done
|
||||
put OpenSSL "$(pkg-config --variable=prefix libcrypto)/LICENSE.txt"
|
||||
put tessdata "${ELY_TESSDATA:-$root/engines/tessdata}/LICENSE"
|
||||
put GreatVibes "$root/crates/ely-pdf-engine/fonts/OFL.txt"
|
||||
;;
|
||||
ely-tree)
|
||||
put Git "$root/engines/git-src/COPYING" "$root/engines/git-src/LGPL-2.1"
|
||||
put git-lfs "$root/engines/git/share/doc/git-lfs/LICENSE.md"
|
||||
;;
|
||||
ely-mark)
|
||||
put CEF "$root/reference/cef/LICENSE.txt" "${ELY_CEF:-$root/engines/cef}/CREDITS.html"
|
||||
put content "$root/engines/content/ely-mark/THIRD-PARTY-NOTICES.txt"
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,23 @@
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
@@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,373 @@
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=@NAME@
|
||||
Exec=@SLUG@ %F
|
||||
MimeType=@MIME@
|
||||
Icon=@SLUG@
|
||||
Categories=@CATEGORIES@
|
||||
StartupWMClass=@SLUG@
|
||||
Terminal=false
|
||||
Executable
+86
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds dist/<Name>-<arch>.AppImage. Usage: appimage.sh <slug> | --desktop <slug>
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
desktop_only=
|
||||
[ "${1:-}" = --desktop ] && {
|
||||
desktop_only=1
|
||||
shift
|
||||
}
|
||||
slug=${1:?app slug, such as ely-doc}
|
||||
dist=${ELY_DIST:-$root/dist}
|
||||
|
||||
row=$(awk -F'\t' -v slug="$slug" '$1 == slug { print $2 "\t" $3 }' "$root/packaging/apps.tsv")
|
||||
[ -n "$row" ] || {
|
||||
echo "appimage.sh: unknown app $slug" >&2
|
||||
exit 1
|
||||
}
|
||||
name=${row%%$'\t'*}
|
||||
categories=${row##*$'\t'}
|
||||
# The types it opens, from packaging/types.tsv; none drops the line.
|
||||
mimes=$(awk -F'\t' -v slug="$slug" '$1 == slug { printf "%s;", $3 }' "$root/packaging/types.tsv")
|
||||
desktop_entry() {
|
||||
sed -e "s/@NAME@/$name/" -e "s/@SLUG@/$slug/g" -e "s/@CATEGORIES@/$categories/" -e "s|@MIME@|$mimes|" \
|
||||
-e '/^MimeType=$/d' "$root/packaging/linux/app.desktop.in"
|
||||
}
|
||||
|
||||
if [ -n "$desktop_only" ]; then
|
||||
desktop_entry
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ "$(uname)" = Linux ] || {
|
||||
echo "appimage.sh: Linux only" >&2
|
||||
exit 1
|
||||
}
|
||||
arch=$(uname -m)
|
||||
case $arch in
|
||||
x86_64)
|
||||
pack_sha=ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0
|
||||
deploy_sha=c20cd71e3a4e3b80c3483cef793cda3f4e990aca14014d23c544ca3ce1270b4d
|
||||
runtime_sha=2fca8b443c92510f1483a883f60061ad09b46b978b2631c807cd873a47ec260d
|
||||
;;
|
||||
aarch64)
|
||||
pack_sha=f0837e7448a0c1e4e650a93bb3e85802546e60654ef287576f46c71c126a9158
|
||||
deploy_sha=620095110d693282b8ebeb244a95b5e911cf8f65f76c88b4b47d16ae6346fcff
|
||||
runtime_sha=00cbdfcf917cc6c0ff6d3347d59e0ca1f7f45a6df1a428a0d6d8a78664d87444
|
||||
;;
|
||||
*)
|
||||
echo "appimage.sh: no AppImage tools for $arch" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
icon=$root/assets/icons/$slug.png
|
||||
[ -f "$icon" ] || {
|
||||
echo "appimage.sh: $icon is missing; the icons are not designed yet" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
fetch_tool() { # file url sha256
|
||||
if [ ! -f "$1" ]; then
|
||||
mkdir -p "$root/engines"
|
||||
curl -fsSL -o "$1" "$2"
|
||||
fi
|
||||
echo "$3 $1" | sha256sum -c - >/dev/null
|
||||
chmod +x "$1"
|
||||
}
|
||||
pack=$root/engines/appimagetool-1.9.1-$arch.AppImage
|
||||
deploy=$root/engines/linuxdeploy-1-alpha-20251107-1-$arch.AppImage
|
||||
runtime=$root/engines/type2-runtime-20251108-$arch
|
||||
fetch_tool "$pack" "https://github.com/AppImage/appimagetool/releases/download/1.9.1/appimagetool-$arch.AppImage" "$pack_sha"
|
||||
fetch_tool "$deploy" "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20251107-1/linuxdeploy-$arch.AppImage" "$deploy_sha"
|
||||
fetch_tool "$runtime" "https://github.com/AppImage/type2-runtime/releases/download/20251108/runtime-$arch" "$runtime_sha"
|
||||
|
||||
cargo build --manifest-path "$root/Cargo.toml" --release -p "$slug"
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
desktop_entry >"$work/$slug.desktop"
|
||||
|
||||
# linuxdeploy bundles libraries and fails on a missing one.
|
||||
"$deploy" --appimage-extract-and-run --appdir "$work/$name.AppDir" \
|
||||
--executable "$root/target/release/$slug" --desktop-file "$work/$slug.desktop" --icon-file "$icon"
|
||||
|
||||
mkdir -p "$dist"
|
||||
ARCH=$arch "$pack" --appimage-extract-and-run --runtime-file "$runtime" "$work/$name.AppDir" "$dist/$name-$arch.AppImage"
|
||||
echo "$dist/$name-$arch.AppImage"
|
||||
Executable
+170
@@ -0,0 +1,170 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds dist/<Name>.app. Usage: bundle.sh <slug> [release|debug]
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
slug=${1:?app slug, such as ely-doc}
|
||||
profile=${2:-release}
|
||||
dist=${ELY_DIST:-$root/dist}
|
||||
identity=${ELY_SIGN_IDENTITY:--}
|
||||
prefix=ely.zacharyzhang.office
|
||||
|
||||
name=$(awk -F'\t' -v slug="$slug" '$1 == slug { print $2 }' "$root/packaging/apps.tsv")
|
||||
[ -n "$name" ] || {
|
||||
echo "bundle.sh: unknown app $slug" >&2
|
||||
exit 1
|
||||
}
|
||||
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
|
||||
case $profile in
|
||||
release | debug) ;;
|
||||
*)
|
||||
echo "bundle.sh: profile is release or debug" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
build() { # cargo build arguments
|
||||
case $profile in
|
||||
release) cargo build --manifest-path "$root/Cargo.toml" --release "$@" ;;
|
||||
debug) cargo build --manifest-path "$root/Cargo.toml" "$@" ;;
|
||||
esac
|
||||
}
|
||||
uses() { grep -q "^$1" "$root/apps/$slug/Cargo.toml"; }
|
||||
need() { # path, what to run
|
||||
[ -e "$1" ] || {
|
||||
echo "bundle.sh: no $1; run $2" >&2
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
build -p "$slug"
|
||||
icon=$root/assets/icons/$slug.icns
|
||||
need "$icon" packaging/icons/build.sh
|
||||
|
||||
app=$dist/$name.app
|
||||
rm -rf "$app"
|
||||
mkdir -p "$app/Contents/MacOS" "$app/Contents/Resources"
|
||||
cp "$root/target/$profile/$slug" "$app/Contents/MacOS/$slug"
|
||||
cp "$icon" "$app/Contents/Resources/$slug.icns"
|
||||
# Code inside the app, signed before it.
|
||||
inner=()
|
||||
if uses ely-lok; then
|
||||
lo=${ELY_LO_APP:-$root/engines/lo-src/instdir/LibreOffice.app}
|
||||
need "$lo/Contents/Frameworks" scripts/build-libreoffice.sh
|
||||
build -p ely-lok --bin ely-lok-worker
|
||||
cp "$root/target/$profile/ely-lok-worker" "$app/Contents/MacOS/"
|
||||
# The kernel alone, in LibreOffice's layout: nothing to register.
|
||||
mkdir -p "$app/Contents/Frameworks"
|
||||
ditto "$lo/Contents/Frameworks" "$app/Contents/Frameworks"
|
||||
ditto "$lo/Contents/Resources" "$app/Contents/Resources"
|
||||
inner+=("$app/Contents/MacOS/ely-lok-worker")
|
||||
while IFS= read -r binary; do
|
||||
if file -b "$binary" | grep -q '^Mach-O'; then
|
||||
inner+=("$binary")
|
||||
elif [ "$(cat "$binary")" = "invalid - merged lib" ]; then
|
||||
# Merged-library builds leave these placeholders.
|
||||
rm "$binary"
|
||||
else
|
||||
echo "bundle.sh: $binary is not code; Frameworks holds only code" >&2
|
||||
exit 1
|
||||
fi
|
||||
done < <(find "$app/Contents/Frameworks" -type f -not -path "*/Chromium Embedded Framework.framework/*")
|
||||
fi
|
||||
if uses ely-pdf-engine; then
|
||||
tessdata=${ELY_TESSDATA:-$root/engines/tessdata}
|
||||
need "$tessdata/eng.traineddata" scripts/fetch-tessdata.sh
|
||||
build -p ely-pdf-engine --bin ely-pdf-worker
|
||||
cp "$root/target/$profile/ely-pdf-worker" "$app/Contents/MacOS/"
|
||||
mkdir "$app/Contents/Resources/tessdata"
|
||||
cp "$tessdata"/{eng,chi_sim,chi_tra}.traineddata "$app/Contents/Resources/tessdata/"
|
||||
inner+=("$app/Contents/MacOS/ely-pdf-worker")
|
||||
fi
|
||||
if [ "$slug" = ely-tree ]; then
|
||||
need "$root/engines/git/bin/git" "scripts/build-git.sh and scripts/fetch-git-lfs.sh"
|
||||
ditto "$root/engines/git" "$app/Contents/Resources/git"
|
||||
while IFS= read -r binary; do
|
||||
file -b "$binary" | grep -q '^Mach-O' && inner+=("$binary")
|
||||
done < <(find "$app/Contents/Resources/git" -type f -perm -111)
|
||||
fi
|
||||
# Web content apps carry CEF and their bundled pages.
|
||||
framework=
|
||||
helpers=()
|
||||
if grep -q '^ely-web-content' "$root/apps/$slug/Cargo.toml"; then
|
||||
cef=${ELY_CEF:-$root/engines/cef}
|
||||
[ -d "$cef/Chromium Embedded Framework.framework" ] || {
|
||||
echo "bundle.sh: no CEF at $cef; run scripts/fetch-cef.sh" >&2
|
||||
exit 1
|
||||
}
|
||||
mkdir -p "$app/Contents/Frameworks"
|
||||
framework="$app/Contents/Frameworks/Chromium Embedded Framework.framework"
|
||||
cp -R "$cef/Chromium Embedded Framework.framework" "$framework"
|
||||
case $profile in
|
||||
release) cargo build --manifest-path "$root/Cargo.toml" --release -p ely-web-content --bin ely-web-helper ;;
|
||||
debug) cargo build --manifest-path "$root/Cargo.toml" -p ely-web-content --bin ely-web-helper ;;
|
||||
esac
|
||||
# Chromium looks for these five, named after the app's binary.
|
||||
for kind in "" " (GPU)" " (Renderer)" " (Plugin)" " (Alerts)"; do
|
||||
helper="$slug Helper$kind"
|
||||
contents="$app/Contents/Frameworks/$helper.app/Contents"
|
||||
mkdir -p "$contents/MacOS"
|
||||
cp "$root/target/$profile/ely-web-helper" "$contents/MacOS/$helper"
|
||||
id=$(echo "${slug#ely-}.helper$kind" | tr -d '()' | tr ' ' '.' | tr 'A-Z' 'a-z')
|
||||
cat >"$contents/Info.plist" <<HELPER
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key><string>$helper</string>
|
||||
<key>CFBundleIdentifier</key><string>$prefix.$id</string>
|
||||
<key>CFBundleName</key><string>$helper</string>
|
||||
<key>CFBundlePackageType</key><string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key><string>$version</string>
|
||||
<key>LSMinimumSystemVersion</key><string>14.0</string>
|
||||
<key>LSUIElement</key><string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
HELPER
|
||||
helpers+=("$app/Contents/Frameworks/$helper.app")
|
||||
done
|
||||
content=$root/engines/content/$slug
|
||||
[ -f "$content/index.html" ] || {
|
||||
echo "bundle.sh: no page at $content; run its scripts/build-*-content.sh" >&2
|
||||
exit 1
|
||||
}
|
||||
cp -R "$content" "$app/Contents/Resources/content"
|
||||
fi
|
||||
"$root/packaging/licenses.sh" "$slug" "$app/Contents/Resources/Licenses"
|
||||
cat >"$app/Contents/Info.plist" <<PLIST
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key><string>$slug</string>
|
||||
<key>CFBundleIconFile</key><string>$slug</string>
|
||||
<key>CFBundleIdentifier</key><string>$prefix.${slug#ely-}</string>
|
||||
<key>CFBundleName</key><string>$name</string>
|
||||
<key>CFBundlePackageType</key><string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key><string>$version</string>
|
||||
<key>CFBundleVersion</key><string>$version</string>
|
||||
<key>LSApplicationCategoryType</key><string>public.app-category.productivity</string>
|
||||
<key>LSMinimumSystemVersion</key><string>14.0</string>
|
||||
<key>NSHighResolutionCapable</key><true/>
|
||||
<key>NSHumanReadableCopyright</key><string>ZacharyZhang, zacharyzhang.com</string>
|
||||
$("$root/packaging/macos/documents.sh" "$slug")
|
||||
</dict>
|
||||
</plist>
|
||||
PLIST
|
||||
# Nested code is signed before the app that holds it.
|
||||
for target in ${inner[@]+"${inner[@]}"} ${framework:+"$framework"} ${helpers[@]+"${helpers[@]}"} "$app"; do
|
||||
if [ "$identity" = - ]; then
|
||||
codesign --force --sign - "$target"
|
||||
else
|
||||
# Hardened runtime: V8 in CEF's helpers needs its entitlements.
|
||||
entitled=()
|
||||
case $target in
|
||||
*" Helper (Renderer).app") entitled=(--entitlements "$root/packaging/macos/entitlements/renderer.plist") ;;
|
||||
*" Helper (GPU).app") entitled=(--entitlements "$root/packaging/macos/entitlements/gpu.plist") ;;
|
||||
*" Helper (Plugin).app") entitled=(--entitlements "$root/packaging/macos/entitlements/plugin.plist") ;;
|
||||
esac
|
||||
codesign --force --options runtime --timestamp ${entitled[@]+"${entitled[@]}"} --sign "$identity" "$target"
|
||||
fi
|
||||
done
|
||||
echo "$app"
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# Prints the app's CFBundleDocumentTypes. Usage: documents.sh <slug>
|
||||
set -euo pipefail
|
||||
|
||||
# role, then the content types it opens.
|
||||
case ${1:?app slug} in
|
||||
ely-doc) set -- Editor org.openxmlformats.wordprocessingml.document org.oasis-open.opendocument.text \
|
||||
com.microsoft.word.doc public.rtf ;;
|
||||
ely-table) set -- Editor org.openxmlformats.spreadsheetml.sheet org.oasis-open.opendocument.spreadsheet \
|
||||
com.microsoft.excel.xls public.comma-separated-values-text public.tab-separated-values-text ;;
|
||||
ely-show) set -- Editor org.openxmlformats.presentationml.presentation \
|
||||
org.oasis-open.opendocument.presentation com.microsoft.powerpoint.ppt ;;
|
||||
ely-pdf) set -- Editor com.adobe.pdf ;;
|
||||
ely-mark) set -- Editor net.daringfireball.markdown ;;
|
||||
ely-tree) set -- Viewer public.folder ;;
|
||||
*) exit 0 ;;
|
||||
esac
|
||||
role=$1
|
||||
shift
|
||||
echo " <key>CFBundleDocumentTypes</key><array><dict>"
|
||||
echo " <key>CFBundleTypeRole</key><string>$role</string>"
|
||||
echo " <key>LSHandlerRank</key><string>Alternate</string>"
|
||||
echo " <key>LSItemContentTypes</key><array>"
|
||||
for type in "$@"; do echo " <string>$type</string>"; done
|
||||
echo " </array>"
|
||||
echo " </dict></array>"
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key><true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key><true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key><true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: release.sh [batch]; a dmg per app of the batch.
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
batch=${1:-1}
|
||||
dist=${ELY_DIST:-$root/dist}
|
||||
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
|
||||
arch=$(uname -m)
|
||||
[ -z "${ELY_NOTARY_PROFILE:-}" ] || [ -n "${ELY_SIGN_IDENTITY:-}" ] || {
|
||||
echo "release.sh: notarizing needs ELY_SIGN_IDENTITY, a Developer ID" >&2
|
||||
exit 1
|
||||
}
|
||||
# Our source as published: the committed tree.
|
||||
source=$dist/ElyOffice-$version-source.tar.gz
|
||||
mkdir -p "$dist"
|
||||
git -C "$root" archive --format=tar.gz --prefix="ElyOffice-$version/" -o "$source" HEAD
|
||||
echo "$source"
|
||||
# Copyleft upstream as shipped: patched MuPDF (AGPL), Git (GPLv2).
|
||||
upstream=$dist/ElyOffice-$version-upstream-source.tar.gz
|
||||
[ -f "$root/engines/mupdf-src/COPYING" ] || { echo "release.sh: no engines/mupdf-src; run the MuPDF build" >&2; exit 1; }
|
||||
tar -czf "$upstream" --exclude .git --exclude .DS_Store \
|
||||
-C "$root/engines" mupdf-src -C "$root/reference" git
|
||||
echo "$upstream"
|
||||
awk -F'\t' -v batch="$batch" '$4 == batch { print $1 "\t" $2 }' "$root/packaging/apps.tsv" |
|
||||
while IFS=$'\t' read -r slug name; do
|
||||
"$root/packaging/macos/bundle.sh" "$slug" release
|
||||
codesign --verify --deep --strict "$dist/$name.app"
|
||||
dmg=$dist/$name-$version-$arch.dmg
|
||||
rm -f "$dmg"
|
||||
hdiutil create -quiet -volname "$name" -srcfolder "$dist/$name.app" -format UDZO "$dmg"
|
||||
if [ -n "${ELY_NOTARY_PROFILE:-}" ]; then
|
||||
codesign --force --timestamp --sign "$ELY_SIGN_IDENTITY" "$dmg"
|
||||
xcrun notarytool submit "$dmg" --keychain-profile "$ELY_NOTARY_PROFILE" --wait
|
||||
xcrun stapler staple "$dmg"
|
||||
else
|
||||
echo "release.sh: $dmg is not notarized (no ELY_NOTARY_PROFILE)" >&2
|
||||
fi
|
||||
echo "$dmg"
|
||||
done
|
||||
rm -rf "$root/target/release/incremental"
|
||||
@@ -0,0 +1,16 @@
|
||||
ely-doc docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
ely-doc odt application/vnd.oasis.opendocument.text
|
||||
ely-doc doc application/msword
|
||||
ely-doc rtf application/rtf
|
||||
ely-table xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
ely-table ods application/vnd.oasis.opendocument.spreadsheet
|
||||
ely-table xls application/vnd.ms-excel
|
||||
ely-table csv text/csv
|
||||
ely-table tsv text/tab-separated-values
|
||||
ely-show pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
ely-show odp application/vnd.oasis.opendocument.presentation
|
||||
ely-show ppt application/vnd.ms-powerpoint
|
||||
ely-pdf pdf application/pdf
|
||||
ely-mark md text/markdown
|
||||
ely-mark markdown text/markdown
|
||||
ely-tree / inode/directory
|
||||
|
@@ -0,0 +1,77 @@
|
||||
; Per-user installer; pass APP_NAME, APP_SLUG, VERSION, EXE, ICON, TYPES.
|
||||
Unicode true
|
||||
!include "MUI2.nsh"
|
||||
|
||||
!ifndef APP_NAME
|
||||
!error "pass -DAPP_NAME"
|
||||
!endif
|
||||
!ifndef APP_SLUG
|
||||
!error "pass -DAPP_SLUG"
|
||||
!endif
|
||||
!ifndef VERSION
|
||||
!error "pass -DVERSION"
|
||||
!endif
|
||||
!ifndef EXE
|
||||
!error "pass -DEXE"
|
||||
!endif
|
||||
!ifndef ICON
|
||||
!error "pass -DICON"
|
||||
!endif
|
||||
!ifndef TYPES
|
||||
!error "pass -DTYPES, from packaging/windows/types.sh"
|
||||
!endif
|
||||
!include "${TYPES}"
|
||||
!ifndef OUTFILE
|
||||
!define OUTFILE "${APP_SLUG}-${VERSION}-setup.exe"
|
||||
!endif
|
||||
!define UNINSTALL_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ely Office ${APP_NAME}"
|
||||
|
||||
!define MUI_ICON "${ICON}"
|
||||
!define MUI_UNICON "${ICON}"
|
||||
Name "${APP_NAME}"
|
||||
OutFile "${OUTFILE}"
|
||||
RequestExecutionLevel user
|
||||
InstallDir "$LOCALAPPDATA\Programs\Ely Office\${APP_NAME}"
|
||||
InstallDirRegKey HKCU "Software\Ely Office\${APP_NAME}" "InstallDir"
|
||||
SetCompressor /SOLID lzma
|
||||
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
LangString DeleteData ${LANG_SIMPCHINESE} "同时删除 ${APP_NAME} 的缓存、账号与本地历史吗?你的文档不受影响。"
|
||||
LangString DeleteData ${LANG_ENGLISH} "Also delete the cache, accounts and local history of ${APP_NAME}? Your documents stay."
|
||||
|
||||
Section "Install"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "/oname=${APP_SLUG}.exe" "${EXE}"
|
||||
File "/oname=${APP_SLUG}.ico" "${ICON}"
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
CreateShortcut "$SMPROGRAMS\${APP_NAME}.lnk" "$INSTDIR\${APP_SLUG}.exe" "" "$INSTDIR\${APP_SLUG}.ico"
|
||||
WriteRegStr HKCU "Software\Ely Office\${APP_NAME}" "InstallDir" "$INSTDIR"
|
||||
WriteRegStr HKCU "${UNINSTALL_KEY}" "DisplayName" "${APP_NAME}"
|
||||
WriteRegStr HKCU "${UNINSTALL_KEY}" "Publisher" "ZacharyZhang"
|
||||
WriteRegStr HKCU "${UNINSTALL_KEY}" "URLInfoAbout" "https://zacharyzhang.com"
|
||||
WriteRegStr HKCU "${UNINSTALL_KEY}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr HKCU "${UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\${APP_SLUG}.ico"
|
||||
WriteRegStr HKCU "${UNINSTALL_KEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegDWORD HKCU "${UNINSTALL_KEY}" "NoModify" 1
|
||||
!insertmacro ElyTypesInstall
|
||||
SectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
Delete "$INSTDIR\${APP_SLUG}.exe"
|
||||
Delete "$INSTDIR\${APP_SLUG}.ico"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
RMDir "$INSTDIR"
|
||||
Delete "$SMPROGRAMS\${APP_NAME}.lnk"
|
||||
DeleteRegKey HKCU "Software\Ely Office\${APP_NAME}"
|
||||
DeleteRegKey HKCU "${UNINSTALL_KEY}"
|
||||
!insertmacro ElyTypesUninstall
|
||||
MessageBox MB_YESNO|MB_DEFBUTTON2 "$(DeleteData)" IDNO done
|
||||
RMDir /r "$LOCALAPPDATA\ElyOffice\${APP_SLUG}"
|
||||
done:
|
||||
SectionEnd
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
# Prints NSIS macros registering <slug>'s types, never as default.
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
slug=${1:?app slug, such as ely-doc}
|
||||
name=$(awk -F'\t' -v slug="$slug" '$1 == slug { print $2 }' "$root/packaging/apps.tsv")
|
||||
[ -n "$name" ] || { echo "types.sh: unknown app $slug" >&2; exit 1; }
|
||||
progid="ElyOffice.$name"
|
||||
classes='Software\Classes'
|
||||
exts=$(awk -F'\t' -v slug="$slug" '$1 == slug && $2 != "/" { print $2 }' "$root/packaging/types.tsv")
|
||||
folder=$(awk -F'\t' -v slug="$slug" '$1 == slug && $2 == "/" { print "yes" }' "$root/packaging/types.tsv")
|
||||
|
||||
# Open With lists the app; the user's default stays theirs.
|
||||
echo '!macro ElyTypesInstall'
|
||||
if [ -n "$exts" ]; then
|
||||
echo " WriteRegStr HKCU \"$classes\\$progid\" \"\" \"$name\""
|
||||
echo " WriteRegStr HKCU \"$classes\\$progid\\DefaultIcon\" \"\" \"\$INSTDIR\\$slug.ico\""
|
||||
echo " WriteRegStr HKCU \"$classes\\$progid\\shell\\open\\command\" \"\" '\"\$INSTDIR\\$slug.exe\" \"%1\"'"
|
||||
echo " WriteRegStr HKCU \"$classes\\Applications\\$slug.exe\" \"FriendlyAppName\" \"$name\""
|
||||
for ext in $exts; do
|
||||
echo " WriteRegStr HKCU \"$classes\\.$ext\\OpenWithProgids\" \"$progid\" \"\""
|
||||
echo " WriteRegStr HKCU \"$classes\\Applications\\$slug.exe\\SupportedTypes\" \".$ext\" \"\""
|
||||
done
|
||||
fi
|
||||
if [ -n "$folder" ]; then
|
||||
echo " WriteRegStr HKCU \"$classes\\Directory\\shell\\$progid\" \"\" \"Open in $name\""
|
||||
echo " WriteRegStr HKCU \"$classes\\Directory\\shell\\$progid\" \"Icon\" \"\$INSTDIR\\$slug.ico\""
|
||||
echo " WriteRegStr HKCU \"$classes\\Directory\\shell\\$progid\\command\" \"\" '\"\$INSTDIR\\$slug.exe\" \"%1\"'"
|
||||
fi
|
||||
echo ' System::Call "shell32::SHChangeNotify(i 0x08000000, i 0, p 0, p 0)"'
|
||||
echo '!macroend'
|
||||
|
||||
echo '!macro ElyTypesUninstall'
|
||||
if [ -n "$exts" ]; then
|
||||
echo " DeleteRegKey HKCU \"$classes\\$progid\""
|
||||
echo " DeleteRegKey HKCU \"$classes\\Applications\\$slug.exe\""
|
||||
for ext in $exts; do
|
||||
echo " DeleteRegValue HKCU \"$classes\\.$ext\\OpenWithProgids\" \"$progid\""
|
||||
done
|
||||
fi
|
||||
if [ -n "$folder" ]; then
|
||||
echo " DeleteRegKey HKCU \"$classes\\Directory\\shell\\$progid\""
|
||||
fi
|
||||
echo ' System::Call "shell32::SHChangeNotify(i 0x08000000, i 0, p 0, p 0)"'
|
||||
echo '!macroend'
|
||||
Reference in new issue
Block a user