diff --git a/PDFNetPHP/CMakeLists.txt b/PDFNetPHP/CMakeLists.txt index 25226189..fa244abf 100644 --- a/PDFNetPHP/CMakeLists.txt +++ b/PDFNetPHP/CMakeLists.txt @@ -3,8 +3,17 @@ # Consult LICENSE.txt for licensing information. #----------------------------------------------------------------------------------------------------------------------- +if(CMAKE_MAJOR_VERSION VERSION_EQUAL "4") + cmake_minimum_required(VERSION 3.10) +else() + cmake_minimum_required(VERSION 3.4) +endif() + +if (APPLE) + set(CMAKE_OSX_ARCHITECTURES arm64 x86_64) +endif() + project(PDFNetPHP CXX) -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) find_program(PHP_CONFIG_EXECUTABLE NAMES php-config7 php-config5 php-config4 php-config) diff --git a/PDFNetRuby/CMakeLists.txt b/PDFNetRuby/CMakeLists.txt index 0c09c05f..faf85e9a 100644 --- a/PDFNetRuby/CMakeLists.txt +++ b/PDFNetRuby/CMakeLists.txt @@ -3,8 +3,17 @@ # Consult LICENSE.txt for licensing information. #----------------------------------------------------------------------------------------------------------------------- +if(CMAKE_MAJOR_VERSION VERSION_EQUAL "4") + cmake_minimum_required(VERSION 3.10) +else() + cmake_minimum_required(VERSION 3.4) +endif() + +if (APPLE) + set(CMAKE_OSX_ARCHITECTURES arm64 x86_64) +endif() + project(PDFNetRuby CXX) -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) # Checks the header and library directory of the current active ruby install # This will respond to virtual enviroments diff --git a/Samples/AdvancedImagingTest/PHP/RunTest.sh b/Samples/AdvancedImagingTest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/AdvancedImagingTest/RUBY/RunTest.sh b/Samples/AdvancedImagingTest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/BarcodeTest/PHP/RunTest.sh b/Samples/BarcodeTest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/BarcodeTest/RUBY/RunTest.sh b/Samples/BarcodeTest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/CAD2PDFTest/PHP/RunTest.sh b/Samples/CAD2PDFTest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/CAD2PDFTest/RUBY/RunTest.sh b/Samples/CAD2PDFTest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/DataExtractionTest/PHP/RunTest.sh b/Samples/DataExtractionTest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/DataExtractionTest/RUBY/RunTest.sh b/Samples/DataExtractionTest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/ElementBuilderTest/RUBY/ElementBuilderTest.rb b/Samples/ElementBuilderTest/RUBY/ElementBuilderTest.rb index d352bdfe..823efa31 100644 --- a/Samples/ElementBuilderTest/RUBY/ElementBuilderTest.rb +++ b/Samples/ElementBuilderTest/RUBY/ElementBuilderTest.rb @@ -252,7 +252,7 @@ cur_width = 0 while text_run < para_end do - text_run_end = para.index(' ', text_run) + text_run_end = para.index(' ', text_run.to_i) if text_run_end.nil? text_run_end = para_end - 1 diff --git a/Samples/ElementReaderTest/PHP/RunTest.sh b/Samples/ElementReaderTest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/ElementReaderTest/RUBY/RunTest.sh b/Samples/ElementReaderTest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/OCRTest/PHP/RunTest.sh b/Samples/OCRTest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/OCRTest/RUBY/RunTest.sh b/Samples/OCRTest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/OfficeToPDFTest/PHP/RunTest.sh b/Samples/OfficeToPDFTest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/OfficeToPDFTest/RUBY/RunTest.sh b/Samples/OfficeToPDFTest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/PDFUATest/PHP/RunTest.sh b/Samples/PDFUATest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/PDFUATest/RUBY/RunTest.sh b/Samples/PDFUATest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/UndoRedoTest/PHP/RunTest.sh b/Samples/UndoRedoTest/PHP/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/UndoRedoTest/RUBY/RunTest.sh b/Samples/UndoRedoTest/RUBY/RunTest.sh old mode 100644 new mode 100755 diff --git a/Samples/UnicodeWriteTest/RUBY/UnicodeWriteTest.rb b/Samples/UnicodeWriteTest/RUBY/UnicodeWriteTest.rb index d657d572..367fcfc5 100644 --- a/Samples/UnicodeWriteTest/RUBY/UnicodeWriteTest.rb +++ b/Samples/UnicodeWriteTest/RUBY/UnicodeWriteTest.rb @@ -42,7 +42,7 @@ def main() # Embed and subset the font font_program = $input_path + "ARIALUNI.TTF" if not File.file?(font_program) - if ENV['OS']&.casecmp?("Windows_NT") + if ENV['OS'] && ENV['OS']&.casecmp?("Windows_NT") font_program = "C:/Windows/Fonts/ARIALUNI.TTF" puts "Note: Using ARIALUNI.TTF from C:/Windows/Fonts directory." end