emuelec吧 关注:20,230贴子:77,133
  • 5回复贴,共1

[技术帖]电脑在线调试ES主题等及源码修改

只看楼主收藏回复

话不多说,先上在线调试图(主要工具是visual studio code)

一,搭建环境
1,github上下载ES的模块源码。

2,教程步骤搭建环境,如果是ubuntu下更加简单一些,建议新手按照linux下的搭建。
1,安装库文件
sudo apt-get install libsdl2-dev libsdl2-mixer-dev libfreeimage-dev libfreetype6-dev \ libcurl4-openssl-dev rapidjson-dev libasound2-dev libgl1-mesa-dev build-essential \ libboost-all-dev cmake fonts-droid-fallback libvlc-dev libvlccore-dev vlc-bin
2,git克隆代码
git clone --recursive https://github.com/batocera-linux/batocera-emulationstation.git
3,编译es模块
cmake .
make
4,运行
以上4步骤按照做即可。接下来的步骤需要修改运行起来。
编译完成后,发现es模块下会有一个emulationstation文件,./emulationstation 执行后会发现报错。

需要修改cfg地址,主要修改以下几个地方。
报错1:
执行./emulationstation后报错,无法运行
Creating config directory "/userdata/system/configs/emulationstation"
Config directory could not be created!
这里主要修改需要修改.emulationstation的路径到ubuntu系统,具体一些文件修改如下
iff --git a/es-core/src/SystemConf.cpp b/es-core/src/SystemConf.cpp
index a596a0bd..3c1eed9f 100644
--- a/es-core/src/SystemConf.cpp
+++ b/es-core/src/SystemConf.cpp
@@ -55,8 +55,8 @@ static std::map<std::string, std::string> defaults =
std::string systemConfFile = "/storage/.config/emuelec/configs/emuelec.conf";
std::string systemConfFileTmp = "/storage/.config/emuelec/configs/emuelec.conf.tmp";
#else
-std::string systemConfFile = "/userdata/system/batocera.conf";
-std::string systemConfFileTmp = "/userdata/system/batocera.conf.tmp";
+std::string systemConfFile = "/home/本机目录/project/es_debug/storage/.config/emuelec/configs/emuelec.conf";
+std::string systemConfFileTmp = "/home/本机目录/project/es_debug/storage/.config/emuelec/configs/emuelec.conf.tmp";
#endif
第二处修改:
diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp
index 887e2123..ac59907c 100644
--- a/es-core/src/utils/FileSystemUtil.cpp
+++ b/es-core/src/utils/FileSystemUtil.cpp
@@ -45,7 +45,7 @@ namespace Utils
return cfg;
#else
- return "/userdata/system/configs/emulationstation"; // batocera
+ return "/home/本机目录/project/es_debug/storage/.emulationstation"; // batocera
#endif
}
@@ -510,7 +510,7 @@ namespace Utils
if (!homePath.length())
homePath = getCWDPath();
- homePath = getGenericPath(homePath);
+ homePath = "/home/本机目录/project/es_debug/storage/";
// return constructed homepath
return homePath;
修改这两处以后,把.emulationstation和.config拷贝到/home/本机目录/project/es_debug/storage/下即可
然后再使用超级权限创建游戏roms目录,/storage/roms/放入游戏。
最后运行./emulationstation即可,默认是全屏幕的。
如果想窗口话运行和指定大小,输入命令:
./emulationstation --windowed --resolution 2048 1024
即可,关于参数介绍如下:

此教程不易,全部原创。谢谢点赞!
后续会继续出一些修改教程,有需要的可以留意评论。
为了ee的优化,大家一起努力!


1楼2022-04-14 13:29回复
    纯技术贴,感谢分享


    IP属地:黑龙江来自iPhone客户端2楼2022-04-14 14:31
    回复
      2026-01-25 16:29:50
      广告
      不感兴趣
      开通SVIP免广告
      哇哇..支持支持.非常期待后续教程


      IP属地:广东3楼2022-04-15 13:49
      回复
        大佬请教一下,我买了个盒子套装带游戏的,游戏U盘装在其它盒子能启动,提示要激活,这个商家定制的游戏包还可以联网后远程给激活,他这个包什么原理呀,4.5的系统


        IP属地:四川来自Android客户端4楼2022-11-01 09:50
        回复
          大神有emuelec项目请教


          IP属地:广东5楼2023-02-27 02:06
          回复
            ubuntu可以运行vs?哇。。


            IP属地:福建6楼2023-02-27 18:30
            回复