diff --git a/README.md b/README.md index e35b503..c74933d 100644 --- a/README.md +++ b/README.md @@ -43,16 +43,23 @@ 1. 在电脑上打开github上的蓝图仓库主页: https://github.com/DSPBluePrints/FactoryBluePrints 2. 从这个页面->[**Releases**](https://github.com/DSPBluePrints/FactoryBluePrints/releases)<-,下载最新的蓝图包,文件名应该叫`FactoryBluePrints_X.Y.Z.rar`,请**不要**从绿色的Code处下载,那样文件不!完!整! -3. 解压后,像其他普通的蓝图包一样,放入游戏的默认蓝图文件夹。放进去以后应该是这样:`C:\Users\%USERNAME%\Documents\Dyson Sphere Program\Blueprint\FactoryBluePrints\README.md` +3. 解压后,像其他普通的蓝图包一样,连同文件夹一起放入游戏的默认蓝图文件夹。放进去以后应该是这样:`C:\Users\%USERNAME%\Documents\Dyson Sphere Program\Blueprint\FactoryBluePrints\README.md`。 4. **第一次使用必须先更新,不然此时没有任何蓝图。** ### 更新 1. 只需双击即可:`update.bat` +--- + +## 常见问题 + > Q: 为什么我打不开蓝图仓库主页 / 下载特别慢 / 更新特别慢? > A: 通常是网络问题。蓝图仓库被托管在github上,可以通过在[Watt Toolkit](https://steampp.net)(原名steam++)中开启github加速服务解决。~~或者魔法?~~ +> Q: 警告:您似乎安装到了错误的路径,这可能导致文件权限异常 +> A: 通常是用户解压后,全选文件放入Blueprint,而不是连同文件夹一起放入Blueprint。蓝图仓库不依赖绝对路径,但是这并不代表在任意路径下git都有读写文件的权限,而在部分电脑上git无权访问Blueprint根目录。 + --- ## 协议 diff --git a/update.bat b/update.bat index 8ca3753..fab27fa 100644 --- a/update.bat +++ b/update.bat @@ -7,6 +7,14 @@ set LOG_PATH=.\update.log dir>%LOG_PATH% echo ---->>%LOG_PATH% +::test dir +cd .. +cd .. +if not exist "Blueprint" ( +echo 警告:您似乎安装到了错误的路径,这可能导致文件权限异常 +) +cd %~dp0 + ::find git.exe if exist ".\MinGit\cmd\git.exe" ( set GIT_PATH=.\MinGit\cmd\git.exe @@ -19,14 +27,14 @@ echo %date% %time% Infomation: GIT_PATH=git>>%LOG_PATH% ::test git.exe %GIT_PATH% -v if %errorlevel% NEQ 0 ( -echo 错误:无法找到git.exe ^| Error: git.exe no found +echo 错误:无法找到git.exe echo %date% %time% Error: git.exe no found>>%LOG_PATH% goto end_with_error ) ::find .git/ if not exist ".git" ( -echo 错误:无法找到.git/ ^| Error: .git no found +echo 错误:无法找到.git/ echo %date% %time% Error: .git/ no found>>%LOG_PATH% goto end_with_error ) @@ -34,7 +42,7 @@ goto end_with_error ::test .git/ %GIT_PATH% rev-parse --is-inside-work-tree if %errorlevel% NEQ 0 ( -echo 错误:.git/已损坏 ^| Error: .git/ is broken +echo 错误:.git/已损坏 echo %date% %time% Error: .git/ is broken>>%LOG_PATH% goto end_with_error ) @@ -49,7 +57,7 @@ echo %date% %time% Infomation: %GIT_PATH% reset --hard>>%LOG_PATH% set GIT_SSL_NO_VERIFY=true %GIT_PATH% pull origin main if %errorlevel% NEQ 0 ( -echo 错误:更新失败,这通常是网络问题。请重试,或者开加速器再更新。详见"README.md" +echo 错误:更新失败。这通常是网络问题,重试就行,或者开加速器再更新。 echo %date% %time% Error: %GIT_PATH% pull origin main>>%LOG_PATH% goto end_with_error ) else ( @@ -57,13 +65,15 @@ echo %date% %time% Infomation: %GIT_PATH% pull origin main>>%LOG_PATH% ) :end -echo 更新完成,现在可以直接关闭此窗口 +echo 蓝图文件更新完成,现在可以直接关闭此窗口 echo %date% %time% Infomation: Exit>>%LOG_PATH% pause exit :end_with_error -echo 更新因为出现错误而终止。如果存疑可以加qq群反馈:162065696 +echo 更新因为出现错误而中止,蓝图文件没有发生任何变动 +echo 常见问题请阅读说明https://github.com/DSPBluePrints/FactoryBluePrints/blob/main/README.md +echo 如果仍然存疑可以加qq群反馈:162065696。请附上此页面截图和update.log截图。 echo %date% %time% Infomation: Exit>>%LOG_PATH% pause exit \ No newline at end of file