diff --git a/readme.md b/readme.md index 7ccb144..e9d8c89 100644 --- a/readme.md +++ b/readme.md @@ -33,6 +33,8 @@ ### 让你们看看原神的力量 去吧 芭芭拉! +~~tips: ⚡️点击图片获取惊喜!~~ + [![启动](https://i2.hdslb.com/bfs/archive/966fe6fe2c1329919bb8972d69fb8c09d17047cc.jpg@100w_100h_1c.png)](https://ipfs.lanyundev.com/ipfs/bafybeigpm6ocaba2wlgi7zgio3lu7hzqxgrviiicuwc5xbddlo77leabcy/6e51fccaeb5343bda366d42e68c3c705.MP4) # 使用 @@ -129,9 +131,10 @@ EA7E-8888 PD 19 说明与注意事项:
-1. 注入后先不要打开PD, 去运行"Parallels_原始人_起洞.command", PD将会自动启动。 -2. 每次打开PD都要重复步骤1才能完美使用。步骤1执行一次之后只要PD你没有退出, 就可以直接使用PD不需要再去执行步骤1。 -3. 总结: 原始人,起洞! +1. 注入后先不要打开PD,如果已打开,请关闭.去`tool`目录下运行"Parallels\_原始人\_起洞.command". +2. 若你配置一键启动PD,那么只需要去`应用程序`文件夹将`启动_PD.app`添加到`Dock`栏即可实现启动.如果不配置请看下面👇. +3. 每次打开PD都要重复步骤1才能完美使用。步骤1执行一次之后只要PD你没有退出, 就可以直接使用PD不需要再去执行步骤1. +4. 总结: 原始人,起洞! 灵感和解决思路来自于:
仓库: https://github.com/trueToastedCode/ParallelsLab/tree/%3E18.1.1-53328-lab
diff --git "a/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Info.plist" "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Info.plist" new file mode 100644 index 0000000..7545202 --- /dev/null +++ "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Info.plist" @@ -0,0 +1,109 @@ + + + + + AMIsApplet + + AMStayOpen + + BuildMachineOSBuild + 22A380017 + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + * + + CFBundleTypeName + Automator workflow file + CFBundleTypeOSTypes + + **** + + CFBundleTypeRole + Viewer + + + CFBundleExecutable + Automator Application Stub + CFBundleIconFile + ApplicationStub + CFBundleIdentifier + com.apple.automator.test + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + test + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.3 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleURLTypes + + CFBundleVersion + 523 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + + DTPlatformName + macosx + DTPlatformVersion + 14.0 + DTSDKBuild + 23A312 + DTSDKName + macosx14.0.internal + DTXcode + 1500 + DTXcodeBuild + 15A6160m + LSMinimumSystemVersion + 10.9 + LSUIElement + + NSAppleEventsUsageDescription + This workflow needs to control other applications to run. + NSAppleMusicUsageDescription + This workflow needs access to your music to run. + NSAppleScriptEnabled + YES + NSCalendarsUsageDescription + This workflow needs access to your calendars to run. + NSCameraUsageDescription + This workflow needs access to your camera to run. + NSContactsUsageDescription + This workflow needs access to your contacts to run. + NSHomeKitUsageDescription + This workflow needs access to your HomeKit Home to run. + NSMicrophoneUsageDescription + This workflow needs access to your microphone to run. + NSPhotoLibraryUsageDescription + This workflow needs access to your photos to run. + NSPrincipalClass + NSApplication + NSRemindersUsageDescription + This workflow needs access to your reminders to run. + NSServices + + NSSiriUsageDescription + This workflow needs access to Siri to run. + NSSystemAdministrationUsageDescription + This workflow needs access to administer this system in order to run. + UTExportedTypeDeclarations + + UTImportedTypeDeclarations + + + diff --git "a/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/MacOS/Automator Application Stub" "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/MacOS/Automator Application Stub" new file mode 100755 index 0000000..47a391e Binary files /dev/null and "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/MacOS/Automator Application Stub" differ diff --git "a/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/ApplicationStub.icns" "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/ApplicationStub.icns" new file mode 100644 index 0000000..5c5f989 Binary files /dev/null and "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/ApplicationStub.icns" differ diff --git "a/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/Assets.car" "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/Assets.car" new file mode 100644 index 0000000..4c96651 Binary files /dev/null and "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/Assets.car" differ diff --git "a/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/InfoPlist.loctable" "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/InfoPlist.loctable" new file mode 100644 index 0000000..a5d717b Binary files /dev/null and "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/Resources/InfoPlist.loctable" differ diff --git "a/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/_CodeSignature/CodeResources" "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/_CodeSignature/CodeResources" new file mode 100644 index 0000000..34c8726 --- /dev/null +++ "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/_CodeSignature/CodeResources" @@ -0,0 +1,171 @@ + + + + + files + + Resources/ApplicationStub.icns + + RYTqh+7iocnEIV8iTs9EgJjEkO4= + + Resources/Assets.car + + VP/bAnHkPdl7+A5lnQ7hMKoX8Kk= + + Resources/InfoPlist.loctable + + 71fUaDHmKoEjKlKkMLLNl4Pivgg= + + + files2 + + Resources/ApplicationStub.icns + + hash + + RYTqh+7iocnEIV8iTs9EgJjEkO4= + + hash2 + + odOqeBevxysHIbR5V5qgZz11qTuV9cL5jKaIcUw3R0I= + + + Resources/Assets.car + + hash + + VP/bAnHkPdl7+A5lnQ7hMKoX8Kk= + + hash2 + + cIrp0CfLhE6S1uZSP6z10hiCvzDLmuH+1JQjx8tNh/I= + + + Resources/InfoPlist.loctable + + hash + + 71fUaDHmKoEjKlKkMLLNl4Pivgg= + + hash2 + + tyC+7QMvGJZKI4nDnLOsiKfB+pRASNJx8BuCkMwIJj4= + + + document.wflow + + cdhash + + 2J+npSBoSd7II1M2CbZcOpcqLMM= + + requirement + cdhash H"8ae07be8e501f8464b666e5fd459c17b4e260b8e" or cdhash H"d89fa7a5206849dec823533609b65c3a972a2cc3" + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git "a/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/document.wflow" "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/document.wflow" new file mode 100644 index 0000000..8d424dd --- /dev/null +++ "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Contents/document.wflow" @@ -0,0 +1,225 @@ + + + + + AMApplicationBuild + 523 + AMApplicationVersion + 2.10 + AMDocumentVersion + 2 + actions + + + action + + AMAccepts + + Container + List + Optional + + Types + + com.apple.cocoa.string + + + AMActionVersion + 2.0.3 + AMApplication + + 自动操作 + + AMParameterProperties + + COMMAND_STRING + + CheckedForUserDefaultShell + + inputMethod + + shell + + source + + + AMProvides + + Container + List + Types + + com.apple.cocoa.string + + + ActionBundlePath + /System/Library/Automator/Run Shell Script.action + ActionName + 运行Shell脚本 + ActionParameters + + COMMAND_STRING + PDFM_DIR="/Applications/Parallels Desktop.app" +PDFM_DISP_DST="${PDFM_DIR}/Contents/MacOS/Parallels Service.app/Contents/MacOS/prl_disp_service" +PDFM_DISP_PATCH="${PDFM_DISP_DST}_patched" +PDFM_DISP_BCUP="${PDFM_DISP_DST}_backup" + +if [ "$(pgrep -x prl_disp_service)" != "" ] && [ "$(pgrep -x prl_client_app)" != "" ]; then + open "${PDFM_DIR}" + exit 0 +fi + +INPPUT="密码" +echo "${INPPUT}" | sudo -S cp -f "${PDFM_DISP_PATCH}" "${PDFM_DISP_DST}" || exit 1 +open "${PDFM_DIR}" + +sleep 2 + +echo "${INPPUT}" | sudo -S cp -f "${PDFM_DISP_BCUP}" "${PDFM_DISP_DST}" || exit 1 + + CheckedForUserDefaultShell + + inputMethod + 0 + shell + /bin/bash + source + + + BundleIdentifier + com.apple.RunShellScript + CFBundleVersion + 2.0.3 + CanShowSelectedItemsWhenRun + + CanShowWhenRun + + Category + + AMCategoryUtilities + + Class Name + RunShellScriptAction + IgnoresInput + + InputUUID + 1A8F632B-B496-4B12-9BD2-B09A2AE32CF6 + Keywords + + Shell + 脚本 + 命令 + 运行 + Unix + + OutputUUID + 2CAE8BB8-83B8-40FC-BF86-77CC376214E4 + ShowWhenRun + + UUID + 242E6EA8-9D8A-44AB-83AB-4169D38A3C55 + UnlocalizedApplications + + Automator + + arguments + + 0 + + default value + 0 + name + inputMethod + required + 0 + type + 0 + uuid + 0 + + 1 + + default value + + name + CheckedForUserDefaultShell + required + 0 + type + 0 + uuid + 1 + + 2 + + default value + + name + source + required + 0 + type + 0 + uuid + 2 + + 3 + + default value + + name + COMMAND_STRING + required + 0 + type + 0 + uuid + 3 + + 4 + + default value + /bin/sh + name + shell + required + 0 + type + 0 + uuid + 4 + + + conversionLabel + 0 + isViewVisible + 1 + location + 452.000000:469.000000 + nibPath + /System/Library/Automator/Run Shell Script.action/Contents/Resources/Base.lproj/main.nib + + isViewVisible + 1 + + + connectors + + variables + + + UUID + 18352409-5822-4541-B5DB-D39A7524704A + identifier + com.apple.Automator.Variable.Storage + name + INPPUT + + + workflowMetaData + + workflowTypeIdentifier + com.apple.Automator.application + + + diff --git "a/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Icon\r" "b/tool/Parallels_\344\270\200\351\224\256\351\205\215\347\275\256.app/Icon\r" new file mode 100644 index 0000000..e69de29 diff --git "a/tool/Parallels_\345\216\237\345\247\213\344\272\272_\350\265\267\346\264\236.command" "b/tool/Parallels_\345\216\237\345\247\213\344\272\272_\350\265\267\346\264\236.command" index 575a798..09d3760 100755 --- "a/tool/Parallels_\345\216\237\345\247\213\344\272\272_\350\265\267\346\264\236.command" +++ "b/tool/Parallels_\345\216\237\345\247\213\344\272\272_\350\265\267\346\264\236.command" @@ -10,10 +10,29 @@ if [ "$(pgrep -x prl_disp_service)" != "" ] && [ "$(pgrep -x prl_client_app)" != exit 0 fi + +# 获取脚本文件的完整路径,包括文件名 +script_path="$0" +# 提取脚本文件所在的目录 +script_dir=$(dirname "${script_path}") +cd "${script_dir}" + +if [[ -e "./Parallels_一键配置.app" ]]; then + read -r -p "⚙️ 是否(y/n)需要配置一键启动PD.(默认为:y)" flag || exit 1 + if [[ $flag != n ]]; then + read -r -p "⚙️ 请输入密码(明文)然后回车." input || exit 1 + sed -i '' -e "s/INPPUT=\"密码\"/INPPUT=\"${input}\"/g;" "./Parallels_一键配置.app/Contents/document.wflow" || exit 1 + cp -rf "./Parallels_一键配置.app" "/Applications/启动_PD.app" || exit 1 + sed -i '' -e "s/INPPUT=\"${input}\"/INPPUT=\"密码\"/g;" "./Parallels_一键配置.app/Contents/document.wflow" || exit 1 + open "/Applications/启动_PD.app" || exit 1 + exit 0 + fi +fi + sudo cp -f "${PDFM_DISP_PATCH}" "${PDFM_DISP_DST}" open "${PDFM_DIR}" sleep 2 - sudo cp -f "${PDFM_DISP_BCUP}" "${PDFM_DISP_DST}" +