übernahme Code Shortcut
This commit is contained in:
1415
scripts/build-shotcut-msys2.sh
Normal file
1415
scripts/build-shotcut-msys2.sh
Normal file
File diff suppressed because it is too large
Load Diff
2304
scripts/build-shotcut.sh
Normal file
2304
scripts/build-shotcut.sh
Normal file
File diff suppressed because it is too large
Load Diff
53
scripts/codesign_and_notarize.sh
Normal file
53
scripts/codesign_and_notarize.sh
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
VERSION="$1"
|
||||
sudo xcode-select -s /Applications/Xcode.app/
|
||||
|
||||
SIGNER="Developer ID Application: Meltytech, LLC (Y6RX44QG2G)"
|
||||
find ~/Desktop/Shotcut.app -type d -name __pycache__ -exec rm -r {} \+
|
||||
find ~/Desktop/Shotcut.app/Contents \( -name '*.o' -or -name '*.a' -or -name '*.dSYM' \) -exec rm {} \;
|
||||
xattr -cr ~/Desktop/Shotcut.app
|
||||
|
||||
# Strip any pre-existing signatures so we can overwrite (Qt SDK, etc.)
|
||||
find ~/Desktop/Shotcut.app/Contents -type f \( -name '*.dylib' -o -name '*.so' \) -exec \
|
||||
codesign --remove-signature {} \; 2>/dev/null || true
|
||||
find ~/Desktop/Shotcut.app/Contents -type d -name '*.framework' -exec \
|
||||
codesign --remove-signature {} \; 2>/dev/null || true
|
||||
find ~/Desktop/Shotcut.app/Contents/MacOS -type f -exec \
|
||||
codesign --remove-signature {} \; 2>/dev/null || true
|
||||
|
||||
# Re-sign all dylibs and plugins
|
||||
find ~/Desktop/Shotcut.app/Contents -type f \( -name '*.dylib' -o -name '*.so' \) -exec \
|
||||
codesign --options=runtime --timestamp --force --verbose --sign "$SIGNER" \
|
||||
--preserve-metadata=identifier,entitlements \
|
||||
{} \;
|
||||
|
||||
# Re-sign executables with entitlements
|
||||
find ~/Desktop/Shotcut.app/Contents/MacOS -type f -exec \
|
||||
codesign --options=runtime --timestamp --force --verbose --sign "$SIGNER" \
|
||||
--preserve-metadata=identifier,entitlements \
|
||||
--entitlements ./notarization.entitlements \
|
||||
{} \;
|
||||
|
||||
# Re-sign the app bundle last
|
||||
codesign --options=runtime --timestamp --force --verbose --sign "$SIGNER" \
|
||||
--preserve-metadata=identifier,entitlements \
|
||||
--entitlements ./notarization.entitlements --generate-entitlement-der \
|
||||
~/Desktop/Shotcut.app
|
||||
|
||||
codesign --verify --deep --strict --verbose=4 ~/Desktop/Shotcut.app
|
||||
spctl -a -t exec -vv ~/Desktop/Shotcut.app
|
||||
|
||||
TMP=$(mktemp -d)
|
||||
mv ~/Desktop/Shotcut.app $TMP
|
||||
ln -s /Applications $TMP
|
||||
cp ../COPYING $TMP
|
||||
rm ~/Desktop/shotcut-macos-${VERSION}.dmg
|
||||
hdiutil create -srcfolder $TMP -volname Shotcut -format UDBZ -size 1500m \
|
||||
~/Desktop/shotcut-macos-${VERSION}.dmg
|
||||
rm -rf $TMP
|
||||
|
||||
./notarize.sh ~/Desktop/shotcut-macos-${VERSION}.dmg
|
||||
./staple.sh ~/Desktop/shotcut-macos-${VERSION}.dmg
|
||||
|
||||
echo Now run:
|
||||
echo sudo xcode-select -s /Library/Developer/CommandLineTools
|
||||
34
scripts/ffmpeg-codecs.sh
Normal file
34
scripts/ffmpeg-codecs.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
ffmpeg -codecs -hide_banner | awk '(substr($1,2,1) == "E" && substr($1,3,1) == "V" && substr($1,4,1) == "I") {
|
||||
i = index($0, "(encoders:")
|
||||
if (i > 0) {
|
||||
split(substr($0, i), a)
|
||||
for (i = 2; i < length(a); i++)
|
||||
print "m_intraOnlyCodecs << \"" a[i] "\";"
|
||||
} else {
|
||||
print "m_intraOnlyCodecs << \"" $2 "\";"
|
||||
}
|
||||
}'
|
||||
echo
|
||||
ffmpeg -codecs -hide_banner | awk '(substr($1,2,1) == "E" && substr($1,3,1) == "V" && substr($1,5,2) == ".S") {
|
||||
i = index($0, "(encoders:")
|
||||
if (i > 0) {
|
||||
split(substr($0, i), a)
|
||||
for (i = 2; i < length(a); i++)
|
||||
print "m_losslessVideoCodecs << \"" a[i] "\";"
|
||||
} else {
|
||||
print "m_losslessVideoCodecs << \"" $2 "\";"
|
||||
}
|
||||
}'
|
||||
echo
|
||||
ffmpeg -codecs -hide_banner | awk '(substr($1,2,1) == "E" && substr($1,3,1) == "A" && substr($1,5,2) == ".S") {
|
||||
i = index($0, "(encoders:")
|
||||
if (i > 0) {
|
||||
split(substr($0, i), a)
|
||||
for (i = 2; i < length(a); i++)
|
||||
print "m_losslessAudioCodecs << \"" a[i] "\";"
|
||||
} else {
|
||||
print "m_losslessAudioCodecs << \"" $2 "\";"
|
||||
}
|
||||
}'
|
||||
24
scripts/ffmpeg8-scale_d3d-refleak.patch
Normal file
24
scripts/ffmpeg8-scale_d3d-refleak.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
--- libavfilter/vf_scale_d3d11.c.orig 2025-12-11 20:55:58.868401500 -0800
|
||||
+++ libavfilter/vf_scale_d3d11.c 2025-12-11 21:28:08.890852000 -0800
|
||||
@@ -340,13 +340,6 @@
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
- ///< Propagate hw_frames_ctx to output
|
||||
- outl->hw_frames_ctx = av_buffer_ref(inl->hw_frames_ctx);
|
||||
- if (!outl->hw_frames_ctx) {
|
||||
- av_log(ctx, AV_LOG_ERROR, "Failed to propagate hw_frames_ctx to output\n");
|
||||
- return AVERROR(ENOMEM);
|
||||
- }
|
||||
-
|
||||
///< Initialize filter's hardware device context
|
||||
if (!s->hw_device_ctx) {
|
||||
AVHWFramesContext *in_frames_ctx = (AVHWFramesContext *)inl->hw_frames_ctx->data;
|
||||
@@ -394,6 +387,7 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ ///< Propagate hw_frames_ctx to output
|
||||
outl->hw_frames_ctx = av_buffer_ref(s->hw_frames_ctx_out);
|
||||
if (!outl->hw_frames_ctx)
|
||||
return AVERROR(ENOMEM);
|
||||
114
scripts/make-ico.py
Normal file
114
scripts/make-ico.py
Normal file
@@ -0,0 +1,114 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
"""
|
||||
make-ico.py
|
||||
|
||||
LICENSE: This program is put into the public domain by James Stroud, 2008.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import base64
|
||||
|
||||
win16map = """\
|
||||
UDYKMTYgMQoyNTUKAAAAgAAAAP//AP8AwMDAAICA/wD//wAAgICAAACAgACA//////8AAIAAgIAA
|
||||
AAD/
|
||||
"""
|
||||
|
||||
def err(msg):
|
||||
sys.stderr.write("%s\n" % msg)
|
||||
|
||||
def usage(err_msg=None):
|
||||
if err_msg is not None:
|
||||
err("\n** ERROR **: %s\n" % err_msg)
|
||||
progname = os.path.basename(sys.argv[0])
|
||||
err("usage: python %s imagefile\n" % progname)
|
||||
sys.exit()
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
png_file = sys.argv[1]
|
||||
except IndexError:
|
||||
usage('No image file given.')
|
||||
|
||||
if not os.path.exists(png_file):
|
||||
usage('The image file given (%s) does not exist.' % png_file)
|
||||
|
||||
png_base, extension = os.path.basename(png_file).rsplit('.', 1)
|
||||
|
||||
|
||||
to_delete = []
|
||||
|
||||
sizes = [48, 32, 24, 16]
|
||||
depths = [4, 8, 24]
|
||||
|
||||
# these commands are redundant at this point
|
||||
# however, if this is generalized, this will need to be done
|
||||
# to ensure the final .ico file is created correctly
|
||||
sizes.sort(reverse=True)
|
||||
depths.sort()
|
||||
|
||||
to_map = {}
|
||||
for size in sizes:
|
||||
name_args = (png_base, size, size)
|
||||
resized_base = "%s-%02dx%02d" % name_args
|
||||
resized_name = "%s.png" % resized_base
|
||||
resize_args = (png_file, size, size, resized_name)
|
||||
command = 'convert %s -resize %dx%d %s' % resize_args
|
||||
err(command)
|
||||
os.system(command)
|
||||
to_map[size] = resized_base
|
||||
to_delete.append(resized_name)
|
||||
|
||||
ico_parts = []
|
||||
for depth in depths:
|
||||
for size in sizes:
|
||||
resized_base = to_map[size]
|
||||
resized_name = "%s.png" % resized_base
|
||||
redepthed_base = "%s-%02d" % (resized_base, depth)
|
||||
redepthed_name = "%s.pnm" % redepthed_base
|
||||
redepth_args = (depth, resized_name, redepthed_name)
|
||||
if depth >= 8:
|
||||
command = "convert -depth %d %s %s" % redepth_args
|
||||
else:
|
||||
command = "convert %s %s" % (resized_name, redepthed_name)
|
||||
err(command)
|
||||
os.system(command)
|
||||
to_delete.append(redepthed_name)
|
||||
map_base = "%s-%02d" % (resized_base, depth)
|
||||
map_name = "%s.pam" % map_base
|
||||
if depth >= 8:
|
||||
colors = 256
|
||||
map_args = (colors, redepthed_name, map_name)
|
||||
command = "pnmcolormap %d %s > %s" % map_args
|
||||
err(command)
|
||||
os.system(command)
|
||||
else:
|
||||
# for the < 8 bit images, we don't need to calculate the map
|
||||
open(map_name, 'wb').write(base64.decodestring(win16map))
|
||||
to_delete.append(map_name)
|
||||
remapped_base = map_base
|
||||
remapped_name = "%s.ppm" % remapped_base
|
||||
remap_args = (map_name, redepthed_name, remapped_name)
|
||||
command = "pnmremap -mapfile=%s -fs %s > %s" % remap_args
|
||||
err(command)
|
||||
os.system(command)
|
||||
to_delete.append(remapped_name)
|
||||
ico_parts.append(remapped_name)
|
||||
|
||||
|
||||
icon_names = " ".join(ico_parts)
|
||||
icon_name = "%s.ico" % png_base
|
||||
icon_args = (icon_names, icon_name)
|
||||
|
||||
command = 'ppmtowinicon %s --output %s' % icon_args
|
||||
err(command)
|
||||
os.system(command)
|
||||
|
||||
err("rm %s" % " ".join(to_delete))
|
||||
for p in to_delete:
|
||||
os.remove(p)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
20
scripts/notarization.entitlements
Normal file
20
scripts/notarization.entitlements
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
|
||||
<array>
|
||||
<string>com.apple.screencapture.interactive</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
2
scripts/notarize.sh
Normal file
2
scripts/notarize.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
xcrun notarytool submit --wait --keychain-profile notarytool "$1"
|
||||
13
scripts/optimize-png.sh
Normal file
13
scripts/optimize-png.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# Script to optimize and compress png impage files to reduce size.
|
||||
# All operations are lossless
|
||||
# Requires optipng and advpng
|
||||
# In Ubuntu: "sudo apt-get install advancecomp optipng"
|
||||
|
||||
files=`find icons/ -name '*.PNG' -o -name '*.png'`
|
||||
|
||||
optipng -o 7 $files
|
||||
advpng -z -4 -i 25 $files
|
||||
# Sometimes 7z is actually smaller than zopfli
|
||||
advpng -z -3 -i 25 $files
|
||||
|
||||
3
scripts/staple.sh
Normal file
3
scripts/staple.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
xcrun stapler staple "$1"
|
||||
|
||||
1
scripts/update-dark-all.sh
Normal file
1
scripts/update-dark-all.sh
Normal file
@@ -0,0 +1 @@
|
||||
for f in light/32x32/*.png; do convert "$f" -negate -brightness-contrast -11.5 $(echo "$f" | sed 's/light/dark/'); done
|
||||
3
scripts/update-dark.sh
Normal file
3
scripts/update-dark.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
convert "$1" -negate -brightness-contrast -11.5 $(echo "$1" | sed 's/light/dark/')
|
||||
|
||||
16
scripts/update-tx.sh
Normal file
16
scripts/update-tx.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
tx pull --all --force
|
||||
pushd translations
|
||||
|
||||
mv shotcut_cs_CZ.ts shotcut_cs.ts
|
||||
mv shotcut_da_DK.ts shotcut_da.ts
|
||||
mv shotcut_el_GR.ts shotcut_el.ts
|
||||
mv shotcut_hu_HU.ts shotcut_hu.ts
|
||||
mv shotcut_it_IT.ts shotcut_it.ts
|
||||
mv shotcut_ku_IQ.ts shotcut_ku.ts
|
||||
mv shotcut_nl_NL.ts shotcut_nl.ts
|
||||
mv shotcut_tr_TR.ts shotcut_tr.ts
|
||||
popd
|
||||
|
||||
git restore translations/shotcut_en.ts
|
||||
|
||||
56
scripts/versiondiff.sh
Normal file
56
scripts/versiondiff.sh
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
catIfValid() {
|
||||
cat $1 2>/dev/null
|
||||
}
|
||||
|
||||
printVersions() {
|
||||
VERSIONFILEPATH=$1
|
||||
if [ $(basename $VERSIONFILEPATH) = "versions" ]; then
|
||||
cat $VERSIONFILEPATH
|
||||
elif catIfValid $VERSIONFILEPATH/Shotcut.app/versions; then
|
||||
return 0
|
||||
elif catIfValid $VERSIONFILEPATH/Shotcut/Shotcut.app/versions; then
|
||||
return 0
|
||||
elif file $VERSIONFILEPATH | grep -q "compressed data"; then
|
||||
>&2 echo "Reading version from $VERSIONFILEPATH"...
|
||||
tar xOf $VERSIONFILEPATH Shotcut/Shotcut.app/versions
|
||||
if [ "$?" -ne "0" ]; then
|
||||
>&2 echo No versions file found in $VERSIONFILEPATH
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
oldVersion=$(mktemp)
|
||||
newVersion=$(mktemp)
|
||||
trap "rm -f $oldVersion $newVersion" EXIT
|
||||
|
||||
printVersions $1 > $oldVersion
|
||||
printVersions $2 > $newVersion
|
||||
|
||||
cd $(dirname $0)/../../
|
||||
|
||||
cat $oldVersion | while read dir sha; do
|
||||
pushd $dir > /dev/null
|
||||
|
||||
oldsha=$sha
|
||||
newsha=$(egrep "^$dir" $newVersion | cut -f2 -d' ')
|
||||
if [ "$oldsha" = "$newsha" ]; then
|
||||
echo $dir: No new commits
|
||||
popd > /dev/null
|
||||
continue
|
||||
fi
|
||||
sharange=$oldsha..$newsha
|
||||
commitcount=$(git rev-list $sharange | wc -l)
|
||||
|
||||
echo
|
||||
echo ---- $dir: $commitcount new commits
|
||||
git log --oneline $sharange
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
Reference in New Issue
Block a user