소스 검색

Addressing initial PR issues

Jack Horton 8 년 전
부모
커밋
3dd5d8748c
4개의 변경된 파일30개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      bin/ChakraCore/ChakraCore.vcxproj
  2. 21 1
      build.sh
  3. 4 0
      deps/Chakra.ICU/Chakra.ICU.Common.vcxproj
  4. 4 0
      deps/Chakra.ICU/Chakra.ICU.i18n.vcxproj

+ 1 - 1
bin/ChakraCore/ChakraCore.vcxproj

@@ -52,7 +52,7 @@
         Rpcrt4.lib;
         $(ChakraCommonLinkDependencies)
       </AdditionalDependencies>
-      <AdditionalDependencies Condition="'$(UseICU)'=='true' AND '$(ChakraICU)'!='false'">
+      <AdditionalDependencies Condition="'$(UseICU)'=='true' AND '$(ChakraICU)'=='false'">
         $(IcuLibraryDependencies)
         %(AdditionalDependencies)
       </AdditionalDependencies>

+ 21 - 1
build.sh

@@ -100,7 +100,7 @@ MULTICORE_BUILD=""
 NO_JIT=
 CMAKE_ICU="-DICU_SETTINGS_RESET=1"
 CMAKE_INTL="-DINTL_ICU_SH=1" # default to enabling intl
-USE_LOCAL_ICU=1 # default to using $CHAKRACORE_DIR/deps/Chakra.ICU/icu
+USE_LOCAL_ICU=0 # default to using system version of ICU
 STATIC_LIBRARY="-DSHARED_LIBRARY_SH=1"
 SANITIZE=
 WITHOUT_FEATURES=""
@@ -215,6 +215,20 @@ while [[ $# -gt 0 ]]; do
         USE_LOCAL_ICU=0
         ;;
 
+    # allow legacy --icu flag for compatability
+    --icu=*)
+        ICU_PATH=$1
+        # `eval` used to resolve tilde in the path
+        eval ICU_PATH="${ICU_PATH:13}"
+        if [[ ! -d $ICU_PATH || ! -d $ICU_PATH/unicode ]]; then
+            # if --custom-icu is given, do not fallback to no-icu
+            echo "!!! couldn't find ICU at $ICU_PATH"
+            exit 1
+        fi
+        CMAKE_ICU="-DICU_INCLUDE_PATH_SH=$ICU_PATH"
+        USE_LOCAL_ICU=0
+        ;;
+
     --system-icu)
         CMAKE_ICU="-DSYSTEM_ICU_SH=1"
         USE_LOCAL_ICU=0
@@ -373,6 +387,12 @@ if [[ $USE_LOCAL_ICU == 1 ]]; then
         python "$CHAKRACORE_DIR/tools/configure_icu.py" 57.1 $ALWAYS_YES
     fi
 
+    # if there is still no directory, then the user declined the license agreement
+    if [[ ! -d $LOCAL_ICU_DIR ]]; then
+        echo "You must accept the ICU license agreement in order to use this configuration"
+        exit 1
+    fi
+
     LOCAL_ICU_DIST="$LOCAL_ICU_DIR/output"
 
     if [ ! -d "$LOCAL_ICU_DIST" ]; then

+ 4 - 0
deps/Chakra.ICU/Chakra.ICU.Common.vcxproj

@@ -32,6 +32,10 @@
   <ItemGroup Condition="'$(ChakraICU)'!='false'">
     <ClCompile Include="$(IcuCommonSources)" />
     <ClInclude Include="$(IcuCommonHeaders)" />
+    <ProjectReference Include="$(MSBuildThisFileDirectory)Chakra.ICU.Stubdata.vcxproj">
+      <Project>{E14F373D-05A0-4259-A5E9-AFE8405FB847}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

+ 4 - 0
deps/Chakra.ICU/Chakra.ICU.i18n.vcxproj

@@ -40,6 +40,10 @@
   <ItemGroup Condition="'$(ChakraICU)'!='false'">
     <ClCompile Include="$(IcuI18nSources)" />
     <ClInclude Include="$(IcuI18nHeaders)" />
+    <ProjectReference Include="$(MSBuildThisFileDirectory)Chakra.ICU.Stubdata.vcxproj">
+      <Project>{E14F373D-05A0-4259-A5E9-AFE8405FB847}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />