Skip to content

Instantly share code, notes, and snippets.

View Benitoite's full-sized avatar
🇺🇸
¡Packaging for macOS notaryservices!

Richard E Barber Benitoite

🇺🇸
¡Packaging for macOS notaryservices!
View GitHub Profile
@Benitoite
Benitoite / amazetimer
Last active September 12, 2024 15:48
rawtherapee amaze timer for macos zsh
intel:
curl -L https://github.com/Benitoite/raw-test/releases/download/3FR/B0001131.3FR -o B0001131.3FR ; curl -L https://github.com/Benitoite/raw-test/releases/download/3FR/B0001131.3FR.pp3 -o B0001131.3FR.pp3 ; num=$(sysctl -n hw.physicalcpu) ; sockets=1 ; total_threads=$((num * sockets)) ; name=$(system_profiler SPHardwareDataType | grep 'Processor Name:' | sed 's/Processor Name: *//' | cut -c 7-) ; mhz=$(system_profiler SPHardwareDataType | grep 'Speed:' | awk '{print $3}') ; proc=$(cat ./AboutThisBuild.txt | grep 'Processor') ; echo "\`\`\`" ; echo "================================" ; echo "Available threads = $total_threads / CPU = $name / $mhz GHz / Target = $proc" ; for (( threads = 2; threads <= total_threads; threads *= 2 )); do export OMP_NUM_THREADS=$threads ; total_time=0.0 ; n=11 ; for file in B0001131.3FR ; do time_sum=0.0 ; for (( i = 0; i < n; i++ )); do start=$(( $(date +%s%N)/1000000 )) ; rawtherapee-cli -j -s -Y -c ./$file &> /dev/null ; finished=$(( $(date +%s%N) / 1000000 )) ; time_sum=$
@Benitoite
Benitoite / mactimer
Last active September 11, 2024 07:15
RawTherapee performance timer for MacOS zsh
intel:
git clone https://github.com/Benitoite/raw-test ./raw-test ; num=$(sysctl -n hw.physicalcpu) ; sockets=1 ; total_threads=$((num * sockets)) ; name=$(system_profiler SPHardwareDataType | grep 'Processor Name:' | sed 's/Processor Name: *//' | cut -c 7-) ; mhz=$(system_profiler SPHardwareDataType | grep 'Speed:' | awk '{print $3}') ; proc=$(cat ./AboutThisBuild.txt | grep 'Processor') ; echo "\`\`\`" ; echo "================================" ; echo "Available threads = $total_threads / CPU = $name / $mhz GHz / Target = $proc" ; for (( threads = 2; threads <= total_threads; threads *= 2 )); do export OMP_NUM_THREADS=$threads ; total_time=0.0 ; n=5 ; for file in typewriter.CR2 naturalbridges.CR2 beachcabin.ARW; do time_sum=0.0 ; for (( i = 0; i < n; i++ )); do start=$(( $(date +%s%N)/1000000 )) ; rawtherapee-cli -j -s -Y -c ./raw-test/$file &> /dev/null ; finished=$(( $(date +%s%N) / 1000000 )) ; time_sum=$(( $time_sum + $finished - $start )) ; done ; avg_time=$(( $time_sum / $n )) ; total_time=$(( $total_t
@Benitoite
Benitoite / wintimer.csv
Created September 7, 2024 12:57
CSV results of wintimer testing
44807 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz skylake-raptorlake 3408 2
30655 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz skylake-raptorlake 3408 4
26047 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz skylake-raptorlake 3408 8
45756 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz sandybridge-ivybridge 3408 2
30946 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz sandybridge-ivybridge 3408 4
26819 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz sandybridge-ivybridge 3408 8
45781 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz x86 3408 2
30916 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz x86 3408 4
26355 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz x86 3408 8
40640 AMD EPYC 7763 64-Core Processor skylake-raptorlake 2445 2
@Benitoite
Benitoite / zshtimer
Last active September 15, 2024 00:57
RawTherapee linux zsh performance timer
git clone https://github.com/Benitoite/raw-test ./raw-test ; num=$(nproc) ; sockets=$(lscpu | grep 'Socket(s):' | awk '{print $2}') ; total_threads=$((num * sockets)) ; name=$(lscpu | grep 'Model name:' | sed 's/Model name: *//') ; mhz=$(lscpu | grep 'CPU max MHz:' | awk '{print $4}') ; proc=$(cat ./AboutThisBuild.txt | grep 'Processor') ; echo "\`\`\`" ; echo "================================" ; echo "Available threads = $total_threads / CPU = $name / $mhz MHz / Target = $proc" ; for (( threads = 2; threads <= total_threads; threads *= 2 )); do export OMP_NUM_THREADS=$threads ; total_time=0.0 ; n=5 ; for file in typewriter.CR2 naturalbridges.CR2 beachcabin.ARW; do time_sum=0.0 ; for (( i = 0; i < n; i++ )); do start=$(( $(date +%s%N)/1000000 )) ; rawtherapee-cli -j -s -Y -c ./raw-test/$file &> /dev/null ; finished=$(( $(date +%s%N) / 1000000 )) ; time_sum=$(( "$time_sum + $finished - $start" )) ; done ; avg_time=$(( "$time_sum / $n" )) ; total_time=$(( "$total_time + $avg_time" )) ; done ; echo "$(printf '%.
@Benitoite
Benitoite / wintimer.ps1
Last active August 28, 2024 05:10
wintimer
git clone https://github.com/Benitoite/raw-test .\raw-test; $processor = Get-ComputerInfo -Property CsProcessors; $sockets = (Get-CimInstance Win32_Processor).SocketDesignation.Count ; $num = ($processor.CsProcessors | findstr NumberOfLogicalProcessors).Split(' ')[2]; $num *= $sockets ; $name = ($processor.CsProcessors | findstr Name).Split(':')[-1]; $mhz = ($processor.CsProcessors | findstr Max).Split(':')[-1]; $proc = (cat .\AboutThisBuild.txt | findstr Processor); echo "``````" "================================"; echo "Available threads = $num / CPU =$name / $mhz MHz / Target = $proc"; for ($threads = 2; $threads -le $num; $threads *= 2) { $env:OMP_NUM_THREADS=$threads; $t = 0; $n = 5; $x = 0; for ($i = 0; $i -lt $n; $i++) { $x+=(Measure-Command { .\rawtherapee-cli.exe -j -s -Y -c .\raw-test\typewriter.CR2 } | findstr Ticks).Split(': ')[-1] }; $t+=($x/$n); $x = 0; for ($i = 0; $i -lt $n; $i++) { $x+=(Measure-Command { .\rawtherapee-cli.exe -j -s -Y -c .\raw-test\naturalbridges.CR2 } | findstr Ticks).Split(

icon test

@Benitoite
Benitoite / buildmaxapp.sh
Created June 22, 2024 19:17
WIP: builds a MAX/MSP 8 application for App Store / Test Flight
# Convert a standalone maxmsp8 application to a mac app store application
#
# USAGE: sudo CODESIGNID="Apple Distribution: DOCTOR WHO (ABCDE12345)" TEAMID=ABCDE12345 DOM=com.mycompanyname APP=myappname sh buildmaxapp.sh
#
# Prerequisites on ~/Desktop:
# custom Max.icns
# Info.plist
# objects.txt list of objects from maxmsp
# main.entitlements
# profile.entitlements
@Benitoite
Benitoite / GO-notary
Last active May 20, 2024 04:33
How to build GrandOrgue on macOS with apple notary
arm64:
#!/bin/bash
git clone https://github.com/GrandOrgue/grandorgue.git
cd grandorgue
mkdir build && cd build
cmake -G "Unix Makefiles" -DDOCBOOK_DIR=/opt/homebrew/opt/docbook-xsl/docbook-xsl ..
make -j8
Place .app artifact on desktop of x86_64 mac.
@Benitoite
Benitoite / macos-app-icon.md
Created September 10, 2023 04:19 — forked from jamieweavis/macos-app-icon.md
How to create an .icns macOS app icon
@Benitoite
Benitoite / macpatch2
Created July 19, 2022 03:46
brings ART macos package up-to-date with RT-dev
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf204a5d2..194cf2da5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
if(APPLE)
- cmake_minimum_required(VERSION 3.5)
+ cmake_minimum_required(VERSION 3.7)
cmake_policy(SET CMP0025 NEW)
+ cmake_policy(SET CMP0037 NEW)