mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Include API's .lib file in archive
For linking on Windows.
This commit is contained in:
+18
-5
@@ -168,15 +168,28 @@ function createAppArchive(rootPath, releasePath, tempPath, destPath) {
|
||||
fs.removeSync(tempPath);
|
||||
}
|
||||
|
||||
function createApiArchive(rootPath, binaryPath, tempPath, destPath) {
|
||||
function createApiArchive(rootPath, releasePath, tempPath, destPath) {
|
||||
// Ensure that the output directory is empty.
|
||||
fs.emptyDirSync(tempPath);
|
||||
|
||||
// API binary/binaries.
|
||||
fs.copySync(
|
||||
binaryPath,
|
||||
path.join(tempPath, path.basename(binaryPath))
|
||||
);
|
||||
let binaries = [];
|
||||
if (os.platform() === 'win32') {
|
||||
binaries = [
|
||||
'loot_api.dll',
|
||||
'loot_api.lib',
|
||||
];
|
||||
} else {
|
||||
binaries = [
|
||||
'libloot_api.so',
|
||||
];
|
||||
}
|
||||
binaries.forEach((file) => {
|
||||
fs.copySync(
|
||||
path.join(releasePath, file),
|
||||
path.join(tempPath, file)
|
||||
);
|
||||
});
|
||||
|
||||
// API header file.
|
||||
fs.mkdirsSync(path.join(tempPath, 'include', 'loot'));
|
||||
|
||||
+3
-1
@@ -73,7 +73,9 @@ function getApiBinaryPaths(rootPath) {
|
||||
file = `lib${file}.so`;
|
||||
}
|
||||
|
||||
return getBinaryPaths(rootPath, file);
|
||||
return getBinaryParentPaths(rootPath).filter(
|
||||
parentPath => fileExists(path.join(parentPath.path, file))
|
||||
);
|
||||
}
|
||||
|
||||
function getMetadataValidatorBinaryPaths(rootPath) {
|
||||
|
||||
Reference in New Issue
Block a user