use boost for windows path
This commit is contained in:
parent
f99346ba61
commit
eb0554319f
@ -22,6 +22,7 @@
|
|||||||
#include "chipdb.h"
|
#include "chipdb.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "nextpnr.h"
|
#include "nextpnr.h"
|
||||||
|
#include <boost/filesystem/convenience.hpp>
|
||||||
|
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "placer1.h"
|
#include "placer1.h"
|
||||||
@ -61,16 +62,11 @@ void Arch::load_chipdb(const std::string &path)
|
|||||||
if (!args.chipdb_override.empty()) {
|
if (!args.chipdb_override.empty()) {
|
||||||
db_path = args.chipdb_override;
|
db_path = args.chipdb_override;
|
||||||
} else {
|
} else {
|
||||||
std::string separator;
|
|
||||||
#if defined(_WIN32)
|
|
||||||
separator = "\\";
|
|
||||||
#else
|
|
||||||
separator = "/";
|
|
||||||
#endif
|
|
||||||
db_path = proc_share_dirname();
|
db_path = proc_share_dirname();
|
||||||
db_path += "himbaechel";
|
db_path += "himbaechel/";
|
||||||
db_path += separator;
|
|
||||||
db_path += path;
|
db_path += path;
|
||||||
|
boost::filesystem::path p(db_path);
|
||||||
|
db_path = p.make_preferred().string();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
blob_file.open(db_path);
|
blob_file.open(db_path);
|
||||||
|
@ -128,17 +128,7 @@ void GowinImpl::init_database(Arch *arch)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char separator;
|
arch->load_chipdb(stringf("gowin/chipdb-%s.bin", family.c_str()));
|
||||||
#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
|
// These fields go in the header of the output JSON file and can help
|
||||||
// gowin_pack support different architectures
|
// gowin_pack support different architectures
|
||||||
|
Loading…
Reference in New Issue
Block a user