diff --git a/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh b/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh index 95ade1a..7c93010 100755 --- a/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh +++ b/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh @@ -149,7 +149,17 @@ CallProcess() # Disable winemenubuilder env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe /f # Link to Document - env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' /t REG_EXPAND_SZ /v Personal /d "%USERPROFILE%\My Documents" /f +if [ -f "$WINEPREFIX/drive_c/users/$(logname)/My Documents" ]; then + env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' /t REG_EXPAND_SZ /v Personal /d "%USERPROFILE%\My Documents" /f + +else + env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' /t REG_EXPAND_SZ /v Personal /d "%USERPROFILE%\Documents" /f + +fi + + + + debug_log_to_file "Starting process $* ..." ############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh diff --git a/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_updater b/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_updater index 03a3393..92b22bb 100755 --- a/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_updater +++ b/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_updater @@ -34,15 +34,8 @@ if [ "$verbose" = true ]; then echo "正在从 $source_dir 复制文件到 $destination_dir" fi -# 使用mv命令覆盖同名文件 -for file in "$source_dir"/*; do - if [ -f "$file" ]; then - cp -f "$file" "$destination_dir" - if [ "$verbose" = true ]; then - echo "已复制 $file 到 $destination_dir" - fi - fi -done +# 使用cp命令覆盖同名文件 +cp -rf "$source_dir"/* "$destination_dir" echo "文件复制完成!" exit 0