mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 09:59:03 +02:00
msys2: Fix absolute windows paths
- Ensure path DATA_DIR isn't made absolute during compilation - Use cygpath to create absolute path at runtime
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "xilinxMapParser.hpp"
|
||||
#include "part.hpp"
|
||||
#include "progressBar.hpp"
|
||||
#include "pathHelper.hpp"
|
||||
|
||||
Xilinx::Xilinx(Jtag *jtag, const std::string &filename,
|
||||
const std::string &file_type,
|
||||
@@ -323,6 +324,11 @@ bool Xilinx::load_bridge()
|
||||
std::string bitname = DATA_DIR "/openFPGALoader/spiOverJtag_";
|
||||
bitname += _device_package + ".bit.gz";
|
||||
|
||||
#if defined (_WIN64) || defined (_WIN32)
|
||||
/* Convert relative path embedded at compile time to an absolute path */
|
||||
bitname = PathHelper::absolutePath(bitname);
|
||||
#endif
|
||||
|
||||
std::cout << "use: " << bitname << std::endl;
|
||||
|
||||
/* first: load spi over jtag */
|
||||
|
||||
Reference in New Issue
Block a user