mirror of
https://github.com/jcefmaven/jcefbuild.git
synced 2025-09-18 05:16:37 +08:00
Patch jetbrains download url
This commit is contained in:
parent
fc16a1d087
commit
625ddf50da
@ -19,6 +19,9 @@ WORKDIR /builder
|
|||||||
#Copy existing sources, if any
|
#Copy existing sources, if any
|
||||||
COPY jcef /jcef
|
COPY jcef /jcef
|
||||||
|
|
||||||
|
#Copy cmake patching script
|
||||||
|
COPY scripts/patch_cmake.py .
|
||||||
|
|
||||||
#Copy and launch run script
|
#Copy and launch run script
|
||||||
COPY scripts/run_linux_prebuild.sh .
|
COPY scripts/run_linux_prebuild.sh .
|
||||||
RUN chmod +x run_linux_prebuild.sh
|
RUN chmod +x run_linux_prebuild.sh
|
||||||
|
@ -45,6 +45,9 @@ else
|
|||||||
cd jcef
|
cd jcef
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#CMake patching
|
||||||
|
python3 ../scripts/patch_cmake.py cmake/DownloadCEF.cmake
|
||||||
|
|
||||||
# Create and enter the `jcef_build` directory.
|
# Create and enter the `jcef_build` directory.
|
||||||
# The `jcef_build` directory name is required by other JCEF tooling
|
# The `jcef_build` directory name is required by other JCEF tooling
|
||||||
# and should not be changed.
|
# and should not be changed.
|
||||||
|
@ -1,35 +1,18 @@
|
|||||||
#Small script to patch CMakeLists.txt files with custom build options
|
#Small script to patch our cmake download locations
|
||||||
#Will replace file contents between two markers ("Determine the platform"
|
#Usage: python patch_cmake.py <file>
|
||||||
#and "Add this project's cmake")
|
|
||||||
#Usage: python patch_cmake.py <input> <patch>
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
input = sys.argv[1]
|
input = sys.argv[1]
|
||||||
patch = sys.argv[2]
|
|
||||||
|
|
||||||
print("Patching "+input+" to accept further build architectures...")
|
print("Patching "+input+" to use spotify for downloads again...")
|
||||||
|
|
||||||
f = open(input, "r")
|
f = open(input, "r")
|
||||||
p = open(patch, "r")
|
|
||||||
result = ""
|
result = ""
|
||||||
inpatch = False
|
|
||||||
for x in f:
|
for x in f:
|
||||||
if x.startswith("# Determine the platform"):
|
result += x.replace("https://cache-redirector.jetbrains.com/intellij-jbr/", "https://cef-builds.spotifycdn.com/")
|
||||||
inpatch = True
|
|
||||||
for y in p:
|
|
||||||
result += y
|
|
||||||
elif x.startswith("# Add this project's cmake"):
|
|
||||||
inpatch = False
|
|
||||||
if inpatch == False:
|
|
||||||
#Patch minimum cmake version to not break our builds on linux
|
|
||||||
if x.startswith("cmake_minimum_required"):
|
|
||||||
result += "cmake_minimum_required(VERSION 3.13)\n"
|
|
||||||
else:
|
|
||||||
result += x
|
|
||||||
|
|
||||||
f.close()
|
f.close()
|
||||||
p.close()
|
|
||||||
|
|
||||||
f = open(input, "w")
|
f = open(input, "w")
|
||||||
f.write(result)
|
f.write(result)
|
||||||
|
@ -28,6 +28,9 @@ else
|
|||||||
cd /jcef
|
cd /jcef
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#CMake patching
|
||||||
|
python3 /builder/patch_cmake.py cmake/DownloadCEF.cmake
|
||||||
|
|
||||||
# Create and enter the `jcef_build` directory.
|
# Create and enter the `jcef_build` directory.
|
||||||
# The `jcef_build` directory name is required by other JCEF tooling
|
# The `jcef_build` directory name is required by other JCEF tooling
|
||||||
# and should not be changed.
|
# and should not be changed.
|
||||||
|
@ -25,6 +25,9 @@ else
|
|||||||
cd /jcef
|
cd /jcef
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#CMake patching
|
||||||
|
python3 /builder/patch_cmake.py cmake/DownloadCEF.cmake
|
||||||
|
|
||||||
# Create and enter the `jcef_build` directory.
|
# Create and enter the `jcef_build` directory.
|
||||||
# The `jcef_build` directory name is required by other JCEF tooling
|
# The `jcef_build` directory name is required by other JCEF tooling
|
||||||
# and should not be changed.
|
# and should not be changed.
|
||||||
|
@ -12,6 +12,8 @@ if exist "jcef\README.md" (echo "Found existing files to build" && cd jcef) ^
|
|||||||
else (echo "Did not find files to build - cloning..." && GOTO :CLONE)
|
else (echo "Did not find files to build - cloning..." && GOTO :CLONE)
|
||||||
|
|
||||||
:BUILD
|
:BUILD
|
||||||
|
:: CMakeLists patching
|
||||||
|
python C:/patch_cmake.py cmake/DownloadCEF.cmake
|
||||||
|
|
||||||
:: Prepare build dir
|
:: Prepare build dir
|
||||||
mkdir jcef_build && cd jcef_build
|
mkdir jcef_build && cd jcef_build
|
||||||
|
Loading…
Reference in New Issue
Block a user