| 43 | |
| 44 | |
| 45 | void Library::getApplicableFiles(const RuntimeContext & runtimeContext, QStringList& jar, QStringList& native, QStringList& native32, |
| 46 | QStringList& native64, const QString &overridePath) const |
| 47 | { |
| 48 | bool local = isLocal(); |
| 49 | auto actualPath = [&](QString relPath) |
| 50 | { |
| 51 | QFileInfo out(FS::PathCombine(storagePrefix(), relPath)); |
| 52 | if(local && !overridePath.isEmpty()) |
| 53 | { |
| 54 | QString fileName = out.fileName(); |
| 55 | return QFileInfo(FS::PathCombine(overridePath, fileName)).absoluteFilePath(); |
| 56 | } |
| 57 | return out.absoluteFilePath(); |
| 58 | }; |
| 59 | QString raw_storage = storageSuffix(runtimeContext); |
| 60 | if(isNative()) |
| 61 | { |
| 62 | if (raw_storage.contains("${arch}")) |
| 63 | { |
| 64 | auto nat32Storage = raw_storage; |
| 65 | nat32Storage.replace("${arch}", "32"); |
| 66 | auto nat64Storage = raw_storage; |
| 67 | nat64Storage.replace("${arch}", "64"); |
| 68 | native32 += actualPath(nat32Storage); |
| 69 | native64 += actualPath(nat64Storage); |
| 70 | } |
| 71 | else |
| 72 | { |
| 73 | native += actualPath(raw_storage); |
| 74 | } |
| 75 | } |
| 76 | else |
| 77 | { |
| 78 | jar += actualPath(raw_storage); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | QList<NetAction::Ptr> Library::getDownloads( |
| 83 | const RuntimeContext & runtimeContext, |