mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
Automatic dev_* dir creation
This commit is contained in:
parent
baf22527b0
commit
dac72ff371
7 changed files with 23 additions and 5 deletions
2
bin/dev_hdd1/.gitignore
vendored
2
bin/dev_hdd1/.gitignore
vendored
|
@ -2,5 +2,3 @@
|
||||||
*
|
*
|
||||||
# Except this file
|
# Except this file
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!cache
|
|
||||||
!cache/README.txt
|
|
1
bin/dev_hdd1/cache/README.txt
vendored
1
bin/dev_hdd1/cache/README.txt
vendored
|
@ -1 +0,0 @@
|
||||||
This directory is used for cache functionality, so don't store any data here.
|
|
|
@ -1 +0,0 @@
|
||||||
This directory is used for temporary gamedata functionality, so don't store any data here.
|
|
2
bin/dev_usb000/.gitignore
vendored
2
bin/dev_usb000/.gitignore
vendored
|
@ -1,4 +1,4 @@
|
||||||
# Ignore everything in this directory
|
# Ignore everything in this directory
|
||||||
*
|
*
|
||||||
# Except this file
|
# Except this file
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
|
|
@ -85,6 +85,28 @@ void Emulator::Init()
|
||||||
// Reload global configuration
|
// Reload global configuration
|
||||||
cfg::root.from_string(fs::file(fs::get_config_dir() + "/config.yml", fs::read + fs::create).to_string());
|
cfg::root.from_string(fs::file(fs::get_config_dir() + "/config.yml", fs::read + fs::create).to_string());
|
||||||
|
|
||||||
|
// Create directories
|
||||||
|
const std::string emu_dir_ = g_cfg_vfs_emulator_dir;
|
||||||
|
const std::string emu_dir = emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
||||||
|
const std::string dev_hdd0 = fmt::replace_all(g_cfg_vfs_dev_hdd0, "$(EmulatorDir)", emu_dir);
|
||||||
|
const std::string dev_hdd1 = fmt::replace_all(g_cfg_vfs_dev_hdd1, "$(EmulatorDir)", emu_dir);
|
||||||
|
const std::string dev_usb = fmt::replace_all(g_cfg_vfs_dev_usb000, "$(EmulatorDir)", emu_dir);
|
||||||
|
|
||||||
|
fs::create_path(dev_hdd0);
|
||||||
|
fs::create_dir(dev_hdd0 + "game/");
|
||||||
|
fs::create_dir(dev_hdd0 + "game/TEST12345/");
|
||||||
|
fs::create_dir(dev_hdd0 + "game/TEST12345/USRDIR/");
|
||||||
|
fs::create_dir(dev_hdd0 + "home/");
|
||||||
|
fs::create_dir(dev_hdd0 + "home/00000001/");
|
||||||
|
fs::create_dir(dev_hdd0 + "home/00000001/exdata/");
|
||||||
|
fs::create_dir(dev_hdd0 + "home/00000001/savedata/");
|
||||||
|
fs::create_dir(dev_hdd0 + "home/00000001/trophy/");
|
||||||
|
if (fs::file f{dev_hdd0 + "home/00000001/localusername", fs::create + fs::excl + fs::write}) f.write("User"s);
|
||||||
|
fs::create_dir(dev_hdd1 + "cache/");
|
||||||
|
fs::create_dir(dev_hdd1 + "game/");
|
||||||
|
fs::create_path(dev_hdd1);
|
||||||
|
fs::create_path(dev_usb);
|
||||||
|
|
||||||
SetCPUThreadStop(0);
|
SetCPUThreadStop(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue