Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
af76831ca1
8 changed files with 13 additions and 28 deletions
|
|
@ -31,13 +31,12 @@ for %%v in (ARCHIVE_PASSWORD KIT_NAME_FULL OFFICE_SERVER_IP QUICKBOOKS_SERVER_IP
|
|||
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\7za.exe"
|
||||
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 "SEVEN_ZIP=%bin%\7-Zip\7za64.exe"
|
||||
set "CON=%bin%\ConEmu\ConEmu64.exe"
|
||||
set "FASTCOPY=%bin%\FastCopy\FastCopy64.exe"
|
||||
set "PYTHON=%bin%\Python\x64\python.exe"
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ REGEX_SDIO_NETWORK_DRIVERS = re.compile(
|
|||
re.IGNORECASE,
|
||||
)
|
||||
REGEX_TORRENT_INDICES = re.compile(r'^(?P<index>\d+)\|(?P<path>.*)')
|
||||
SEVEN_ZIP = get_tool_path('7-Zip', '7za')
|
||||
SEVEN_ZIP_FULL = get_tool_path('7-Zip', '7z', check=False) # TODO: Replace with unrar from Pypi?
|
||||
SEVEN_ZIP = get_tool_path('7-Zip', '7z')
|
||||
WIDTH = 50
|
||||
|
||||
|
||||
|
|
@ -463,17 +462,13 @@ def download_xmplay_music():
|
|||
# Extract SNES archives
|
||||
for item in music_tmp.joinpath('SNES').iterdir():
|
||||
cmd = [
|
||||
SEVEN_ZIP_FULL,
|
||||
SEVEN_ZIP,
|
||||
'x', item, f'-oSNES\\{item.stem}',
|
||||
'-bso0', '-bse0', '-bsp0',
|
||||
]
|
||||
run_program(cmd)
|
||||
delete_item(item)
|
||||
|
||||
# Remove 7-Zip (Full) from kit
|
||||
delete_item(SEVEN_ZIP_FULL)
|
||||
delete_item(SEVEN_ZIP_FULL.with_name('7z.dll'))
|
||||
|
||||
# Remove bad songs
|
||||
for game, globs in MUSIC_SNES_BAD.items():
|
||||
for glob in globs:
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ def extract_archive(archive, out_path, *args, mode='x', silent=True):
|
|||
"""Extract an archive to out_path."""
|
||||
out_path = pathlib.Path(out_path).resolve()
|
||||
out_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
cmd = [get_tool_path('7-Zip', '7za'), mode, archive, f'-o{out_path}', *args]
|
||||
cmd = [get_tool_path('7-Zip', '7z'), mode, archive, f'-o{out_path}', *args]
|
||||
if silent:
|
||||
cmd.extend(['-bso0', '-bse0', '-bsp0'])
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ from wk.std import (
|
|||
# STATIC VARIABLES
|
||||
LOG = logging.getLogger(__name__)
|
||||
BACKUP_BROWSER_BASE_CMD = (
|
||||
get_tool_path('7-Zip', '7za'),
|
||||
get_tool_path('7-Zip', '7z'),
|
||||
'a', '-t7z', '-mx=1', '-bso0', '-bse0', '-bsp0',
|
||||
)
|
||||
CONEMU_EXE = get_tool_path('ConEmu', 'ConEmu', check=False)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ IMAGE_DEV="$(hdiutil attach -mountpoint /Volumes/BaseSystem "${BASE_IMAGE}" -nob
|
|||
OS_NAME="$(ls /Volumes/BaseSystem | grep -E 'OS X|macOS' | sed -E 's/Install (OS X|macOS) (.*)\.app/\2/')"
|
||||
OS_VERSION="$(defaults read /Volumes/BaseSystem/System/Library/CoreServices/SystemVersion ProductVersion)"
|
||||
OUT_NAME="${HOME}/Desktop/WK ${OS_NAME} ($(date +"%Y-%m-%d"))"
|
||||
TIMEZONE="$(fgrep LINUX_TIME_ZONE "${ROOT_DIR}/scripts/wk/cfg/main.py" | cut -d '=' -f 2 | sed "s/'//g")"
|
||||
TIMEZONE="$(grep -F LINUX_TIME_ZONE "${ROOT_DIR}/scripts/wk/cfg/main.py" | cut -d '=' -f 2 | sed "s/'//g")"
|
||||
WK_PATH="/Volumes/1201_UFD"
|
||||
|
||||
# Convert to a 4 GB R/W image
|
||||
|
|
@ -133,7 +133,7 @@ cp -a "${MACOS_DIR}/aliases" "${WK_PATH}/.aliases"
|
|||
cp -a "${MACOS_DIR}/bashrc" "${WK_PATH}/etc/profile"
|
||||
cp -a "${MACOS_DIR}/vimrc" "${WK_PATH}/.vimrc"
|
||||
if [[ "${OS_VERSION:3:2}" == "11" ]]; then
|
||||
cp -a /usr/bin/fgrep "${WK_PATH}/usr/bin"/
|
||||
cp -a /usr/bin/grep -F "${WK_PATH}/usr/bin"/
|
||||
cp -a /usr/bin/locale "${WK_PATH}/usr/bin"/
|
||||
rsync -aS /usr/share/locale/ "${WK_PATH}/usr/share/locale"/
|
||||
elif [[ "${OS_VERSION:3:2}" == "13" ]]; then
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then
|
|||
echo "Done"
|
||||
|
||||
# Start X or HW-diags
|
||||
if ! fgrep -q "nox" /proc/cmdline; then
|
||||
if ! grep -Fq "nox" /proc/cmdline; then
|
||||
# Show freeze warning
|
||||
echo ""
|
||||
echo "NOTE: Not all GPUs/displays are supported."
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ cd /Volumes/RAM_Disk
|
|||
|
||||
# Connect to WiFi?
|
||||
if ! [[ -e /Volumes/RAM_Disk/.wifi ]]; then
|
||||
WIFI_NET="$(fgrep ':::' /.known_networks | head -1)"
|
||||
WIFI_NET="$(grep -F ':::' /.known_networks | head -1)"
|
||||
if ! ifconfig | grep -Eq '(((10|172)\.\d+|192.168)\.\d+\.\d+)' 2>/dev/null; then
|
||||
echo "Connecting to WiFi..."
|
||||
NET_DEV="$(/usr/sbin/networksetup \
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ if ($MyInvocation.InvocationName -ne ".") {
|
|||
|
||||
# 7-Zip
|
||||
DownloadFile -Path $Temp -Name "7z-installer.msi" -Url $Sources.'7-Zip Installer'
|
||||
DownloadFile -Path $Temp -Name "7z-extra.7z" -Url $Sources.'7-Zip Extra'
|
||||
|
||||
# ConEmu
|
||||
DownloadFile -Path $Temp -Name "ConEmuPack.7z" -Url $Sources.'ConEmu'
|
||||
|
|
@ -125,24 +124,16 @@ if ($MyInvocation.InvocationName -ne ".") {
|
|||
|
||||
## Extract ##
|
||||
# 7-Zip
|
||||
## NOTE: 7z.exe & 7z.dll are left for build_kit_windows.py, they'll be removed by it
|
||||
Write-Host "Extracting: 7-Zip"
|
||||
try {
|
||||
$ArgumentList = @("/a", "$Temp\7z-installer.msi", "TARGETDIR=$Temp\7zi", "/qn")
|
||||
Start-Process -FilePath "$System32\msiexec.exe" -ArgumentList $ArgumentList -Wait
|
||||
$SevenZip = "$Temp\7zi\Files\7-Zip\7z.exe"
|
||||
$ArgumentList = @(
|
||||
"x", "$Temp\7z-extra.7z", "-o$Bin\7-Zip",
|
||||
"-aoa", "-bso0", "-bse0", "-bsp0",
|
||||
"-x!x64\*.dll", "-x!Far", "-x!*.dll")
|
||||
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
|
||||
Start-Sleep 1
|
||||
Move-Item "$Temp\7zi\Files\7-Zip\7z.exe" "$Bin\7-Zip\7z.exe"
|
||||
New-Item -Type Directory $Bin\7-Zip 2>&1 | Out-Null
|
||||
Move-Item "$Temp\7zi\Files\7-Zip\7z.dll" "$Bin\7-Zip\7z.dll"
|
||||
Move-Item "$Bin\7-Zip\x64\7za.exe" "$Bin\7-Zip\7za64.exe"
|
||||
Remove-Item "$Bin\7-Zip\x64" -Recurse
|
||||
Move-Item "$Temp\7zi\Files\7-Zip\7z.exe" "$Bin\7-Zip\7z.exe"
|
||||
Move-Item "$Temp\7zi\Files\7-Zip\License.txt" "$Bin\7-Zip\License.txt"
|
||||
Remove-Item "$Temp\7z*" -Recurse
|
||||
$SevenZip = "$Bin\7-Zip\7za.exe"
|
||||
$SevenZip = "$Bin\7-Zip\7z.exe"
|
||||
}
|
||||
catch {
|
||||
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
|
||||
|
|
|
|||
Loading…
Reference in a new issue