diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-05-19 18:38:27 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-05-19 18:38:27 +0200 |
commit | 50d630d1234d5cef6c7c457d44215e3ff404696e (patch) | |
tree | 353af747aa495e664cc2fe9fc6df5e6b44ca0297 /converter/convert_windows_x64.sh | |
parent | fcdb5ca193406ef02dba8db4d7684d8c74089552 (diff) | |
download | atomic-mane.tar.gz atomic-mane.tar.bz2 atomic-mane.zip |
Diffstat (limited to 'converter/convert_windows_x64.sh')
-rwxr-xr-x | converter/convert_windows_x64.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/converter/convert_windows_x64.sh b/converter/convert_windows_x64.sh new file mode 100755 index 0000000..58d72c4 --- /dev/null +++ b/converter/convert_windows_x64.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +me="$(realpath "$(dirname "$0")")" + +if [ ! -d "$1" ]; then + echo "$0: No such file or directory" + exit +fi + +if [ ! -f "$1/vk_swiftshader.dll" ]; then + echo "$0: Application is not a valid Atomic application" + exit +fi + +original=$(du -hs "$1" | awk '{print $1;}') + +echo "$0: Removing built-in Electron" +rm -rf "$1/locales" "$1/"*".pak" "$1/chrome_crashpad_handler" "$1/icudtl.dat" "$1/"*".dll" "$1/libvulkan.so.1" "$1/LICENSE" "$1/LICENSES.chromium.html" "$1/"*".bin" "$1/version" "$1/vk_swiftshader_icd.json" + +executable=$(ls "$1/"*".exe") + +echo "$0: Executable found at $executable" + +echo "$0: Copying launcher" +rm -f "$executable" +cp "$me/launcher-windows-x64.exe" "$executable" || cp "$me/../Launcher/launcher-windows-x64.exe" "$executable" + +new=$(du -hs "$1" | awk '{print $1;}') + +echo "$0: Completed. Was $original, is now $new." |