Compare commits

...

No commits in common. "dev" and "mac-master" have entirely different histories.

664 changed files with 1660 additions and 51571 deletions

8
.gitignore vendored
View file

@ -1,8 +0,0 @@
**/__pycache__
**/*.7z
**/*.DS_Store
**/*.bak
**/*.exe
**/*.swp
setup/BUILD*
setup/OUT*

View file

@ -0,0 +1,179 @@
#!/bin/bash
## Wizard Kit: SW Diagnostics
# Init
clear
BIN=""
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Prep /WK/Info
DATE="$(date "+%F")"
LOG_DIR="/WK/Info/${DATE}"
LOG_FILE="${LOG_DIR}/Diagnostics.log"
mkdir -p "${LOG_DIR}" 2>/dev/null
# . "$BIN/os_check"
# Setup color and message printing
export CLICOLOR=1
CLEAR="\033[0m"
RED="\033[31m"
GREEN="\033[32m"
YELLOW="\033[33m"
BLUE="\033[34m"
function print_error() {
echo -e "${RED}${1}${CLEAR}"
echo "${1}" >> "${LOG_FILE}"
}
function print_info() {
echo -e "${BLUE}${1}${CLEAR}"
echo "${1}" >> "${LOG_FILE}"
}
function print_success() {
echo -e "${GREEN}${1}${CLEAR}"
echo "${1}" >> "${LOG_FILE}"
}
function print_warning() {
echo -e "${YELLOW}${1}${CLEAR}"
echo "${1}" >> "${LOG_FILE}"
}
function print_general() {
echo "${1}"
echo "${1}" >> "${LOG_FILE}"
}
# Get Ticket #
ticket=""
while [[ "${ticket}" == "" ]]; do
echo -n "Enter the ticket number: "
read _tmp
if echo "${_tmp}" | grep -Eq '^([0-9]+[-_0-9A-Za-z]*)$'; then
ticket="${_tmp}"
fi
done
# Start
clear
print_general "Starting SW Diagnostics"
print_general " For ticket #${ticket}"
# Sanitize Environment
#TODO
# Network
print_general ""
print_general "Testing network connection..."
while ! ping -c 2 "google.com" >/dev/null 2>&1; do
print_warning "System appears offline. Please connect to the internet."
echo -n "Press Enter to try again... "
read _tmp
done
print_general " Connected."
# Infection Scan
#TODO
# OS Health
print_general ""
print_general "Checking disk permissions..."
/usr/libexec/repair_packages --verify --standard-pkgs >> "${LOG_DIR}/permissions.log" 2>/dev/null
_log_length="$(cat "${LOG_DIR}/permissions.log" | wc -l | sed 's/ //g')"
if [[ "$_log_length" -eq "0" ]]; then
print_general " No issues found."
elif [[ "$_log_length" -lt "10" ]]; then
sed 's/^/ /' "${LOG_DIR}/permissions.log" | tee -a "${LOG_FILE}"
else
head -9 "${LOG_DIR}/permissions.log" | sed 's/^/ /' | tee -a "${LOG_FILE}"
print_general " ...$(echo "$_log_length - 9" | bc) lines omitted"
fi
# Check OS/SW Updates
print_general ""
print_general "Checking for available software updates..."
softwareupdate -l | grep '*' | tee -a "${LOG_FILE}"
# Browser Backup
#TODO
# Temp file size
print_general ""
print_general "Checking temp file size..."
du -sch ~/.Trash | sed 's/^/ /' | tee -a "${LOG_FILE}"
# Save System Info
print_general ""
print_general "Saving system information..."
system_profiler -detailLevel full >> "${LOG_DIR}/system_profiler.txt"
## Installed App list
system_profiler -detailLevel full SPApplicationsDataType >> "${LOG_DIR}/installed-applications.txt"
print_general " Done."
## Save product keys
#TODO?
## OS
print_general ""
print_general "Operating System:"
sw_vers | sed 's/^/ /' | tee -a "${LOG_FILE}"
## Free Space
print_general ""
print_general "Drive details:"
system_profiler -detailLevel mini SPStorageDataType | egrep '^\s+\w+:$|Available|Capacity' | tee -a "${LOG_FILE}"
## Installed RAM
print_general ""
print_general "Installed memory:"
system_profiler -detailLevel mini SPMemoryDataType | egrep 'DIMM|Size' | sed 's/ //' | tee -a "${LOG_FILE}"
echo " Total: $(($(sysctl -a hw.memsize | sed 's/.*: //')/1024/1024/1024)) Gb" | tee -a "${LOG_FILE}"
# List installed Office Apps
print_general ""
print_general "Installed office applications:"
egrep "Microsoft Word|Microsoft Excel|Microsoft Outlook|Office|office" "${LOG_DIR}/installed-applications.txt" | egrep ':$' | sed 's/://' | tee -a "${LOG_FILE}"
# Battery
#TODO - ioreg?
# User data size
print_general ""
print_general "User data:"
pushd /Users >/dev/null
for user in $(dscl . -list /Users | grep -Ev '^(_|(daemon|nobody|root)$)'); do
print_general " $(id -F "$user") ($user)"
du -sch "$user/"* | sed 's/^/ /' | tee -a "${LOG_FILE}"
done
popd >/dev/null
# Upload results
#rsync
# Fix /WK/Info permissions
chmod -R 644 "${LOG_DIR}"
chmod 755 "${LOG_DIR}"
# Done
print_general ""
print_general "Done."
echo ""
echo -n "Press Enter to exit..."
read _tmp >/dev/null 2>&1
# Open results
/Applications/TextEdit.app/Contents/MacOS/TextEdit "${LOG_FILE}" &
# Exit
exit 0

View file

@ -0,0 +1,140 @@
#!/bin/bash
# Init
pushd . > /dev/null
cd "$(dirname "$0")/.."
mkdir install_cache >/dev/null 2>&1
cd install_cache || exit 1
TMP_DIR="$(mktemp -d 2>/dev/null || mktemp -d -t 'wktmp')"
# Functions
## code heavily borrowed from macapps.link
getApp() {
if [ -f "$1" ]; then
echo $'\360\237\214\200 - ['$2'] Copying app...'
cp -n "$1" "$2"
else
echo $'\360\237\214\200 - ['$2'] Downloading app...'
curl "$1" -L -R -f -s -o "$2" -z "$2"
fi
}
versionChecker() {
local v1=$1
local v2=$2
while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do
char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`
char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`
v1=`echo $v1 | sed "s/$char/.$char_dec/g"`
done
while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do
char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`
char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`
v2=`echo $v2 | sed "s/$char/.$char_dec/g"`
done
v1=`echo $v1 | sed 's/\.\./.0/g'`
v2=`echo $v2 | sed 's/\.\./.0/g'`
checkVersion "$v1" "$v2"
}
checkVersion() {
[ "$1" == "$2" ] && return 1
v1f=`echo $1 | cut -d "." -f -1`
v1b=`echo $1 | cut -d "." -f 2-`
v2f=`echo $2 | cut -d "." -f -1`
v2b=`echo $2 | cut -d "." -f 2-`
if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then
[[ "$v1f" -gt "$v2f" ]] && return 1
[[ "$v1f" -lt "$v2f" ]] && return 0
[[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0
[[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0
checkVersion "$v1b" "$v2b"
return $?
else
[ "$1" -gt "$2" ] && return 1 || return 0
fi
}
appStatus() {
if [ ! -d "/Applications/$1" ]; then
echo "uninstalled"
else
if [[ $5 == "build" ]]; then
BUNDLE="CFBundleVersion"
else
BUNDLE="CFBundleShortVersionString"
fi
INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"`
if [ $4 == "dmg" ]; then
COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`
elif [[ $4 == "zip" || $4 == "tar" ]]; then
COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`
fi
checkVersion "$INSTALLED" "$COMPARETO"
UPDATED=$?
if [[ $UPDATED == 1 ]]; then
echo "updated"
else
echo "outdated"
fi
fi
}
installApp() {
getApp "$4" "$2.$1"
cp "$2.$1" "$TMP_DIR/"
pushd "$TMP_DIR" >/dev/null
if [ $1 == "dmg" ]; then
yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null
install_status="$(appStatus "$3" "$2" "" "dmg" "$7")"
if [[ "$install_status" == "updated" ]]; then
echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!'
elif [[ "$install_status" == "outdated" && $6 != "noupdate" ]]; then
ditto "/Volumes/$2/$3" "/Applications/$3"
echo $'\360\237\214\216 - ['$2'] Successfully updated!'
elif [[ "$install_status" == "outdated" && $6 == "noupdate" ]]; then
echo $'\342\235\214 - ['$2'] This app cant be updated!'
elif [[ "$install_status" == "uninstalled" ]]; then
cp -R "/Volumes/$2/$3" /Applications
echo $'\360\237\221\215 - ['$2'] Succesfully installed!'
fi
hdiutil unmount "/Volumes/$2" > /dev/null
elif [ $1 == "zip" ]; then
unzip -qq "$2.zip"
install_status="$(appStatus "$3" "" "$5" "zip" "$7")"
if [[ "$install_status" == "updated" ]]; then
echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!'
elif [[ "$install_status" == "outdated" && $6 != "noupdate" ]]; then
ditto "$5$3" "/Applications/$3"
echo $'\360\237\214\216 - ['$2'] Successfully updated!'
elif [[ "$install_status" == "outdated" && $6 == "noupdate" ]]; then
echo $'\342\235\214 - ['$2'] This app cant be updated!'
elif [[ "$install_status" == "uninstalled" ]]; then
mv "$5$3" /Applications
echo $'\360\237\221\215 - ['$2'] Succesfully installed!'
fi
rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3"
elif [[ $1 == "tar" || $1 == "tbz" || $1 == "tgz" || $1 == "txz" ]]; then
tar -zxf "$2.$1" > /dev/null;
install_status="$(appStatus "$3" "" "$5" "tar" "$7")"
if [[ "$install_status" == "updated" ]]; then
echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!'
elif [[ "$install_status" == "outdated" && $6 != "noupdate" ]]; then
ditto "$3" "/Applications/$3"
echo $'\360\237\214\216 - ['$2'] Successfully updated!'
elif [[ "$install_status" == "outdated" && $6 == "noupdate" ]]; then
echo $'\342\235\214 - ['$2'] This app cant be updated!'
elif [[ "$install_status" == "uninstalled" ]]; then
mv "$5$3" /Applications
echo $'\360\237\221\215 - ['$2'] Succesfully installed!'
fi
rm -rf "$2.$1" && rm -rf "$3"
fi
popd > /dev/null
}
# Install App
installApp "$@"
# Done
rm -R "$TMP_DIR"

View file

@ -0,0 +1,101 @@
#!/bin/bash
# Generate installer commands
cd "$HOME/wk-macos/Installers"
# Audio-Video
sed 's#___#"dmg" "HandBrake" "HandBrake.app" "http://downloads.sourceforge.net/project/handbrake/0.10.5/HandBrake-0.10.5-MacOSX.6_GUI_x86_64.dmg" "" "" ""#' "install.command" >> "Extras/Audio-Video/HandBrake.command"
chmod +x "Extras/Audio-Video/HandBrake.command"
sed 's#___#"dmg" "Kodi" "Kodi.app" "http://mirrors.kodi.tv/releases/osx/x86_64/kodi-16.1-Jarvis-x86_64.dmg" "" "" ""#' "install.command" >> "Extras/Audio-Video/Kodi.command"
chmod +x "Extras/Audio-Video/Kodi.command"
sed 's#___#"tar" "mpv" "mpv.app" "http://sva.wakku.to/~chris/mpv_builds/mpv_latest.tar.bz2" "" "" ""#' "install.command" >> "Extras/Audio-Video/mpv.command"
chmod +x "Extras/Audio-Video/mpv.command"
sed 's#___#"zip" "Plex" "Plex Media Server.app" "https://downloads.plex.tv/plex-media-server/0.9.16.6.1993-5089475/PlexMediaServer-0.9.16.6.1993-5089475-OSX.zip" "" "" ""#' "install.command" >> "Extras/Audio-Video/Plex.command"
chmod +x "Extras/Audio-Video/Plex.command"
sed 's#___#"dmg" "Spotify" "Spotify.app" "http://download.spotify.com/Spotify.dmg" "" "" ""#' "install.command" >> "Extras/Audio-Video/Spotify.command"
chmod +x "Extras/Audio-Video/Spotify.command"
sed 's#___#"dmg" "VLC" "VLC.app" "http://get.videolan.org/vlc/2.2.4/macosx/vlc-2.2.4.dmg" "" "" ""#' "install.command" >> "Extras/Audio-Video/VLC.command"
chmod +x "Extras/Audio-Video/VLC.command"
# Browsers
sed 's#___#"dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US" "" "" ""#' "install.command" >> "Extras/Browsers/Firefox.command"
chmod +x "Extras/Browsers/Firefox.command"
sed 's#___#"dmg" "Google Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" ""#' "install.command" >> "Extras/Browsers/Google Chrome.command"
chmod +x "Extras/Browsers/Google Chrome.command"
sed 's#___#"dmg" "Opera" "Opera.app" "http://get.geo.opera.com/pub/opera/desktop/39.0.2256.71/mac/Opera_39.0.2256.71_Setup.dmg" "" "" ""#' "install.command" >> "Extras/Browsers/Opera.command"
chmod +x "Extras/Browsers/Opera.command"
# Cloud
sed 's#___#"dmg" "Google Drive" "Google Drive.app" "https://dl-ssl.google.com/drive/installgoogledrive.dmg" "" "" ""#' "install.command" >> "Extras/Cloud/Google Drive.command"
chmod +x "Extras/Cloud/Google Drive.command"
sed 's#___#"dmg" "Dropbox" "Dropbox.app" "https://www.dropbox.com/download?plat=mac" "" "" ""#' "install.command" >> "Extras/Cloud/Dropbox.command"
chmod +x "Extras/Cloud/Dropbox.command"
sed 's#___#"dmg" "Evernote" "Evernote.app" "http://evernote.com/download/get.php?file=EvernoteMac" "" "" ""#' "install.command" >> "Extras/Cloud/Evernote.command"
chmod +x "Extras/Cloud/Evernote.command"
sed 's#___#"tar" "FileZilla" "FileZilla.app" "http://downloads.sourceforge.net/project/filezilla/FileZilla_Client/3.21.0/FileZilla_3.21.0_macosx-x86.app.tar.bz2" "" "" ""#' "install.command" >> "Extras/Cloud/FileZilla.command"
chmod +x "Extras/Cloud/FileZilla.command"
sed 's#___#"dmg" "KeePassX" "KeePassX.app" "http://www.keepassx.org/releases/2.0.2/KeePassX-2.0.2.dmg" "" "" ""#' "install.command" >> "Extras/Cloud/KeePassX.command"
chmod +x "Extras/Cloud/KeePassX.command"
sed 's#___#"dmg" "OmniFocus" "OmniFocus.app" "http://www.omnigroup.com/download/latest/omnifocus" "" "" ""#' "install.command" >> "Extras/Cloud/OmniFocus.command"
chmod +x "Extras/Cloud/OmniFocus.command"
sed 's#___#"dmg" "Tunnelblick" "Tunnelblick.app" "https://tunnelblick.net/release/Tunnelblick_3.6.7beta04_build_4601.dmg" "" "" ""#' "install.command" >> "Extras/Cloud/Tunnelblick.command"
chmod +x "Extras/Cloud/Tunnelblick.command"
# Communication
sed 's#___#"dmg" "Adium" "Adium.app" "https://adiumx.cachefly.net/Adium_1.5.10.2.dmg" "" "" ""#' "install.command" >> "Extras/Communication/Adium.command"
chmod +x "Extras/Communication/Adium.command"
sed 's#___#"dmg" "Skype" "Skype.app" "http://www.skype.com/go/getskype-macosx.dmg" "" "" ""#' "install.command" >> "Extras/Communication/Skype.command"
chmod +x "Extras/Communication/Skype.command"
sed 's#___#"zip" "Slack" "Slack.app" "https://slack.com/ssb/download-osx" "" "" ""#' "install.command" >> "Extras/Communication/Slack.command"
chmod +x "Extras/Communication/Slack.command"
# Compression
sed 's#___#"dmg" "Keka" "Keka.app" "http://download.kekaosx.com/" "" "" ""#' "install.command" >> "Extras/Compression/Keka.command"
chmod +x "Extras/Compression/Keka.command"
sed 's#___#"dmg" "The Unarchiver" "The Unarchiver.app" "http://unarchiver.c3.cx/downloads/TheUnarchiver3.10.1.dmg" "" "" ""#' "install.command" >> "Extras/Compression/The Unarchiver.command"
chmod +x "Extras/Compression/The Unarchiver.command"
sed 's#___#"zip" "UnRarX" "UnRarX.app" "http://www.unrarx.com/files/UnRarX_2.2.zip" "" "" ""#' "install.command" >> "Extras/Compression/UnRarX.command"
chmod +x "Extras/Compression/UnRarX.command"
# Image-Photo
sed 's#___#"zip" "Flux" "Flux.app" "https://justgetflux.com/mac/Flux.zip" "" "" "build"#' "install.command" >> "Extras/Image-Photo/Flux.command"
chmod +x "Extras/Image-Photo/Flux.command"
sed 's#___#"dmg" "Inkscape" "Inkscape.app" "https://inkscape.org/en/gallery/item/3896/Inkscape-0.91-1-x11-10.7-x86_64.dmg" "" "" ""#' "install.command" >> "Extras/Image-Photo/Inkscape.command"
chmod +x "Extras/Image-Photo/Inkscape.command"
sed 's#___#"dmg" "GIMP" "GIMP.app" "http://download.gimp.org/mirror/pub/gimp/v2.8/osx/gimp-2.8.18-x86_64.dmg" "" "" ""#' "install.command" >> "Extras/Image-Photo/GIMP.command"
chmod +x "Extras/Image-Photo/GIMP.command"
# Office
sed 's#___#"dmg" "LibreOffice" "LibreOffice.app" "http://download.documentfoundation.org/libreoffice/stable/5.1.5/mac/x86_64/LibreOffice_5.1.5_MacOS_x86-64.dmg" "" "" ""#' "install.command" >> "Extras/Office/LibreOffice.command"
chmod +x "Extras/Office/LibreOffice.command"
sed 's#___#"dmg" "OpenOffice" "OpenOffice.app" "http://downloads.sourceforge.net/project/openofficeorg.mirror/4.1.2/binaries/en-US/Apache_OpenOffice_4.1.2_MacOS_x86-64_install_en-US.dmg" "" "" ""#' "install.command" >> "Extras/Office/OpenOffice.command"
chmod +x "Extras/Office/OpenOffice.command"
sed 's#___#"dmg" "Thunderbird" "Thunderbird.app" "http://download.mozilla.org/?product=thunderbird-latest&os=osx&lang=en-US" "" "" ""#' "install.command" >> "Extras/Office/Thunderbird.command"
chmod +x "Extras/Office/Thunderbird.command"
# Security
sed 's#___#"zip" "BitDefender ART" "Adware Removal Tool.app" "http://download.bitdefender.com/mac/tools/Adware%20Removal%20Tool.zip" "" "" ""#' "install.command" >> "Extras/Security/BitDefender ART.command"
chmod +x "Extras/Security/BitDefender ART.command"
sed 's#___#"dmg" "ClamXav" "ClamXav.app" "http://www.clamxav.com/downloads/ClamXav_2.9.2_2478.zip" "" "" ""#' "install.command" >> "Extras/Security/ClamXav.command"
chmod +x "Extras/Security/ClamXav.command"
sed 's#___#"dmg" "Malwarebytes Anti-Malware" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" ""#' "install.command" >> "Extras/Security/Malwarebytes Anti-Malware.command"
chmod +x "Extras/Security/Malwarebytes Anti-Malware.command"
# Misc
sed 's#___#"zip" "Caffeine" "caffeine.app" "http://download.lightheadsw.com/download.php?software=caffeine" "" "" "build"#' "install.command" >> "Extras/Caffeine.command"
chmod +x "Extras/Caffeine.command"
sed 's#___#"dmg" "Calibre" "calibre.app" "http://status.calibre-ebook.com/dist/osx32" "" "" ""#' "install.command" >> "Extras/Calibre.command"
chmod +x "Extras/Calibre.command"
sed 's#___#"zip" "gfxCardStatus" "gfxCardStatus.app" "http://gfx.io/downloads/gfxCardStatus-2.3.zip" "" "" ""#' "install.command" >> "Extras/gfxCardStatus.command"
chmod +x "Extras/gfxCardStatus.command"
sed 's#___#"dmg" "GoogleEarth" "Google Earth.app" "https://dl.google.com/earth/client/advanced/current/GoogleEarthMac-Intel.dmg" "" "" ""#' "install.command" >> "Extras/GoogleEarth.command"
chmod +x "Extras/GoogleEarth.command"
sed 's#___#"zip" "iTerm2" "iTerm.app" "https://iterm2.com/downloads/stable/iTerm2-3_0_9.zip" "" "" ""#' "install.command" >> "Extras/iTerm2.command"
chmod +x "Extras/iTerm2.command"
sed 's#___#"zip" "Macs Fan Control" "Macs Fan Control.app" "http://www.crystalidea.com/downloads/macsfancontrol.zip" "" "" ""#' "install.command" >> "Extras/Macs Fan Control.command"
chmod +x "Extras/Macs Fan Control.command"
sed 's#___#"dmg" "Steam" "Steam.app" "http://media.steampowered.com/client/installer/steam.dmg" "" "" "build"#' "install.command" >> "Extras/Steam.command"
chmod +x "Extras/Steam.command"
sed 's#___#"dmg" "TeamViewerQS" "TeamViewerQS.app" "http://download.teamviewer.com/download/TeamViewerQS.dmg" "" "" ""#' "install.command" >> "Extras/TeamViewerQS.command"
chmod +x "Extras/TeamViewerQS.command"

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" ___
# Done
echo ""

2
.macos_items/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.DS_Store
.bin/install_cache

View file

@ -0,0 +1,13 @@
#!/bin/bash
## Wizard Kit: Start SW Diagnostics
# Init
## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227)
pushd . > /dev/null
cd "$(dirname "$0")/.bin"
BIN="$(pwd)"
popd > /dev/null
# Run
sudo "$BIN/Scripts/diagnostics"
exit 0

View file

@ -0,0 +1,13 @@
#!/bin/bash
## Wizard Kit: Generic app launcher
# Init
## Get .bin absolute path (dirty code roughly based on http://stackoverflow.com/a/12197227)
pushd . > /dev/null
cd "$(dirname "$0")/../.bin"
BIN="$(pwd)"
popd > /dev/null
# Run
"$BIN/Disk Inventory X.app/Contents/MacOS/Disk Inventory X" &
exit 0

View file

@ -0,0 +1,6 @@
#!/bin/bash
## Wizard Kit: Enable TRIM
# Run trimforce
sudo trimforce enable
exit 0

View file

@ -0,0 +1,5 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
[InternetShortcut]
URL=https://www.backblaze.com/gen/install_backblaze
IDList=

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "HandBrake" "HandBrake.app" "http://downloads.sourceforge.net/project/handbrake/0.10.5/HandBrake-0.10.5-MacOSX.6_GUI_x86_64.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Kodi" "Kodi.app" "http://mirrors.kodi.tv/releases/osx/x86_64/kodi-16.1-Jarvis-x86_64.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "Plex" "Plex Media Server.app" "https://downloads.plex.tv/plex-media-server/0.9.16.6.1993-5089475/PlexMediaServer-0.9.16.6.1993-5089475-OSX.zip" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Spotify" "Spotify.app" "http://download.spotify.com/Spotify.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "VLC" "VLC.app" "http://get.videolan.org/vlc/2.2.4/macosx/vlc-2.2.4.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "tar" "mpv" "mpv.app" "http://sva.wakku.to/~chris/mpv_builds/mpv_latest.tar.bz2" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest___os=osx___lang=en-US" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Google Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Opera" "Opera.app" "http://get.geo.opera.com/pub/opera/desktop/39.0.2256.71/mac/Opera_39.0.2256.71_Setup.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "Caffeine" "caffeine.app" "http://download.lightheadsw.com/download.php?software=caffeine" "" "" "build"
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Calibre" "calibre.app" "http://status.calibre-ebook.com/dist/osx32" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Dropbox" "Dropbox.app" "https://www.dropbox.com/download?plat=mac" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Evernote" "Evernote.app" "http://evernote.com/download/get.php?file=EvernoteMac" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "tar" "FileZilla" "FileZilla.app" "http://downloads.sourceforge.net/project/filezilla/FileZilla_Client/3.21.0/FileZilla_3.21.0_macosx-x86.app.tar.bz2" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Google Drive" "Google Drive.app" "https://dl-ssl.google.com/drive/installgoogledrive.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "KeePassX" "KeePassX.app" "http://www.keepassx.org/releases/2.0.2/KeePassX-2.0.2.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "OmniFocus" "OmniFocus.app" "http://www.omnigroup.com/download/latest/omnifocus" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Tunnelblick" "Tunnelblick.app" "https://tunnelblick.net/release/Tunnelblick_3.6.7beta04_build_4601.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Adium" "Adium.app" "https://adiumx.cachefly.net/Adium_1.5.10.2.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Skype" "Skype.app" "http://www.skype.com/go/getskype-macosx.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "Slack" "Slack.app" "https://slack.com/ssb/download-osx" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Keka" "Keka.app" "http://download.kekaosx.com/" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "The Unarchiver" "The Unarchiver.app" "http://unarchiver.c3.cx/downloads/TheUnarchiver3.10.1.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "UnRarX" "UnRarX.app" "http://www.unrarx.com/files/UnRarX_2.2.zip" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "GoogleEarth" "Google Earth.app" "https://dl.google.com/earth/client/advanced/current/GoogleEarthMac-Intel.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "Flux" "Flux.app" "https://justgetflux.com/mac/Flux.zip" "" "" "build"
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "GIMP" "GIMP.app" "http://download.gimp.org/mirror/pub/gimp/v2.8/osx/gimp-2.8.18-x86_64.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Inkscape" "Inkscape.app" "https://inkscape.org/en/gallery/item/3896/Inkscape-0.91-1-x11-10.7-x86_64.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "Macs Fan Control" "Macs Fan Control.app" "http://www.crystalidea.com/downloads/macsfancontrol.zip" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "LibreOffice" "LibreOffice.app" "http://download.documentfoundation.org/libreoffice/stable/5.1.5/mac/x86_64/LibreOffice_5.1.5_MacOS_x86-64.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "OpenOffice" "OpenOffice.app" "http://downloads.sourceforge.net/project/openofficeorg.mirror/4.1.2/binaries/en-US/Apache_OpenOffice_4.1.2_MacOS_x86-64_install_en-US.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Thunderbird" "Thunderbird.app" "http://download.mozilla.org/?product=thunderbird-latest___os=osx___lang=en-US" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "BitDefender ART" "Adware Removal Tool.app" "http://download.bitdefender.com/mac/tools/Adware%20Removal%20Tool.zip" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "ClamXav" "ClamXav.app" "http://www.clamxav.com/downloads/ClamXav_2.9.2_2478.zip" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Malwarebytes Anti-Malware" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Steam" "Steam.app" "http://media.steampowered.com/client/installer/steam.dmg" "" "" "build"
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "TeamViewerQS" "TeamViewerQS.app" "http://download.teamviewer.com/download/TeamViewerQS.dmg" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "gfxCardStatus" "gfxCardStatus.app" "http://gfx.io/downloads/gfxCardStatus-2.3.zip" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,27 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "zip" "iTerm2" "iTerm.app" "https://iterm2.com/downloads/stable/iTerm2-3_0_9.zip" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,34 @@
#!/bin/bash
# Init
BIN=""
clear
# Find BIN path
pushd . > /dev/null
cd "$(dirname "$0")"
while [ "$(pwd)" != "/" ]; do
if [ -d ".bin" ]; then
BIN="$(pwd)/.bin"
break
fi
cd ..
done
popd > /dev/null
if [ "$BIN" == "" ]; then
echo ".bin not found"
exit 1
fi
# Install App(s)
"$BIN/Scripts/install_app" "dmg" "Firefox" "Firefox.app" "http://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US" "" "" ""
"$BIN/Scripts/install_app" "dmg" "Chrome" "Google Chrome.app" "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg" "" "" ""
"$BIN/Scripts/install_app" "dmg" "MBAM" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" ""
"$BIN/Scripts/install_app" "zip" "iTerm2" "iTerm.app" "https://iterm2.com/downloads/stable/iTerm2-3_0_9.zip" "" "" ""
"$BIN/Scripts/install_app" "zip" "macsfancontrol" "Macs Fan Control.app" "http://www.crystalidea.com/downloads/macsfancontrol.zip" "" "" ""
"$BIN/Scripts/install_app" "dmg" "Spotify" "Spotify.app" "http://download.spotify.com/Spotify.dmg" "" "" ""
"$BIN/Scripts/install_app" "dmg" "VLC" "VLC.app" "http://get.videolan.org/vlc/2.2.4/macosx/vlc-2.2.4.dmg" "" "" ""
"$BIN/Scripts/install_app" "tgz" "mpv" "mpv.app" "https://laboratory.stolendata.net/~djinn/mpv_osx/mpv-latest.tar.gz" "" "" ""
# Done
echo ""

View file

@ -0,0 +1,80 @@
#/bin/bash
clear && rm -rf ~/.macapps && mkdir ~/.macapps > /dev/null && cd ~/.macapps
###############################
# Print script header #
###############################
echo $"
███╗ ███╗ █████╗ ██████╗ █████╗ ██████╗ ██████╗ ███████╗
████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝
██╔████╔██║███████║██║ ███████║██████╔╝██████╔╝███████╗
██║╚██╔╝██║██╔══██║██║ ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║
██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║██║ ██║ ███████║╔═════════╗
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═ .link ═╝\n"
###############################
# Define worker functions #
###############################
versionChecker() {
local v1=$1; local v2=$2;
while [ `echo $v1 | egrep -c [^0123456789.]` -gt 0 ]; do
char=`echo $v1 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v1=`echo $v1 | sed "s/$char/.$char_dec/g"`; done
while [ `echo $v2 | egrep -c [^0123456789.]` -gt 0 ]; do
char=`echo $v2 | sed 's/.*\([^0123456789.]\).*/\1/'`; char_dec=`echo -n "$char" | od -b | head -1 | awk {'print $2'}`; v2=`echo $v2 | sed "s/$char/.$char_dec/g"`; done
v1=`echo $v1 | sed 's/\.\./.0/g'`; v2=`echo $v2 | sed 's/\.\./.0/g'`;
checkVersion "$v1" "$v2"
}
checkVersion() {
[ "$1" == "$2" ] && return 1
v1f=`echo $1 | cut -d "." -f -1`;v1b=`echo $1 | cut -d "." -f 2-`;v2f=`echo $2 | cut -d "." -f -1`;v2b=`echo $2 | cut -d "." -f 2-`;
if [[ "$v1f" != "$1" ]] || [[ "$v2f" != "$2" ]]; then [[ "$v1f" -gt "$v2f" ]] && return 1; [[ "$v1f" -lt "$v2f" ]] && return 0;
[[ "$v1f" == "$1" ]] || [[ -z "$v1b" ]] && v1b=0; [[ "$v2f" == "$2" ]] || [[ -z "$v2b" ]] && v2b=0; checkVersion "$v1b" "$v2b"; return $?
else [ "$1" -gt "$2" ] && return 1 || return 0; fi
}
appStatus() {
if [ ! -d "/Applications/$1" ]; then echo "uninstalled"; else
if [[ $5 == "build" ]]; then BUNDLE="CFBundleVersion"; else BUNDLE="CFBundleShortVersionString"; fi
INSTALLED=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Applications/$1/Contents/Info.plist"`
if [ $4 == "dmg" ]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "/Volumes/$2/$1/Contents/Info.plist"`;
elif [[ $4 == "zip" || $4 == "tar" ]]; then COMPARETO=`/usr/libexec/plistbuddy -c Print:$BUNDLE: "$3$1/Contents/Info.plist"`; fi
checkVersion "$INSTALLED" "$COMPARETO"; UPDATED=$?;
if [[ $UPDATED == 1 ]]; then echo "updated"; else echo "outdated"; fi; fi
}
installApp() {
echo $'\360\237\214\200 - ['$2'] Downloading app...'
if [ $1 == "dmg" ]; then curl -s -L -o "$2.dmg" $4; yes | hdiutil mount -nobrowse "$2.dmg" -mountpoint "/Volumes/$2" > /dev/null;
if [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n';
elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "/Volumes/$2/$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'
elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n'
elif [[ $(appStatus "$3" "$2" "" "dmg" "$7") == "uninstalled" ]]; then cp -R "/Volumes/$2/$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi
hdiutil unmount "/Volumes/$2" > /dev/null && rm "$2.dmg"
elif [ $1 == "zip" ]; then curl -s -L -o "$2.zip" $4; unzip -qq "$2.zip";
if [[ $(appStatus "$3" "" "$5" "zip" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n';
elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$5$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n'
elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n'
elif [[ $(appStatus "$3" "" "$5" "zip" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi;
rm -rf "$2.zip" && rm -rf "$5" && rm -rf "$3"
elif [ $1 == "tar" ]; then curl -s -L -o "$2.tar.bz2" $4; tar -zxf "$2.tar.bz2" > /dev/null;
if [[ $(appStatus "$3" "" "$5" "tar" "$7") == "updated" ]]; then echo $'\342\235\214 - ['$2'] Skipped because it was already up to date!\n';
elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 != "noupdate" ]]; then ditto "$3" "/Applications/$3"; echo $'\360\237\214\216 - ['$2'] Successfully updated!\n';
elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "outdated" && $6 == "noupdate" ]]; then echo $'\342\235\214 - ['$2'] This app cant be updated!\n'
elif [[ $(appStatus "$3" "" "$5" "tar" "$7") == "uninstalled" ]]; then mv "$5$3" /Applications; echo $'\360\237\221\215 - ['$2'] Succesfully installed!\n'; fi
rm -rf "$2.tar.bz2" && rm -rf "$3"; fi
}
###############################
# Install selected apps #
###############################
installApp "dmg" "Anti-Malware" "Malwarebytes Anti-Malware.app" "https://store.malwarebytes.org/342/purl-mbamm-dl" "" "" ""
###############################
# Print script footer #
###############################
echo $'------------------------------------------------------------------------------'
echo $'\360\237\222\254 - Thank you for using macapps.link! Liked it? Recommend us to your friends!'
echo $'------------------------------------------------------------------------------\n'
rm -rf ~/.macapps

View file

@ -1,6 +0,0 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.257'
hooks:
- id: ruff

View file

@ -1,7 +1,7 @@
Copyright (c) 2023 Alan Mason
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.
Copyright (c) 2017 Alan Mason
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.

View file

@ -1,39 +0,0 @@
# WizardKit #
A collection of tools to help technicians service computers.
## Overview ##
There are a few main parts to this project and their uses:
* Live Linux image
* Hardware diagnostics
* CPU stress tests with temperature monitoring
* Health checks/tests for storage drives
* Misc other diagnostics
* Data recovery
* General data transfers from many possible filesystems
* Bit-level drive duplication based on ddrescue
* Live macOS image
* Hardware diagnostics
* CPU stress tests with temperature monitoring
* Health checks/tests for storage drives
* Data recovery
* _(Currently under development)_
* Live WinPE image
* _(Currently under development)_
* Windows Kit _(intended for UFDs)_
* Automated repairs
* AV scans
* Windows health checks
* Automated setup
* Install software
* System configuration
## Combined UFD ##
All parts can be combined onto a single UFD!
* Compatible with most legacy and UEFI bootloaders
* Custom boot menus
* To get started run `build-ufd` under the live Linux image

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

View file

@ -1,122 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="logo.svg"
inkscape:export-filename="/home/thewizardpp/projects/logos/logo512x512.png"
inkscape:export-xdpi="1440"
inkscape:export-ydpi="1440">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<filter
id="filter3668"
inkscape:label="Drop shadow"
width="1.5"
height="1.5"
x="-.25"
y="-.25">
<feGaussianBlur
id="feGaussianBlur3670"
in="SourceAlpha"
stdDeviation="1,000000"
result="blur" />
<feColorMatrix
id="feColorMatrix3672"
result="bluralpha"
type="matrix"
values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0,500000 0 " />
<feOffset
id="feOffset3674"
in="bluralpha"
dx="1,000000"
dy="1,000000"
result="offsetBlur" />
<feMerge
id="feMerge3676">
<feMergeNode
id="feMergeNode3678"
in="offsetBlur" />
<feMergeNode
id="feMergeNode3680"
in="SourceGraphic" />
</feMerge>
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.839192"
inkscape:cx="16.469461"
inkscape:cy="15.775995"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:window-width="1152"
inkscape:window-height="844"
inkscape:window-x="-2"
inkscape:window-y="93"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer"
style="display:inline">
<g
id="g3613"
transform="matrix(1.0696952,0,0,1.0696952,-1.9682871,1.2767394)">
<path
sodipodi:nodetypes="cssssss"
d="m 28.466519,15.480445 c -1.690444,-0.411311 -3.880242,0.0024 -6.862802,1.703057 -4.343818,2.477 -5.647804,4.7124 -10.531132,6.5262 -2.7416801,1.0184 -7.1725478,1.2727 -6.7296333,-1.9563 0.4055207,-2.9564 4.8746766,-5.683963 10.7473903,-5.268022 7.253753,0.513753 7.780294,2.643843 11.236758,2.445771 4.073631,-0.233438 3.02577,-3.235043 2.139419,-3.450706 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path2822"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccscsc"
id="path2832"
d="m 22.349625,16.595174 c -5.498466,2.959917 -4.603518,5.10607 -10.999048,3.821601 1.40216,-4.418086 4.962036,-16.95097 7.147841,-17.2692571 1.878431,-0.2735287 4.924495,4.2931483 4.924495,4.2931483 0,0 -3.661803,-2.9673231 -4.16688,-1.7046325 -0.593183,1.4829546 2.39459,8.4145833 3.093592,10.8591403 z"
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccc"
id="path3611"
d="m 22.074942,15.74979 c 1.515307,-0.313608 1.831341,-0.3546 3.377477,-0.485523 1.799175,-0.173029 3.187957,0.237433 3.187957,0.237433"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

View file

@ -1,508 +0,0 @@
:: WizardKit: Wrapper for launching programs and scripts.
::
:: Some features:
:: * If the OS is 64-bit then the WorkingDir is scanned for a 64-bit version of the programs
:: * Allows for centralized terminal emulation settings management
:: * Allows for smaller "launcher" scripts to be used as they will rely on this script.
@echo off
if defined DEBUG (@echo on)
:Init
setlocal EnableDelayedExpansion
title WizardKit: Launcher
pushd "%~dp0"
call :FindBin
call :DeQuote L_ITEM
call :DeQuote L_PATH
call :DeQuote L_TYPE
:SetVariables
rem Set variables using settings\main.py file
set "SETTINGS=%bin%\Scripts\wk\cfg\main.py"
for %%v in (ARCHIVE_PASSWORD KIT_NAME_FULL OFFICE_SERVER_IP QUICKBOOKS_SERVER_IP) do (
set "var=%%v"
for /f "tokens=* usebackq" %%f in (`findstr "!var!=" "%SETTINGS%"`) do (
set "_v=%%f"
set "_v=!_v:*'=!"
set "%%v=!_v:~0,-1!"
)
)
rem Set ARCH to 32 as a gross assumption and check for x86_64 status
set ARCH=32
if /i "%PROCESSOR_ARCHITECTURE%" == "AMD64" set "ARCH=64"
set "SEVEN_ZIP=%bin%\7-Zip\7z.exe"
set "CON=%bin%\ConEmu\ConEmu.exe"
set "FASTCOPY=%bin%\FastCopy\FastCopy.exe"
set "POWERSHELL=%systemroot%\system32\WindowsPowerShell\v1.0\powershell.exe"
set "PYTHON=%bin%\Python\x32\python.exe"
if %ARCH% equ 64 (
set "CON=%bin%\ConEmu\ConEmu64.exe"
set "FASTCOPY=%bin%\FastCopy\FastCopy64.exe"
set "PYTHON=%bin%\Python\x64\python.exe"
)
:UpdateTitle
rem Sets title using KIT_NAME_FULL from settings\main.py (unless %window_title% already set)
if defined window_title (
title %window_title%
) else (
set "window_title=%*"
if not defined window_title set "window_title=Launcher"
set "window_title=%KIT_NAME_FULL%: %window_title%"
title %window_title%
)
:CheckUsage
rem Check for empty passed variables
if not defined L_TYPE (goto Usage)
if not defined L_PATH (goto Usage)
if not defined L_ITEM (goto Usage)
rem Assume if not "True" then False (i.e. undefine variable)
if /i not "%L_ELEV%" == "True" (set "L_ELEV=")
if /i not "%L_NCMD%" == "True" (set "L_NCMD=")
if /i not "%L__CLI%" == "True" (set "L__CLI=")
:RelaunchInConEmu
set RELOAD_IN_CONEMU=True
if defined ConEmuBuild set "RELOAD_IN_CONEMU="
if defined L_NCMD set "RELOAD_IN_CONEMU="
if "%L_TYPE%" == "Executable" set "RELOAD_IN_CONEMU="
if "%L_TYPE%" == "PSScript" set "RELOAD_IN_CONEMU="
if "%L_TYPE%" == "PyScript" set "RELOAD_IN_CONEMU="
if defined RELOAD_IN_CONEMU (
set "con_args=-new_console:n"
rem If in DEBUG state then force ConEmu to stay open
if defined DEBUG (set "con_args=!con_args! -new_console:c")
start "" "%CON%" -run ""%~0" %*" !con_args! || goto ErrorUnknown
exit /b 0
)
:CheckLaunchType
rem Jump to the selected launch type or show usage
if /i "%L_TYPE%" == "Executable" (goto LaunchExecutable)
if /i "%L_TYPE%" == "Folder" (goto LaunchFolder)
if /i "%L_TYPE%" == "Office" (goto LaunchOffice)
if /i "%L_TYPE%" == "PSScript" (goto LaunchPSScript)
if /i "%L_TYPE%" == "PyScript" (goto LaunchPyScript)
if /i "%L_TYPE%" == "QuickBooks" (goto LaunchQuickBooksSetup)
goto Usage
:LaunchExecutable
rem Prep
call :ExtractOrFindPath || goto ErrorProgramNotFound
rem Check for 64-bit prog (if running on 64-bit system)
set "prog=%_path%\%L_ITEM%"
if %ARCH% equ 64 (
if exist "%_path%\%L_ITEM:.=64.%" set "prog=%_path%\%L_ITEM:.=64.%"
) else (
if exist "%_path%\%L_ITEM:.=32.%" set "prog=%_path%\%L_ITEM:.=32.%"
)
if not exist "%prog%" goto ErrorProgramNotFound
rem Run
popd && pushd "%_path%"
if defined L__CLI goto LaunchExecutableCLI
if defined L_ELEV (
goto LaunchExecutableElev
) else (
goto LaunchExecutableUser
)
:LaunchExecutableCLI
rem Prep
set "con_args=-new_console:n"
if defined DEBUG (set "con_args=%con_args% -new_console:c")
if defined L_ELEV (set "con_args=%con_args% -new_console:a")
rem Run
start "" "%CON%" -run "%prog%" %L_ARGS% %con_args% || goto ErrorUnknown
goto Exit
:LaunchExecutableElev
rem Prep
call :DeQuote prog
call :DeQuote L_ARGS
rem Create VB script
mkdir "%bin%\tmp" 2>nul
echo Set UAC = CreateObject^("Shell.Application"^) > "%bin%\tmp\Elevate.vbs"
echo UAC.ShellExecute "%prog%", "%L_ARGS%", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs"
rem Run
"%systemroot%\System32\cscript.exe" //nologo "%bin%\tmp\Elevate.vbs" || goto ErrorUnknown
goto Exit
:LaunchExecutableUser
rem Run
start "" "%prog%" %L_ARGS% || goto ErrorUnknown
goto Exit
:LaunchFolder
rem Prep
call :ExtractOrFindPath || goto ErrorProgramNotFound
rem Run
start "" "explorer.exe" "%_path%" || goto ErrorUnknown
goto Exit
:LaunchOffice
call "%bin%\Scripts\init_client_dir.cmd" /Office
set "_odt=False"
if %L_PATH% equ 2016 (set "_odt=True")
if %L_PATH% equ 2019 (set "_odt=True")
if "%_odt%" == "True" (
goto LaunchOfficeODT
) else (
goto LaunchOfficeSetup
)
:LaunchOfficeODT
rem Prep
set "args=-aoa -bso0 -bse0 -bsp0 -p%ARCHIVE_PASSWORD%"
set "config=%L_ITEM%"
set "dest=%client_dir%\Office\ODT"
set "odt_exe=setup.exe"
set "source=%cbin%\_Office.7z"
rem Extract
if not exist "%source%" (goto ErrorODTSourceNotFound)
"%SEVEN_ZIP%" e "%source%" %args% -o"%dest%" %odt_exe% %config% || exit /b 1
"%systemroot%\System32\ping.exe" -n 2 127.0.0.1>nul
rem Verify
if not exist "%dest%\setup.exe" (goto ErrorODTSourceNotFound)
if not exist "%dest%\%config%" (goto ErrorODTSourceNotFound)
pushd "%dest%"
rem Run
rem # The line below jumps to ErrorUnknown even when it runs correctly??
rem start "" "setup.exe" /configure %L_ITEM% || popd & goto ErrorUnknown
rem # Going to assume it extracted correctly and blindly start setup.exe
start "" "setup.exe" /configure %config%
popd
goto Exit
:LaunchOfficeSetup
rem Prep
set "fastcopy_args=/cmd=diff /no_ui /auto_close"
set "product=%L_PATH%\%L_ITEM%"
set "product_name=%L_ITEM%"
call :GetBasename product_name || goto ErrorBasename
set "source=\\%OFFICE_SERVER_IP%\Office\%product%"
set "dest=%client_dir%\Office"
rem Verify
if not exist "%source%" (goto ErrorOfficeSourceNotFound)
rem Copy
echo Copying setup file(s) for %product_name%...
start "" /wait "%FASTCOPY%" %fastcopy_args% "%source%" /to="%dest%\"
rem Run
if exist "%dest%\%product_name%\setup.exe" (
start "" "%dest%\%product_name%\setup.exe" || goto ErrorUnknown
) else if "%product_name:~-3,3%" == "exe" (
start "" "%dest%\%product_name%" || goto ErrorUnknown
) else if "%product_name:~-3,3%" == "msi" (
start "" "%dest%\%product_name%" || goto ErrorUnknown
) else (
rem Office source not supported by this script
goto ErrorOfficeUnsupported
)
goto Exit
:LaunchPSScript
rem Prep
call :ExtractOrFindPath || goto ErrorProgramNotFound
set "script=%_path%\%L_ITEM%"
set "ps_args=-ExecutionPolicy Bypass -NoProfile"
rem Verify
if not exist "%script%" goto ErrorScriptNotFound
rem Run
popd && pushd "%_path%"
if defined L_ELEV (
goto LaunchPSScriptElev
) else (
goto LaunchPSScriptUser
)
:LaunchPSScriptElev
rem Prep
call :DeQuote script
rem Create VB script
mkdir "%bin%\tmp" 2>nul
echo Set UAC = CreateObject^("Shell.Application"^) > "%bin%\tmp\Elevate.vbs"
if defined L_NCMD (
rem use Powershell's window instead of %CON%
echo UAC.ShellExecute "%POWERSHELL%", "%ps_args% -File "%script%"", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs"
) else (
echo UAC.ShellExecute "%CON%", "-run %POWERSHELL% %ps_args% -File "^"%script%^"" -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs"
)
rem Run
"%systemroot%\System32\cscript.exe" //nologo "%bin%\tmp\Elevate.vbs" || goto ErrorUnknown
goto Exit
:LaunchPSScriptUser
rem Run
if defined L_NCMD (
start "" "%POWERSHELL%" %ps_args% -File "%script%" || goto ErrorUnknown
) else (
start "" "%CON%" -run "%POWERSHELL%" %ps_args% -File "%script%" -new_console:n || goto ErrorUnknown
)
goto Exit
:LaunchPyScript
rem Prep
call :ExtractOrFindPath || goto ErrorProgramNotFound
set "script=%_path%\%L_ITEM%"
rem Verify
"%PYTHON%" --version >nul || goto ErrorPythonUnsupported
if not exist "%script%" goto ErrorScriptNotFound
rem Run
if defined L_ELEV (
goto LaunchPyScriptElev
) else (
goto LaunchPyScriptUser
)
:LaunchPyScriptElev
rem Prep
call :DeQuote script
rem Create VB script
mkdir "%bin%\tmp" 2>nul
echo Set UAC = CreateObject^("Shell.Application"^) > "%bin%\tmp\Elevate.vbs"
if defined L_NCMD (
echo UAC.ShellExecute "%PYTHON%", """%script%"" %L_ARGS%", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs"
) else (
echo UAC.ShellExecute "%CON%", "-run ""%PYTHON%"" ""%script%"" %L_ARGS% -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs"
)
rem Run
"%systemroot%\System32\cscript.exe" //nologo "%bin%\tmp\Elevate.vbs" || goto ErrorUnknown
goto Exit
:LaunchPyScriptUser
if defined L_NCMD (
start "" "%PYTHON%" "%script%" %L_ARGS% || goto ErrorUnknown
) else (
start "" "%CON%" -run "%PYTHON%" "%script%" %L_ARGS% -new_console:n || goto ErrorUnknown
)
goto Exit
:LaunchQuickBooksSetup
rem Prep
call "%bin%\Scripts\init_client_dir.cmd" /QuickBooks
set "fastcopy_args=/cmd=diff /no_ui /auto_close"
set "product=%L_PATH%\%L_ITEM%"
set "product_name=%L_ITEM%"
call :GetBasename product_name || goto ErrorBasename
set "source=\\%QUICKBOOKS_SERVER_IP%\QuickBooks\%product%"
set "dest=%client_dir%\QuickBooks"
rem Verify
if not exist "%source%" (goto ErrorQuickBooksSourceNotFound)
rem Copy
echo Copying setup file(s) for %L_ITEM%...
start "" /wait "%FASTCOPY%" %fastcopy_args% "%source%" /to="%dest%\"
rem Run
if exist "%dest%\%product_name%\Setup.exe" (
pushd "%dest%\%product_name%"
start "" "%dest%\%product_name%\Setup.exe" || goto ErrorUnknown
popd
) else (
rem QuickBooks source not supported by this script
goto ErrorQuickBooksUnsupported
)
goto Exit
:Usage
echo.
echo.Usage (via defined variables):
echo. L_TYPE L_PATH L_ITEM L_ARGS
echo. Executable Working Dir Program Args [L_7ZIP] [L_ELEV] [L__CLI]
echo. Folder Folder '.' [L_7ZIP]
echo. Office Year Product [L_7ZIP]
echo. PSScript Scripts Script [L_7ZIP] [L_ELEV] [L_NCMD]
echo. PyScript Scripts Script Args [L_7ZIP] [L_ELEV] [L_NCMD]
echo. QuickBooks Year Product [L_7ZIP]
echo.
echo.L_7ZIP: Extra arguments for 7-Zip (in the :ExtractCBin label)
echo.L_ELEV: Elevate to run as Admin
echo.L_NCMD: Do not run script inside ConEmu (i.e. use the native window)
echo.L__CLI: Run executable in ConEmu
echo.
goto Abort
:: Functions ::
:DeQuote
rem Code taken from http://ss64.com/nt/syntax-dequote.html
if not defined %1 (@exit /b 1)
for /f "delims=" %%a in ('echo %%%1%%') do set %1=%%~a
@exit /b 0
:ExtractCBin
rem Extract %cbin% archive into %bin%
echo Extracting "%L_PATH%"...
set "source=%cbin%\%L_PATH%.7z"
set "dest=%bin%\%L_PATH%"
set "args=-aos -bso0 -bse0 -bsp0 -p%ARCHIVE_PASSWORD%"
if defined DEBUG (set "args=-aos -p%ARCHIVE_PASSWORD%")
"%SEVEN_ZIP%" x "%source%" %args% -o"%dest%" %L_7ZIP% || exit /b 1
ping.exe -n 2 127.0.0.1>nul
exit /b 0
:FindBin
rem Checks the current directory and all parents for the ".bin" folder
rem NOTE: Has not been tested for UNC paths
set bin=
pushd "%~dp0"
:FindBinInner
if exist ".bin" (goto FindBinDone)
if "%~d0\" == "%cd%" (popd & @exit /b 1)
cd ..
goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin"
set "cbin=%cd%\.cbin"
popd
@exit /b 0
:GetBasename
rem Loop over passed variable to remove all text left of the last '\' character
rem NOTE: This function should be called as 'call :GetBasename VarName || goto ErrorBasename' to catch variables that become empty.
for /f "delims=" %%a in ('echo %%%1%%') do (set "_tmp=%%~a")
:GetBasenameInner
set "_tmp=%_tmp:*\=%"
if not defined _tmp (@exit /b 1)
if not "%_tmp%" == "%_tmp:*\=%" (goto GetBasenameInner)
:GetBasenameDone
set "%1=%_tmp%"
@exit /b 0
:ExtractOrFindPath
rem Test L_PATH in the following order:
rem 1: %cbin%\L_PATH.7z (which will be extracted to %bin%\L_PATH)
rem 2: %bin%\L_PATH
rem 3. %L_PATH% (i.e. treat L_PATH as an absolute path)
rem NOTE: This function should be called as 'call :ExtractOrFindPath || goto ErrorProgramNotFound' to catch invalid paths.
set _path=
if exist "%cbin%\%L_PATH%.7z" (
call :ExtractCBin
) else if exist "%cbin%\%L_PATH%\%L_ITEM:~0,-4%.7z" (
call :ExtractCBin
)
if exist "%bin%\%L_PATH%" (set "_path=%bin%\%L_PATH%")
if not defined _path (set "_path=%L_PATH%")
rem Raise error if path is still not available
if not exist "%_path%" (exit /b 1)
exit /b 0
:: Errors ::
:ErrorBasename
echo.
echo ERROR: GetBasename resulted in an empty variable.
goto Abort
:ErrorNoBin
echo.
echo ERROR: ".bin" folder not found.
goto Abort
:ErrorODTSourceNotFound
echo.
echo ERROR: Office Deployment Tool source not found.
goto Abort
:ErrorOfficeSourceNotFound
echo.
echo ERROR: Office source "%L_ITEM%" not found.
goto Abort
:ErrorOfficeUnsupported
rem Source is not an executable nor is a folder with a setup.exe file inside. Open explorer to local setup file(s) instead.
echo.
echo ERROR: Office version not supported by this script.
start "" "explorer.exe" "%client_dir%\Office"
goto Abort
:ErrorPythonUnsupported
rem The Windows installation lacks Windows update KB2999226 needed to run Python
echo.
echo ERROR: Failed to run Python, try installing Windows update KB2999226.
echo NOTE: That update is from October 2015 so this system is SEVERELY outdated
if exist "%bin%\..\Installers\Extras\Windows Updates" (
start "" "explorer.exe" "%bin%\..\Installers\Extras\Windows Updates"
)
goto Abort
:ErrorQuickBooksSourceNotFound
echo.
echo ERROR: QuickBooks source "%L_ITEM%" not found.
goto Abort
:ErrorQuickBooksUnsupported
rem Source is not an executable nor is a folder with a setup.exe file inside. Open explorer to local setup file(s) instead.
echo.
echo ERROR: QuickBooks version not supported by this script.
start "" "explorer.exe" "%client_dir%\QuickBooks"
goto Abort
:ErrorProgramNotFound
echo.
echo ERROR: Program "%prog%" not found.
goto Abort
:ErrorScriptNotFound
echo.
echo ERROR: Script "%script%" not found.
goto Abort
:ErrorUnknown
echo.
echo ERROR: Unknown error encountered.
goto Abort
:Abort
rem Handle color theme for both the native console and ConEmu
if defined ConEmuBuild (
color c4
) else (
color 4e
)
echo Aborted.
echo.
echo DETAILS: L_TYPE: %L_TYPE%
echo. L_PATH: %L_PATH%
echo. L_ITEM: %L_ITEM%
echo. L_ARGS: %L_ARGS%
echo. L_7ZIP: %L_7ZIP%
echo. L_ELEV: %L_ELEV%
echo. L_NCMD: %L_NCMD%
echo. L__CLI: %L__CLI%
echo. CON: %CON%
echo. DEBUG: %DEBUG%
echo. PYTHON: %PYTHON%
echo Press any key to exit...
pause>nul
rem reset color and reset errorlevel to 0
rem NOTE: This is done to avoid causing a ErrorLaunchCMD in the launcher.cmd
color 07
goto Exit
:: Cleanup and exit ::
:Exit
popd
endlocal
exit /b %errorlevel%

View file

@ -1,113 +0,0 @@
:: WizardKit: Launcher Script ::
::
:: This script works by setting env variables and then calling Launch.cmd
:: which inherits the variables. This bypasses batch file argument parsing
:: which is awful.
@echo off
:Init
setlocal EnableDelayedExpansion
title WizardKit: Launcher
call :CheckFlags %*
call :FindBin
call :SetTitle Launcher
:Optional
:: This section is for any work that needs done before launching L_ITEM
rem EXTRA_CODE
:DefineLaunch
:: See %bin%\Scripts\Launch.cmd for details under :Usage label
set L_TYPE=
set L_PATH=
set L_ITEM=
set L_ARGS=
set L__CLI=
set L_7ZIP=
set L_ELEV=
set L_NCMD=
:::::::::::::::::::::::::::::::::::::::::::
:: Do not edit anything below this line! ::
:::::::::::::::::::::::::::::::::::::::::::
:LaunchPrep
rem Verifies the environment before launching item
if not defined bin (goto ErrorNoBin)
if not exist "%bin%\Scripts\Launch.cmd" (goto ErrorLaunchCMDMissing)
:Launch
rem Calls the Launch.cmd script using the variables defined above
call "%bin%\Scripts\Launch.cmd" || goto ErrorLaunchCMD
goto Exit
:: Functions ::
:CheckFlags
rem Loops through all arguments to check for accepted flags
set DEBUG=
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on & set "DEBUG=/DEBUG")
)
@exit /b 0
:FindBin
rem Checks the current directory and all parents for the ".bin" folder
rem NOTE: Has not been tested for UNC paths
set bin=
pushd "%~dp0"
:FindBinInner
if exist ".bin" (goto FindBinDone)
if "%~d0\" == "%cd%" (popd & @exit /b 1)
cd ..
goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin"
set "cbin=%cd%\.cbin"
popd
@exit /b 0
:SetTitle
rem Sets title using KIT_NAME_FULL from wk\cfg\main.py
set "SETTINGS=%bin%\Scripts\wk\cfg\main.py"
for /f "tokens=* usebackq" %%f in (`findstr KIT_NAME_FULL "%SETTINGS%"`) do (
set "_v=%%f"
set "_v=!_v:*'=!"
set "KIT_NAME_FULL=!_v:~0,-1!"
)
set "window_title=%*"
if not defined window_title set "window_title=Launcher"
set "window_title=%KIT_NAME_FULL%: %window_title%"
title %window_title%
@exit /b 0
:: Errors ::
:ErrorLaunchCMD
echo.
echo ERROR: Launch.cmd did not run correctly. Try using the /DEBUG flag?
goto Abort
:ErrorLaunchCMDMissing
echo.
echo ERROR: Launch.cmd script not found.
goto Abort
:ErrorNoBin
echo.
echo ERROR: ".bin" folder not found.
goto Abort
:Abort
color 4e
echo Aborted.
echo.
echo Press any key to exit...
pause>nul
color
rem Set errorlevel to 1 by calling color incorrectly
color 00
goto Exit
:: Cleanup and exit ::
:Exit
endlocal
exit /b %errorlevel%

View file

@ -1,2 +0,0 @@
# WizardKit: Scripts #

View file

@ -1,37 +0,0 @@
#!/bin/bash
#
## WizardKit: Apple fan speed tool
SMCPATH="/sys/devices/platform/applesmc.768"
SET_MAX="True"
function usage {
echo "Usage: $(basename "$0") auto|max"
echo " e.g. $(basename "$0") max"
}
# Set mode
case $1 in
auto)
SET_MAX="False";;
max)
SET_MAX="True";;
*)
usage
exit 1;;
esac
if [[ -e "$SMCPATH" ]]; then
if [[ "$SET_MAX" == "True" ]]; then
# Set fans to max RPM
for fan in $SMCPATH/fan*max; do
echo '1' | sudo tee ${fan:0:-4}_manual > /dev/null
cat $fan | sudo tee ${fan:0:-4}_output > /dev/null
done
else
# Set fans to auto
for fan in $SMCPATH/fan*manual; do
echo '0' | sudo tee $fan > /dev/null
done
fi
fi

View file

@ -1,100 +0,0 @@
"""WizardKit: Auto Repair Tool"""
# vim: sts=2 sw=2 ts=2
from typing import Any
import wk
# Classes
REBOOT_STR = wk.ui.ansi.color_string('Reboot', 'YELLOW')
class MenuEntry():
"""Simple class to allow cleaner code below."""
def __init__(
self,
name: str,
function: str | None = None,
selected: bool = True,
**kwargs):
self.name: str = name
self.details: dict[str, Any] = {
'Function': function,
'Selected': selected,
**kwargs,
}
# STATIC VARIABLES
BASE_MENUS = {
'Groups': {
'Backup Settings': (
MenuEntry('Enable RegBack', 'auto_enable_regback'),
MenuEntry('Enable System Restore', 'auto_system_restore_enable'),
MenuEntry('Set System Restore Size', 'auto_system_restore_set_size'),
MenuEntry('Create System Restore', 'auto_system_restore_create'),
MenuEntry('Backup Browsers', 'auto_backup_browser_profiles'),
MenuEntry('Backup Power Plans', 'auto_backup_power_plans'),
MenuEntry('Reset Power Plans', 'auto_reset_power_plans'),
MenuEntry('Set Custom Power Plan', 'auto_set_custom_power_plan'),
MenuEntry('Backup Registry', 'auto_backup_registry'),
),
'Windows Repairs': (
MenuEntry('Disable Windows Updates', 'auto_windows_updates_disable'),
MenuEntry('Reset Windows Updates', 'auto_windows_updates_reset'),
MenuEntry(REBOOT_STR, 'auto_reboot'),
MenuEntry('CHKDSK', 'auto_chkdsk'),
MenuEntry('DISM RestoreHealth', 'auto_dism'),
MenuEntry('SFC Scan', 'auto_sfc'),
MenuEntry('Clear Proxy Settings', 'auto_reset_proxy'),
MenuEntry('Disable Pending Renames', 'auto_disable_pending_renames'),
MenuEntry('Registry Repairs', 'auto_repair_registry'),
MenuEntry('Reset UAC', 'auto_restore_uac_defaults'),
MenuEntry('Reset Windows Policies', 'auto_reset_windows_policies'),
),
'Malware Cleanup': (
MenuEntry('BleachBit', 'auto_bleachbit'),
MenuEntry('HitmanPro', 'auto_hitmanpro'),
MenuEntry('KVRT', 'auto_kvrt'),
MenuEntry('Windows Defender', 'auto_microsoft_defender'),
MenuEntry('Remove Custom Power Plan', 'auto_remove_power_plan'),
MenuEntry(REBOOT_STR, 'auto_reboot'),
),
'Manual Steps': (
MenuEntry('AdwCleaner', 'auto_adwcleaner'),
MenuEntry('Bulk Crap Uninstaller', 'auto_bcuninstaller'),
MenuEntry('Enable Windows Updates', 'auto_windows_updates_enable'),
),
},
'Options': (
MenuEntry('Kill Explorer', selected=False),
MenuEntry('Run AVRemover (once)'),
MenuEntry('Run RKill'),
MenuEntry('Sync Clock'),
MenuEntry('Use Autologon', selected=False),
),
'Actions': (
MenuEntry('Load Preset'),
MenuEntry('Options'),
MenuEntry('Start', Separator=True),
MenuEntry('Quit'),
),
}
PRESETS = {
'Default': { # Will be expanded at runtime using BASE_MENUS
'Options': (
'Run RKill',
'Sync Clock',
),
},
'Custom': {}, # Will remain empty at runtime
}
if __name__ == '__main__':
try:
wk.repairs.win.run_auto_repairs(BASE_MENUS, PRESETS)
except KeyboardInterrupt:
wk.ui.cli.abort()
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,175 +0,0 @@
"""WizardKit: Auto System Setup Tool"""
# vim: sts=2 sw=2 ts=2
from typing import Any
import wk
# Classes
class MenuEntry():
"""Simple class to allow cleaner code below."""
def __init__(
self,
name: str,
function: str | None = None,
selected: bool = True,
**kwargs):
self.name: str = name
self.details: dict[str, Any] = {
'Function': function,
'Selected': selected,
**kwargs,
}
# STATIC VARIABLES
BASE_MENUS = {
'Groups': {
'Backup Settings': (
MenuEntry('Backup Browsers', 'auto_backup_browser_profiles'),
MenuEntry('Backup Power Plans', 'auto_backup_power_plans'),
MenuEntry('Reset Power Plans', 'auto_reset_power_plans'),
MenuEntry('Set Custom Power Plan', 'auto_set_custom_power_plan'),
),
'Install Software': (
MenuEntry('Winget', 'auto_install_winget'),
MenuEntry('Firefox', 'auto_install_firefox'),
MenuEntry('LibreOffice', 'auto_install_libreoffice', selected=False),
MenuEntry('Open Shell', 'auto_install_open_shell'),
MenuEntry('Software Bundle', 'auto_install_software_bundle'),
MenuEntry('Software Upgrades', 'auto_install_software_upgrades'),
MenuEntry('Visual C++ Runtimes', 'auto_install_vcredists'),
),
'Configure System': (
MenuEntry('Open Shell', 'auto_config_open_shell'),
MenuEntry('Disable Password Expiration', 'auto_disable_password_expiration'),
MenuEntry('Enable BSoD MiniDumps', 'auto_enable_bsod_minidumps'),
MenuEntry('Enable RegBack', 'auto_enable_regback'),
MenuEntry('Enable System Restore', 'auto_system_restore_enable'),
MenuEntry('Set System Restore Size', 'auto_system_restore_set_size'),
MenuEntry('Enable Windows Updates', 'auto_windows_updates_enable'),
MenuEntry('Windows Activation', 'auto_activate_windows'),
MenuEntry('Windows Explorer', 'auto_config_explorer'),
MenuEntry(r'Windows\Temp Fix', 'auto_windows_temp_fix'),
MenuEntry('Configure Browsers', 'auto_config_browsers'),
MenuEntry('Create System Restore', 'auto_system_restore_create'),
),
'System Information': (
MenuEntry('AIDA64 Report', 'auto_export_aida64_report'),
MenuEntry('Backup Registry', 'auto_backup_registry'),
),
'System Summary': (
MenuEntry('Operating System', 'auto_show_os_name'),
MenuEntry('Windows Activation', 'auto_show_os_activation'),
MenuEntry('Secure Boot', 'auto_show_secure_boot_status'),
MenuEntry('Installed RAM', 'auto_show_installed_ram'),
MenuEntry('Storage Status', 'auto_show_storage_status'),
MenuEntry('Virus Protection', 'auto_show_installed_antivirus'),
MenuEntry('Partitions 4K Aligned', 'auto_show_4k_alignment_check'),
),
'Run Programs': (
MenuEntry('Device Manager', 'auto_open_device_manager'),
MenuEntry('HWiNFO Sensors', 'auto_open_hwinfo_sensors'),
MenuEntry('Microsoft Store Updates', 'auto_open_microsoft_store_updates'),
MenuEntry('Snappy Driver Installer', 'auto_open_snappy_driver_installer_origin'),
MenuEntry('Windows Activation', 'auto_open_windows_activation'),
MenuEntry('Windows Updates', 'auto_open_windows_updates'),
MenuEntry('XMPlay', 'auto_open_xmplay'),
),
},
'Actions': (
MenuEntry('Load Preset'),
MenuEntry('Start', Separator=True),
MenuEntry('Quit'),
),
}
PRESETS = {
'Default': {}, # Will be built at runtime using BASE_MENUS
'Additional User': {
'Configure System': (
'Configure Browsers',
'Open Shell',
'uBlock Origin',
'Enable BSoD MiniDumps',
'Enable RegBack',
'Enable System Restore',
'Set System Restore Size',
'Enable Windows Updates',
'Windows Explorer',
),
'Install Software': (
'Firefox', # Needed to handle profile upgrade nonsense
),
'Run Programs': (
'Microsoft Store Updates',
),
'System Summary': (
'Operating System',
'Windows Activation',
'Secure Boot',
'Installed RAM',
'Storage Status',
'Virus Protection',
'Partitions 4K Aligned',
),
},
'Hardware': {
'Configure System': (
'Enable BSoD MiniDumps',
'Enable RegBack',
'Enable System Restore',
'Set System Restore Size',
'Enable Windows Updates',
),
'System Information': (
'Backup Registry',
),
'System Summary': (
'Operating System',
'Windows Activation',
'Secure Boot',
'Installed RAM',
'Storage Status',
'Virus Protection',
'Partitions 4K Aligned',
),
'Run Programs': (
'Device Manager',
'HWiNFO Sensors',
'XMPlay',
),
},
'Verify': {
'Configure System': (
'Enable BSoD MiniDumps',
'Enable RegBack',
'Enable System Restore',
'Set System Restore Size',
'Enable Windows Updates',
'Windows Explorer',
),
'System Summary': (
'Operating System',
'Windows Activation',
'Secure Boot',
'Installed RAM',
'Storage Status',
'Virus Protection',
'Installed Office',
'Partitions 4K Aligned',
),
},
'Custom': {}, # Will remain empty at runtime
}
if __name__ == '__main__':
try:
wk.setup.win.run_auto_setup(BASE_MENUS, PRESETS)
except KeyboardInterrupt:
wk.ui.cli.abort()
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,14 +0,0 @@
#!/usr/bin/env python3
"""WizardKit: Build UFD Tool"""
# vim: sts=2 sw=2 ts=2
import wk
if __name__ == '__main__':
try:
wk.kit.ufd.build_ufd()
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,15 +0,0 @@
"""WizardKit: Build Kit (Windows)."""
# vim: sts=2 sw=2 ts=2
import wk
if __name__ == '__main__':
try:
wk.kit.build.build_kit()
except KeyboardInterrupt:
wk.ui.cli.abort()
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,13 +0,0 @@
# WizardKit: Check Antivirus
#Requires -Version 3.0
if (Test-Path Env:\DEBUG) {
Set-PSDebug -Trace 1
}
$Host.UI.RawUI.WindowTitle = "WizardKit: Check Antivirus"
$Host.UI.RawUI.BackgroundColor = "black"
$Host.UI.RawUI.ForegroundColor = "white"
$ProgressPreference = "SilentlyContinue"
# Main
Get-CimInstance -Namespace "root\SecurityCenter2" -ClassName AntivirusProduct | select displayName,productState | ConvertTo-Json

View file

@ -1,13 +0,0 @@
# WizardKit: Check Partition Alignment
#Requires -Version 3.0
if (Test-Path Env:\DEBUG) {
Set-PSDebug -Trace 1
}
$Host.UI.RawUI.WindowTitle = "WizardKit: Check Partition Alignment"
$Host.UI.RawUI.BackgroundColor = "black"
$Host.UI.RawUI.ForegroundColor = "white"
$ProgressPreference = "SilentlyContinue"
# Main
Get-CimInstance -Query "Select * from Win32_DiskPartition" | select Name,Size,StartingOffset | ConvertTo-Json

View file

@ -1,29 +0,0 @@
#!/bin/bash
#
## WizardKit: ddrescue TUI Launcher
__OS_NAME="$(uname -s)"
if [[ "$__OS_NAME" == "Darwin" ]]; then
__OS_NAME="macOS"
fi
__NOTICE="This script is not fully supported under $__OS_NAME!
Limitations:
Map files are saved to a RAM disk so you can't resume after a restart.
Only whole devices are supported.
Press Enter to continue..."
# Check if running under Linux
if [[ "$__OS_NAME" != "Linux" ]]; then
echo "${__NOTICE}"
read -r _dontcare
fi
source launch-in-tmux
SESSION_NAME="ddrescue-tui"
WINDOW_NAME="ddrescue TUI"
TMUX_CMD="ddrescue-tui.py"
launch_in_tmux "$@"

View file

@ -1,14 +0,0 @@
#!/usr/bin/env python3
"""WizardKit: ddrescue TUI"""
# vim: sts=2 sw=2 ts=2
import wk
if __name__ == '__main__':
try:
wk.clone.ddrescue.main()
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,13 +0,0 @@
# WizardKit: Disable Password Expiration (Local Accounts)
#Requires -Version 3.0
if (Test-Path Env:\DEBUG) {
Set-PSDebug -Trace 1
}
$Host.UI.RawUI.WindowTitle = "Disable Password Expiration"
$Host.UI.RawUI.BackgroundColor = "black"
$Host.UI.RawUI.ForegroundColor = "white"
$ProgressPreference = "SilentlyContinue"
# Main
Get-LocalUser | Set-LocalUser -PasswordNeverExpires $true

View file

@ -1,12 +0,0 @@
#!/bin/bash
#
## WizardKit: "echo" text to screen and "hold" by waiting for user input
function usage {
echo "Usage: $(basename "$0") \"text\""
echo " e.g. $(basename "$0") \"Some text to show\""
}
echo -en "$@" && read -r __dont_care
exit 0

View file

@ -1,24 +0,0 @@
"""WizardKit: Embedded Python helper.
This saves the keystrokes needed to fix the path and import wk. To use:
python.exe -i embedded_python_env.py
"""
# vim: sts=2 sw=2 ts=2
import pickle
import wk
# Functions
def load_state():
with open('debug/state.pickle', 'rb') as f:
return pickle.load(f)
# Main
wk.ui.cli.print_colored(
(wk.cfg.main.KIT_NAME_FULL, ': ', 'Debug Console'),
('GREEN', None, 'YELLOW'),
sep='',
)
print('')

View file

@ -1,6 +0,0 @@
"""WizardKit: Export Bitlocker Tool"""
# vim: sts=2 sw=2 ts=2
import wk
wk.os.win.export_bitlocker_info()

View file

@ -1,3 +0,0 @@
# WizardKit: Get RAW disks
Get-Disk | Where-Object {$_.PartitionStyle -eq "RAW"} | Select FriendlyName,Size,PartitionStyle | ConvertTo-JSON

View file

@ -1,11 +0,0 @@
#!/bin/bash
#
## WizardKit: HW Diagnostics Launcher
source launch-in-tmux
SESSION_NAME="hw-diags"
WINDOW_NAME="Hardware Diagnostics"
TMUX_CMD="hw-diags.py"
launch_in_tmux "$@"

View file

@ -1,14 +0,0 @@
#!/usr/bin/env python3
"""WizardKit: Hardware Diagnostics"""
# vim: sts=2 sw=2 ts=2
import wk
if __name__ == '__main__':
try:
wk.hw.diags.main()
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,49 +0,0 @@
#!/bin/bash
#
BLUE='\033[34m'
CLEAR='\033[0m'
IFS=$'\n'
# Check if running under Linux
os_name="$(uname -s)"
if [[ "$os_name" == "Darwin" ]]; then
os_name="macOS"
fi
if [[ "$os_name" != "Linux" ]]; then
echo "This script is not supported under $os_name." 1>&2
exit 1
fi
# List devices
for line in $(lsblk -do NAME,TRAN,SIZE,VENDOR,MODEL,SERIAL); do
if [[ "${line:0:4}" == "NAME" ]]; then
echo -e "${BLUE}${line}${CLEAR}"
else
echo "${line}"
fi
done
echo ""
# List loopback devices
if [[ "$(losetup -l | wc -l)" > 0 ]]; then
for line in $(losetup -lO NAME,PARTSCAN,RO,BACK-FILE); do
if [[ "${line:0:4}" == "NAME" ]]; then
echo -e "${BLUE}${line}${CLEAR}"
else
echo "${line}" | sed -r 's#/dev/(loop[0-9]+)#\1 #'
fi
done
echo ""
fi
# List partitions
for line in $(lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT); do
if [[ "${line:0:4}" == "NAME" ]]; then
echo -e "${BLUE}${line}${CLEAR}"
else
echo "${line}"
fi
done
echo ""

View file

@ -1,117 +0,0 @@
#!/bin/bash
#
# COLORS
CLEAR="\e[0m"
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
BLUE="\e[34m"
function print_in_columns() {
string="$1"
label="$(echo "$string" | sed -r 's/^\s*(.*:).*/\1/')"
value="$(echo "$string" | sed -r 's/^\s*.*:\s*(.*)/\1/')"
printf ' %-18s%s\n' "$label" "$value"
}
function print_dmi_value() {
name="$1"
file="/sys/devices/virtual/dmi/id/$2"
value="UNKNOWN"
if [[ -e "$file" ]]; then
value="$(cat "$file")"
fi
print_in_columns "$name: $value"
}
# Check if running under Linux
os_name="$(uname -s)"
if [[ "$os_name" == "Darwin" ]]; then
os_name="macOS"
fi
if [[ "$os_name" != "Linux" ]]; then
echo "This script is not supported under $os_name." 1>&2
exit 1
fi
# System
echo -e "${BLUE}System Information${CLEAR}"
print_dmi_value "Vendor" "sys_vendor"
print_dmi_value "Name" "product_name"
print_dmi_value "Serial" "product_serial"
echo ""
# Motherboard
echo -e "${BLUE}Motherboard${CLEAR}"
print_dmi_value "Vendor" "board_vendor"
print_dmi_value "Name" "board_name"
print_dmi_value "Version" "board_version"
print_dmi_value "Serial" "board_serial"
echo ""
# BIOS
echo -e "${BLUE}BIOS${CLEAR}"
print_dmi_value "Vendor" "bios_vendor"
print_dmi_value "Version" "bios_version"
print_dmi_value "Release Date" "bios_date"
echo ""
# Processor
echo -e "${BLUE}Processor${CLEAR}"
lscpu | grep -E '^(Arch|CPU.s.|Core|Thread|Model name|Virt)' \
| sed -r 's/\(s\)(.*:)/s\1 /' \
| sed -r 's/CPUs: /Threads:/' \
| sed -r 's/^(.*:) / \1/'
echo ""
# Memory
echo -e "${BLUE}Memory${CLEAR}"
first_device="True"
while read -r line; do
if [[ "$line" == "Memory Device" ]]; then
if [[ "$first_device" == "True" ]]; then
first_device="False"
else
# Add space between devices
echo ""
fi
else
print_in_columns "$line"
fi
done <<< $(sudo dmidecode -t memory \
| grep -E '^(Memory Device|\s+(Type|Size|Speed|Manuf.*|Locator|Part Number):)')
echo ""
# Graphics
echo -e "${BLUE}Graphics${CLEAR}"
lspci | grep 'VGA' | sed -r 's/^.*:/ Device: /' \
| sed 's/Intel Corporation/Intel/' \
| sed 's/Generation Core Processor Family/Gen/' \
| sed 's/Integrated Graphics Controller.*/iGPU/'
glxinfo 2>/dev/null | grep 'OpenGL renderer' | sed -r 's/^.*:/ OpenGL Renderer: /' \
| sed 's/Mesa DRI //'
echo ""
# Audio
echo -e "${BLUE}Audio${CLEAR}"
while read -r line; do
if [[ "$line" = .*no.soundcards.found.* ]]; then
echo " No soundcards found"
else
print_in_columns "$line"
fi
done <<< $(aplay -l 2>&1 | grep -Ei '(^card|no soundcards found)' | sed -r 's/.*\[(.*)\].*\[(.*)\].*/\1: \2/')
echo ""
# Network
echo -e "${BLUE}Network${CLEAR}"
lspci | grep -Ei '(ethernet|network|wireless|wifi)' \
| sed -r 's/.*: (.*)$/ \1/'
echo ""
# Drives
echo -e "${BLUE}Drives${CLEAR}"
hw-drive-info | sed 's/^/ /'
echo ""

View file

@ -1,46 +0,0 @@
#!/usr/bin/env python3
"""WizardKit: Hardware Sensors"""
# vim: sts=2 sw=2 ts=2
import platform
import wk
def main() -> None:
"""Show sensor data on screen."""
sensors = wk.hw.sensors.Sensors()
if platform.system() == 'Darwin':
wk.ui.cli.clear_screen()
while True:
print('\033[100A', end='')
sensors.update_sensor_data()
wk.ui.cli.print_report(sensors.generate_report('Current', 'Max'))
wk.std.sleep(1)
elif platform.system() == 'Linux':
proc = wk.exe.run_program(cmd=['mktemp'])
sensors.start_background_monitor(
out_path=proc.stdout.strip(),
exit_on_thermal_limit=False,
temp_labels=('Current', 'Max'),
)
watch_cmd = [
'watch',
'--color',
'--exec',
'--no-title',
'--interval', '1',
'cat',
proc.stdout.strip(),
]
wk.exe.run_program(watch_cmd, check=False, pipe=False)
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
pass
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,80 +0,0 @@
:: WizardKit: Create client_dir folder(s)
@echo off
if defined DEBUG (@echo on)
:SafetyCheck
if not defined bin (goto Abort)
:GetDate
:: Credit to SS64.com Code taken from http://ss64.com/nt/syntax-getdate.html
:: Use WMIC to retrieve date and time in ISO 8601 format.
for /f "skip=1 tokens=1-6" %%G in ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do (
if "%%~L"=="" goto s_done
set _yyyy=%%L
set _mm=00%%J
set _dd=00%%G
set _hour=00%%H
set _minute=00%%I
)
:s_done
:: Pad digits with leading zeros
set _mm=%_mm:~-2%
set _dd=%_dd:~-2%
set _hour=%_hour:~-2%
set _minute=%_minute:~-2%
set iso_date=%_yyyy%-%_mm%-%_dd%
:SetVars
set "SETTINGS=%bin%\Scripts\wk\cfg\main.py"
for /f "tokens=* usebackq" %%f in (`findstr KIT_NAME_SHORT "%SETTINGS%"`) do (
set "_v=%%f"
set "_v=!_v:*'=!"
set "KIT_NAME_SHORT=!_v:~0,-1!"
)
set "client_dir=%systemdrive%\%KIT_NAME_SHORT%"
set "log_dir=%client_dir%\Logs\%iso_date%"
:Flags
set _backups=
set _info=
set _office=
set _quarantine=
set _quickbooks=
set _transfer=
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
if /i "%%f" == "/Backups" set _backups=True
if /i "%%f" == "/Logs" set _logs=True
if /i "%%f" == "/Office" set _office=True
if /i "%%f" == "/Quarantine" set _quarantine=True
if /i "%%f" == "/QuickBooks" set _quickbooks=True
if /i "%%f" == "/Transfer" set _transfer=True
)
:CreateDirs
if defined _backups mkdir "%client_dir%\Backups">nul 2>&1
if defined _logs (
mkdir "%log_dir%\%KIT_NAME_FULL%">nul 2>&1
mkdir "%log_dir%\Tools">nul 2>&1)
if defined _office mkdir "%client_dir%\Office">nul 2>&1
if defined _quarantine mkdir "%client_dir%\Quarantine">nul 2>&1
if defined _quickbooks mkdir "%client_dir%\QuickBooks">nul 2>&1
if defined _transfer mkdir "%client_dir%\Transfer_%iso_date%">nul 2>&1
goto Done
:Abort
color 4e
echo Aborted.
echo.
echo Press any key to exit...
pause>nul
color
rem Set errorlevel to 1 by calling color incorrectly
color 00
goto Exit
:Done
goto Exit
:Exit

View file

@ -1,37 +0,0 @@
# WizardKit: Install winget (if needed)
#Requires -Version 3.0
if (Test-Path Env:\DEBUG) {
Set-PSDebug -Trace 1
}
$Host.UI.RawUI.WindowTitle = "WizardKit: Winget installer"
$Host.UI.RawUI.BackgroundColor = "black"
$Host.UI.RawUI.ForegroundColor = "white"
$ProgressPreference = "SilentlyContinue"
# STATIC VARIABLES
$EXIT_OK = 0
$EXIT_INSTALLED = 1
$EXIT_FAILED_TO_INSTALL = 2
# Main
$NeedsInstalled = $false
try {
$_ = $(winget --version)
}
catch {
$NeedsInstalled = $true
}
# Install
if (! $NeedsInstalled) {
exit $EXIT_INSTALLED
}
try {
Add-AppxPackage -ErrorAction Stop -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
}
catch {
exit $EXIT_FAILED_TO_INSTALL
}
exit $EXIT_OK

View file

@ -1,7 +0,0 @@
#!/bin/bash
#
## Monitor journal log for data recovery related events
echo -e 'Monitoring journal output...\n'
journalctl -kf \
| grep -Ei --color=always 'ata|nvme|scsi|sd[a..z]+|usb|comreset|critical|error'

View file

@ -1,74 +0,0 @@
#!/bin/bash
#
## WizardKit: TMUX Launcher
# Live macOS env workaround
tmux_args=()
if [[ -e "/.wk-live-macos" ]]; then
tmux_args=(-f "/etc/tmux.conf" -S "/Volumes/RAM_Disk/.tmux.socket")
fi
function ask() {
while :; do
read -p "$1 [Y/N] " -r answer
if echo "$answer" | grep -Eiq '^(y|yes|sure)$'; then
return 0
elif echo "$answer" | grep -Eiq '^(n|no|nope)$'; then
return 1
fi
done
}
function err () {
echo "$0:" "$@" >&2
return 1
}
function launch_in_tmux() {
# Check for required vars
[[ -n "${SESSION_NAME:-}" ]] || return $(err "Required variable missing (SESSION_NAME)")
[[ -n "${WINDOW_NAME:-}" ]] || return $(err "Required variable missing (WINDOW_NAME)")
[[ -n "${TMUX_CMD:-}" ]] || return $(err "Required variable missing (TMUX_CMD)")
# Check for running session
if tmux "${tmux_args[@]}" list-session 2>&1 | grep -q "$SESSION_NAME"; then
echo "WARNING: tmux session $SESSION_NAME already exists."
echo ""
if ask "Connect to current session?"; then
if [[ -n "${TMUX:-}" ]]; then
# Running inside TMUX, switch to session
tmux "${tmux_args[@]}" switch-client -t "$SESSION_NAME"
if ! jobs %% >/dev/null 2>&1; then
# No running jobs, try exiting abandoned tmux session
exit 0
fi
else
# Running outside TMUX, attach to session
tmux "${tmux_args[@]}" attach-session -t "$SESSION_NAME"
fi
return 0
elif ask "Kill current session and start new session?"; then
tmux "${tmux_args[@]}" kill-session -t "$SESSION_NAME" || \
die "Failed to kill session: $SESSION_NAME"
else
echo "Aborted."
return 1
fi
fi
# Start session
if [[ -n "${TMUX:-}" ]]; then
# Running inside TMUX, save current session/window names
ORIGINAL_SESSION_NAME="$(tmux "${tmux_args[@]}" display-message -p '#S')"
ORIGINAL_WINDOW_NAME="$(tmux "${tmux_args[@]}" display-message -p '#W')"
tmux "${tmux_args[@]}" rename-session "$SESSION_NAME"
tmux "${tmux_args[@]}" rename-window "$WINDOW_NAME"
"$TMUX_CMD" "$@"
# Restore previous session/window names
tmux "${tmux_args[@]}" rename-session "${ORIGINAL_SESSION_NAME}"
tmux "${tmux_args[@]}" rename-window "${ORIGINAL_WINDOW_NAME}"
else
# Running outside TMUX, start/attach to session
tmux "${tmux_args[@]}" new-session -s "$SESSION_NAME" -n "$WINDOW_NAME" "$TMUX_CMD" "$@"
fi
}

View file

@ -1,99 +0,0 @@
"""WizardKit: Launch Snappy Driver Installer Origin"""
# vim: sts=2 sw=2 ts=2
from subprocess import CompletedProcess
import wk
from wk.cfg.net import SDIO_SERVER
# STATIC VARIABLES
MOUNT_EXCEPTIONS = (
RuntimeError,
wk.exe.subprocess.CalledProcessError,
)
SDIO_LOCAL_PATH = wk.kit.tools.get_tool_path("SDIO", "SDIO")
SDIO_REMOTE_PATH = wk.io.get_path_obj(
(
fr'\\{SDIO_SERVER["Address"]}\{SDIO_SERVER["Share"]}\{SDIO_SERVER["Path"]}'
fr'\SDIO{"64" if wk.os.win.ARCH == "64" else ""}.exe'
),
resolve=False,
)
# Functions
def try_again() -> bool:
"""Ask to try again or quit."""
if wk.ui.cli.ask(' Try again?'):
return True
if not wk.ui.cli.ask(' Use local version?'):
wk.ui.cli.abort()
return False
def use_network_sdio() -> bool:
"""Try to mount SDIO server."""
use_network = False
def _mount_server() -> CompletedProcess:
print('Connecting to server... (Press CTRL+c to use local copy)')
return wk.net.mount_network_share(SDIO_SERVER, read_write=False)
# Bail early
if not SDIO_SERVER['Address']:
return use_network
# Main loop
while True:
try:
proc = _mount_server()
except KeyboardInterrupt:
break
except MOUNT_EXCEPTIONS as err:
wk.ui.cli.print_error(f' {err}')
if not try_again():
break
else:
if proc.returncode == 0:
# Network copy available
use_network = True
break
# Failed to mount
wk.ui.cli.print_error(' Failed to mount server')
if not try_again():
break
# Done
return use_network
if __name__ == '__main__':
wk.ui.cli.set_title(
f'{wk.cfg.main.KIT_NAME_FULL}: Snappy Driver Installer Origin Launcher',
)
log_dir = wk.log.format_log_path(tool=True).parent
USE_NETWORK = False
# Windows 11 workaround
if wk.os.win.OS_VERSION == 11:
appid_services = ['appid', 'appidsvc', 'applockerfltr']
for svc in appid_services:
wk.os.win.stop_service(svc)
if any([wk.os.win.get_service_status(s) != 'stopped' for s in appid_services]):
raise wk.std.GenericWarning('Failed to stop AppID services')
# Try to mount server
try:
USE_NETWORK = use_network_sdio()
except KeyboardInterrupt:
wk.ui.cli.abort()
# Run SDIO
EXE_PATH = SDIO_LOCAL_PATH
if USE_NETWORK:
EXE_PATH = SDIO_REMOTE_PATH
print('Using network copy!')
else:
print('Using local copy!')
cmd = [EXE_PATH, '-log_dir', log_dir]
wk.exe.run_program(cmd, check=False, cwd=EXE_PATH.parent)

View file

@ -1,67 +0,0 @@
#!/bin/env python3
#
import json
import re
import subprocess
from typing import Any
CPU_REGEX = re.compile(r'(core|k\d+)temp', re.IGNORECASE)
NON_TEMP_REGEX = re.compile(r'^(fan|in|curr)', re.IGNORECASE)
def get_data() -> dict[Any, Any]:
cmd = ('sensors', '-j')
data = {}
raw_data = []
try:
proc = subprocess.run(
args=cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
encoding='utf-8',
check=True,
)
except subprocess.CalledProcessError:
return data
for line in proc.stdout.splitlines():
if line.strip() == ',':
# Assuming malformatted line caused by missing data
continue
raw_data.append(line)
try:
data = json.loads('\n'.join(raw_data))
except json.JSONDecodeError:
# Still broken, just return the empty dict
pass
return data
def get_max_temp(data) -> str:
cpu_temps = []
max_cpu_temp = '??° C'
for adapter, sources in data.items():
if not CPU_REGEX.search(adapter):
continue
sources.pop('Adapter', None)
for labels in sources.values():
for label, temp in sorted(labels.items()):
if 'input' not in label or NON_TEMP_REGEX.search(label):
continue
cpu_temps.append(temp)
# Format data
if cpu_temps:
max_cpu_temp = int(max(cpu_temps))
max_cpu_temp = f'{max_cpu_temp:02d}° C'
# Done
return max_cpu_temp
if __name__ == '__main__':
sensor_data = get_data()
print(get_max_temp(sensor_data))

View file

@ -1,41 +0,0 @@
#!/usr/bin/env python3
"""WizardKit: Mount all volumes"""
# vim: sts=2 sw=2 ts=2
import sys
import wk
# Functions
def main() -> None:
"""Mount all volumes and show results."""
wk.ui.cli.print_standard(f'{wk.cfg.main.KIT_NAME_FULL}: Volume mount tool')
wk.ui.cli.print_standard(' ')
# Mount volumes and get report
wk.ui.cli.print_standard('Mounting volumes...')
wk.os.linux.mount_volumes()
report = wk.os.linux.build_volume_report()
# Show results
wk.ui.cli.print_info('Results')
wk.ui.cli.print_report(report)
# GUI mode
if 'gui' in sys.argv:
wk.ui.cli.pause('Press Enter to exit...')
wk.exe.popen_program(['nohup', 'thunar', '/media'])
if __name__ == '__main__':
if wk.std.PLATFORM != 'Linux':
os_name = wk.std.PLATFORM.replace('Darwin', 'macOS')
wk.ui.cli.print_error(f'This script is not supported under {os_name}.')
wk.ui.cli.abort()
try:
main()
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,29 +0,0 @@
#!/usr/bin/env python3
"""WizardKit: Mount Backup Shares"""
# vim: sts=2 sw=2 ts=2
import wk
# Functions
def main() -> None:
"""Attempt to mount backup shares and print report."""
wk.ui.cli.print_info('Mounting Backup Shares')
report = wk.net.mount_backup_shares()
for line in report:
color = 'GREEN'
line = f' {line}'
if 'Failed' in line:
color = 'RED'
elif 'Already' in line:
color = 'YELLOW'
print(wk.ansi.color_string(line, color))
if __name__ == '__main__':
try:
main()
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()

View file

@ -1,32 +0,0 @@
#!/bin/bash
#
## WizardKit: RAW image mounting tool
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
LOOPDEV="$(losetup -f)"
function usage {
echo "Usage: $(basename "$0") [image]"
echo " e.g. $(basename "$0") HDD.dd"
}
if [[ -f "${1:-}" ]]; then
sudo losetup -P "${LOOPDEV}" "${1:-}"
sleep 1
if [[ -b "${LOOPDEV}p1" ]]; then
# losetup detected partitions
for dev in "${LOOPDEV}p"*; do
udevil mount -o ro "${dev}" || true
done
else
# losetup did not detect partitions, attempt whole image
udevil mount -o ro "${LOOPDEV}" || true
fi
else
usage
exit 1
fi

View file

@ -1,79 +0,0 @@
#!/bin/python3
#
## WizardKit: MS Word content search tool
import os
import re
import sys
import wk
# STATIC VARIABLES
SCANDIR = os.getcwd()
USAGE = '''Usage: {script} <search-terms>...
e.g. {script} "Book Title" "Keyword" "etc"
This script will search all doc/docx files below the current directory for
the search-terms provided (case-insensitive).'''.format(script=__file__)
REGEX_DOC_FILES = re.compile(r'\.docx?$', re.IGNORECASE)
def scan_for_docs(path):
for entry in os.scandir(path):
if entry.is_dir(follow_symlinks=False):
yield from scan_for_docs(entry.path)
elif entry.is_file and REGEX_DOC_FILES.search(entry.name):
yield entry
def scan_file(file_path, search):
match = False
try:
if entry.name.lower().endswith('.docx'):
result = wk.exe.run_program(['unzip', '-p', entry.path])
else:
# Assuming .doc
result = wk.exe.run_program(['antiword', entry.path])
out = result.stdout.decode()
match = re.search(search, out, re.IGNORECASE)
except Exception:
# Ignore errors since files may be corrupted
pass
return entry.path if match else None
if __name__ == '__main__':
try:
# Prep
wk.ui.cli.clear_screen()
terms = [re.sub(r'\s+', r'\s*', t) for t in sys.argv[1:]]
search = '({})'.format('|'.join(terms))
if len(sys.argv) == 1:
# Print usage
wk.ui.cli.print_standard(USAGE)
else:
matches = []
for entry in scan_for_docs(SCANDIR):
matches.append(scan_file(entry.path, search))
# Strip None values (i.e. non-matching entries)
matches = [m for m in matches if m]
if matches:
wk.ui.cli.print_success('Found {} {}:'.format(
len(matches),
'Matches' if len(matches) > 1 else 'Match'))
for match in matches:
wk.ui.cli.print_standard(match)
else:
wk.ui.cli.print_error('No matches found.')
# Done
wk.ui.cli.print_standard('\nDone.')
#pause("Press Enter to exit...")
except SystemExit:
raise
except: # noqa: E722
wk.ui.cli.major_exception()
# vim: sts=2 sw=2 ts=2

View file

@ -1,10 +0,0 @@
#!/bin/env bash
#
## Enable numlock if no battery is detected
## Credit: https://wiki.archlinux.org/title/Activating_numlock_on_bootup#With_systemd_service
if ! compgen -G "/sys/class/power_supply/BAT*" >/dev/null; then
for tty in /dev/tty{1..6}; do
/usr/bin/setleds -D +num < "$tty"
done
fi

View file

@ -1,18 +0,0 @@
#!/bin/bash
#
## WizardKit: Update pacman settings to usage in live sessions
# Disable custom repo (used at build-time)
sudo sed -i -r "s/^(\[custom\])/#\1/" /etc/pacman.conf
sudo sed -i -r "s/^(SigLevel = Optional TrustAll)/#\1/" /etc/pacman.conf
sudo sed -i -r "s/^(Server = )/#\1/" /etc/pacman.conf
# Disable signature checks
sudo sed -i -r "s/^SigLevel.*/SigLevel = Never/" /etc/pacman.conf
# Init Pacman keyring
sudo systemctl start pacman-init.service
# Refresh package databases and install packages (if provided)
sudo pacman -Sy "$@"

View file

@ -1,19 +0,0 @@
[tool.ruff.per-file-ignores]
# Init files
"wk/__init__.py" = ["F401"]
"wk/cfg/__init__.py" = ["F401"]
"wk/clone/__init__.py" = ["F401"]
"wk/hw/__init__.py" = ["F401"]
"wk/kit/__init__.py" = ["F401"]
"wk/os/__init__.py" = ["F401"]
"wk/repairs/__init__.py" = ["F401"]
"wk/setup/__init__.py" = ["F401"]
"wk/ui/__init__.py" = ["F401"]
# Long lines
"wk/borrowed/acpi.py" = ["E501", "F841"]
"wk/cfg/ddrescue.py" = ["E501"]
"wk/cfg/hw.py" = ["E501"]
"wk/cfg/launchers.py" = ["E501"]
"wk/cfg/setup.py" = ["E501"]
"wk/cfg/sources.py" = ["E501"]

View file

@ -1,21 +0,0 @@
#!/bin/bash
#
## WizardKit: Volume remount tool
if ! mount | grep -q "$1"; then
echo "ERROR: Can't remount $1"
sleep 2s
exit 1
fi
DEVICE=$(mount | grep "$1" | cut -d' ' -f1)
# Remount read-write
echo "Remounting: $DEVICE"
udevil umount $DEVICE
if udevil mount $DEVICE; then
echo "Done"
else
echo "Failed"
fi
exit 0

View file

@ -1,33 +0,0 @@
#!/bin/bash
#
# Magic numbers:
## Width: | 20 | term_x | 20 | 180 (conky) | 20 |
## Height: | 24 | 10 (titlebar) | term_y | 24 | 30 (Tint2) |
## X Offset: 20 - 5 (shadow?)
## Y Offset: 24 - 5 (shadow?)
conky_width=180
gap_x=20
gap_y=24
picom_shadow=5
tint2_height=30
titlebar_height=10
source ~/.screen_data
if [[ "${dpi}" -ge 192 ]]; then
conky_width=360
gap_x=40
gap_y=48
picom_shadow=5
tint2_height=60
titlebar_height=20
fi
offset_x=$(echo "$gap_x - $picom_shadow" | bc)
offset_y=$(echo "$gap_y - $picom_shadow" | bc)
term_width="$(echo "$width_px - ($gap_x * 3) - $conky_width" | bc)"
term_height="$(echo "$height_px - ($gap_y * 2) - $titlebar_height - $tint2_height" | bc)"
sleep 0.1s
wmctrl -r :ACTIVE: -e "0,$offset_x,$offset_y,$term_width,$term_height" && "$@"

Some files were not shown because too many files have changed in this diff Show more