fix(Windows): Don't hard-code paths to project files (#227)
Of all 0.63 versions, only 0.63.2 currently works as the project file has hard-coded paths to `.targets` files.
This commit is contained in:
Родитель
0cdd8ffda2
Коммит
971df74b9b
|
@ -260,9 +260,17 @@ function generateSolution(destPath, noAutolink) {
|
|||
projectFilesDestPath
|
||||
);
|
||||
|
||||
const { version: rnWindowsVersion } = JSON.parse(
|
||||
fs.readFileSync(path.join(rnWindowsPath, "package.json"), {
|
||||
encoding: "utf8",
|
||||
})
|
||||
);
|
||||
|
||||
const projectFilesReplacements = {
|
||||
"\\$\\(BundleDirContentPaths\\)": bundleDirContent,
|
||||
"\\$\\(BundleFileContentPaths\\)": bundleFileContent,
|
||||
"packages\\\\Microsoft\\.ReactNative\\.0\\.63\\.2\\\\build\\\\native\\\\Microsoft\\.ReactNative\\.targets": `packages\\Microsoft.ReactNative.${rnWindowsVersion}\\build\\native\\Microsoft.ReactNative.targets`,
|
||||
"packages\\\\Microsoft\\.ReactNative\\.Cxx\\.0\\.63\\.2\\\\build\\\\native\\\\Microsoft\\.ReactNative\\.Cxx\\.targets": `packages\\Microsoft.ReactNative.Cxx.${rnWindowsVersion}\\build\\native\\Microsoft.ReactNative.Cxx.targets`,
|
||||
};
|
||||
|
||||
const copyTasks = [
|
||||
|
|
Загрузка…
Ссылка в новой задаче