fix for windows path
This commit is contained in:
parent
0dc4bcb203
commit
f99346ba61
@ -197,7 +197,7 @@ void init_share_dirname()
|
||||
npnr_share_dirname = proc_share_path;
|
||||
return;
|
||||
}
|
||||
proc_share_path = proc_self_path + "..\\share\\";
|
||||
proc_share_path = proc_self_path + "..\\share\\" + "nextpnr\\";
|
||||
if (check_file_exists(proc_share_path, true)) {
|
||||
npnr_share_dirname = proc_share_path;
|
||||
return;
|
||||
|
@ -61,8 +61,15 @@ void Arch::load_chipdb(const std::string &path)
|
||||
if (!args.chipdb_override.empty()) {
|
||||
db_path = args.chipdb_override;
|
||||
} else {
|
||||
std::string separator;
|
||||
#if defined(_WIN32)
|
||||
separator = "\\";
|
||||
#else
|
||||
separator = "/";
|
||||
#endif
|
||||
db_path = proc_share_dirname();
|
||||
db_path += "/himbaechel/";
|
||||
db_path += "himbaechel";
|
||||
db_path += separator;
|
||||
db_path += path;
|
||||
}
|
||||
try {
|
||||
|
@ -128,7 +128,17 @@ void GowinImpl::init_database(Arch *arch)
|
||||
}
|
||||
}
|
||||
|
||||
arch->load_chipdb(stringf("gowin/chipdb-%s.bin", family.c_str()));
|
||||
char separator;
|
||||
#if defined(_WIN32)
|
||||
separator = '\\';
|
||||
#else
|
||||
separator = '/';
|
||||
#endif
|
||||
arch->load_chipdb(stringf(
|
||||
"gowin%cchipdb-%s.bin",
|
||||
separator,
|
||||
family.c_str()
|
||||
));
|
||||
|
||||
// These fields go in the header of the output JSON file and can help
|
||||
// gowin_pack support different architectures
|
||||
|
Loading…
Reference in New Issue
Block a user