mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
chore.更新资源文件目录,及相关脚本
This commit is contained in:
@@ -55,7 +55,13 @@ sudo ldconfig
|
||||
1. 直接拷贝上面编译的第三方库到 `3rdparty/lib` 或者 手动修改 `CMakeLists.txt` 指定第三方库路径
|
||||
2. `3rdparty/include/opencv` 中的头文件是 `4.5.3` 版本的,若是使用其他版本,请注意头文件冲突问题(直接将你的 `opencv` 头文件覆盖过去就好)
|
||||
3. 安装 `adb`, 并修改 `resource/config.json` 中 `Custom`.`adb`.`path` 的值为 `"adb"`
|
||||
4. 复制资源文件到 `libMeoAssitant.so` 同一目录下,具体可参考 [这个脚本](../tools/update_resource.sh)
|
||||
4. 复制资源文件到 `libMeoAssitant.so` 同一目录下
|
||||
|
||||
```sh
|
||||
cd tools
|
||||
sh ./update_resource.sh <YourBuildDir>
|
||||
```
|
||||
|
||||
5. 通过 [Python 接口](../src/Python/interface.py) 或 [C 接口](../include/AsstCaller.h) 进行调用,需要自行编写少量的代码
|
||||
6. `cmake` 可通过添加 `-DBUILD_TEST=ON` 选项来编译一个测试小 demo
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Assistant::Assistant(std::string dirname, AsstCallback callback, void* callback_
|
||||
|
||||
LogTraceFunction;
|
||||
|
||||
bool resource_ret = Resrc.load(m_dirname + "Resource/");
|
||||
bool resource_ret = Resrc.load(m_dirname + "resource/");
|
||||
if (!resource_ret) {
|
||||
const std::string& error = Resrc.get_last_error();
|
||||
Log.error("resource broken:", error);
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
MSBuild.exe ..\MeoAssistantArknights.sln /p:Configuration=Release /p:Platform=x64 /t:Rebuild
|
||||
sh zip_release.sh
|
||||
MSBuild.exe ..\MeoAssistantArknights.sln /p:Configuration=Release /p:Platform=x64 /t:Rebuild
|
||||
@@ -1,2 +0,0 @@
|
||||
xcopy /e /y /i ..\resource ..\x64\RelWithDebInfo\resource
|
||||
xcopy /e /y /i ..\3rdparty\resource ..\x64\RelWithDebInfo\resource
|
||||
@@ -1,3 +1,14 @@
|
||||
mkdir -p ../build/Resource
|
||||
cp -r ../resource/* ../build/Resource
|
||||
cp -r ../3rdparty/resource/* ../build/Resource
|
||||
#!/bin/sh
|
||||
|
||||
TargetDir=""
|
||||
|
||||
if [ $1 ]; then
|
||||
TargetDir=$1
|
||||
else
|
||||
echo "Please enter TargetDir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p $TargetDir
|
||||
cp -r "../resource/" "../3rdparty/resource/" $TargetDir
|
||||
exit 0
|
||||
1
tools/update_resource_deb.bat
Normal file
1
tools/update_resource_deb.bat
Normal file
@@ -0,0 +1 @@
|
||||
sh ./update_resource.sh ..\x64\RelWithDebInfo
|
||||
1
tools/update_resource_rel.bat
Normal file
1
tools/update_resource_rel.bat
Normal file
@@ -0,0 +1 @@
|
||||
sh ./update_resource.sh ..\x64\Release
|
||||
@@ -1,2 +0,0 @@
|
||||
xcopy /e /y /i ..\resource ..\x64\Release\resource
|
||||
xcopy /e /y /i ..\3rdparty\resource ..\x64\Release\resource
|
||||
1
tools/zip_release.bat
Normal file
1
tools/zip_release.bat
Normal file
@@ -0,0 +1 @@
|
||||
sh ./zip_release.sh
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
TargetDir="../x64/Release"
|
||||
LatestTag=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
Package="../x64/MeoAssistantArknights_"$LatestTag".zip"
|
||||
|
||||
Reference in New Issue
Block a user