Skip to content

Commit

Permalink
Merge 3dec23b into 2ec9ad4
Browse files Browse the repository at this point in the history
  • Loading branch information
hamchapman committed Oct 8, 2019
2 parents 2ec9ad4 + 3dec23b commit aa4e387
Show file tree
Hide file tree
Showing 289 changed files with 46,138 additions and 12,088 deletions.
19 changes: 0 additions & 19 deletions .gitignore
Expand Up @@ -28,25 +28,6 @@ Pods/
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws
Expand Down
5 changes: 4 additions & 1 deletion .gitmodules
Expand Up @@ -3,4 +3,7 @@
url = https://github.com/tesseract-ocr/tesseract.git
[submodule "TesseractOCR/libtiff-ios"]
path = TesseractOCR/libtiff-ios
url = https://github.com/ashtons/libtiff-ios.git
url = https://github.com/hamchapman/libtiff-ios.git
[submodule "TesseractOCR/leptonica"]
path = TesseractOCR/leptonica
url = https://github.com/DanBloomberg/leptonica.git
51 changes: 31 additions & 20 deletions .travis.yml
@@ -1,25 +1,36 @@
language: objective-c
os: osx
osx_image: xcode10.1
xcode_workspace: Tesseract-OCR-iOS.xcworkspace
# these sdks are not yet supported in xcode7 build envirenment
xcode_sdk:
# - iphonesimulator7.1
# - iphonesimulator8.1
# - iphonesimulator9.0
- iphonesimulator12.1
xcode_scheme:
#- Template Framework Project
#- TestsProject
osx_image: xcode10.2
sudo: false

env:
- BUILD_DEPENDENT_LIBRARIES=true
- BUILD_DEPENDENT_LIBRARIES=false
- iOS= DST='platform=iOS Simulator,name=iPhone Xs' ACTION=test DEVICE='iPhone Xs (12.2)' XC_SCHEME=Tests-iOS LIB_SCHEME=TesseractOCR BUILD_DEPENDENT_LIBRARIES=true
- iOS= DST='platform=iOS Simulator,name=iPhone Xs' ACTION=test DEVICE='iPhone Xs (12.2)' XC_SCHEME=Tests-iOS LIB_SCHEME=TesseractOCR BUILD_DEPENDENT_LIBRARIES=false
- macOS= DST='platform=OS X' ACTION=test XC_SCHEME=Tests-macOS LIB_SCHEME=TesseractOCRmacOS BUILD_DEPENDENT_LIBRARIES=true
- macOS= DST='platform=OS X' ACTION=test XC_SCHEME=Tests-macOS LIB_SCHEME=TesseractOCRmacOS BUILD_DEPENDENT_LIBRARIES=false

before_install:
- gem install cocoapods -v '1.5.3'
- brew uninstall xctool
- brew install xctool --HEAD
- xctool --version
- ./scripts/before_install.sh
- gem install xcpretty --no-document
- SIMULATOR_ID=$(xcrun instruments -s | grep -o "$DEVICE \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/")
- echo "$SIMULATOR_ID"
- ./scripts/before_install.sh

script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -workspace Tesseract-OCR-iOS.xcworkspace -list
- if [ "$DST" != "platform=OS X" ]; then
echo "$SIMULARTOR_ID";
open -a "simulator" --args -CurrentDeviceUDID $SIMULATOR_ID || true; sleep 20;
fi
- if [ "$BUILD_DEPENDENT_LIBRARIES" = "true" ]; then
brew uninstall --ignore-dependencies openjpeg webp;
brew install automake autoconf autoconf-archive libtool pkgconfig icu4c;
cd TesseractOCR && make clean && cd ..;
rm -rfv TesseractOCR/{ios,macos}/lib/*.a;
xcodebuild -scheme "$LIB_SCHEME" -destination "$DST" -workspace "Tesseract-OCR-iOS.xcworkspace" BUILD_DEPENDENT_LIBRARIES=true clean build;
fi
- xcodebuild -scheme "$XC_SCHEME" -destination "$DST" -workspace "Tesseract-OCR-iOS.xcworkspace" clean build | xcpretty -tc
- xcodebuild -scheme "$XC_SCHEME" -destination "$DST" -workspace "Tesseract-OCR-iOS.xcworkspace" -enableCodeCoverage YES $ACTION | xcpretty -tc

after_success:
./scripts/coveralls.rb --extension m --extension mm --exclude-folder include --exclude-folder TestsProject
./scripts/coveralls.rb --extension m --extension mm --exclude-folder include --exclude-folder Tests --exclude-folder Tests-iOS --exclude-folder Tests-macOS
37 changes: 31 additions & 6 deletions Examples/Example Swift/Example Swift.xcodeproj/project.pbxproj
Expand Up @@ -7,24 +7,39 @@
objects = {

/* Begin PBXBuildFile section */
379D0556234D0E8C008038A6 /* TesseractOCR.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37DEFECD2250232300C43F4D /* TesseractOCR.framework */; };
379D0557234D0E8C008038A6 /* TesseractOCR.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 37DEFECD2250232300C43F4D /* TesseractOCR.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
F9A489F12037776A00887BDC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A489F02037776A00887BDC /* AppDelegate.swift */; };
F9A489F32037776A00887BDC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A489F22037776A00887BDC /* ViewController.swift */; };
F9A489F62037776A00887BDC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F9A489F42037776A00887BDC /* Main.storyboard */; };
F9A489F82037776A00887BDC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F9A489F72037776A00887BDC /* Assets.xcassets */; };
F9A489FB2037776A00887BDC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F9A489F92037776A00887BDC /* LaunchScreen.storyboard */; };
F9A48A032037779E00887BDC /* TesseractOCR.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9A48A022037779E00887BDC /* TesseractOCR.framework */; };
F9A48A18203781AE00887BDC /* tessdata in Resources */ = {isa = PBXBuildFile; fileRef = F9A48A17203781AD00887BDC /* tessdata */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
379D0558234D0E8C008038A6 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
379D0557234D0E8C008038A6 /* TesseractOCR.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
37DEFECD2250232300C43F4D /* TesseractOCR.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TesseractOCR.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F9A489ED2037776A00887BDC /* Example Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
F9A489F02037776A00887BDC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
F9A489F22037776A00887BDC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
F9A489F52037776A00887BDC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
F9A489F72037776A00887BDC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F9A489FA2037776A00887BDC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
F9A489FC2037776A00887BDC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F9A48A022037779E00887BDC /* TesseractOCR.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TesseractOCR.framework; path = "../../../../../Library/Developer/Xcode/DerivedData/Tesseract-OCR-iOS-fsfgynznxutkxjedsqkamexforqf/Build/Products/Debug-iphoneos/TesseractOCR.framework"; sourceTree = "<group>"; };
F9A48A17203781AD00887BDC /* tessdata */ = {isa = PBXFileReference; lastKnownFileType = folder; name = tessdata; path = "../../../Template Framework Project/Template Framework Project/tessdata"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -33,19 +48,27 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F9A48A032037779E00887BDC /* TesseractOCR.framework in Frameworks */,
379D0556234D0E8C008038A6 /* TesseractOCR.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
37DEFECC2250232300C43F4D /* Frameworks */ = {
isa = PBXGroup;
children = (
37DEFECD2250232300C43F4D /* TesseractOCR.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
F9A489E42037776A00887BDC = {
isa = PBXGroup;
children = (
F9A489EF2037776A00887BDC /* Example Swift */,
F9A489EE2037776A00887BDC /* Products */,
F9A48A022037779E00887BDC /* TesseractOCR.framework */,
37DEFECC2250232300C43F4D /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -81,6 +104,7 @@
F9A489E92037776A00887BDC /* Sources */,
F9A489EA2037776A00887BDC /* Frameworks */,
F9A489EB2037776A00887BDC /* Resources */,
379D0558234D0E8C008038A6 /* Embed Frameworks */,
);
buildRules = (
);
Expand All @@ -103,6 +127,7 @@
TargetAttributes = {
F9A489EC2037776A00887BDC = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -292,7 +317,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.g8production.Template-Framework-Project.Example-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -307,7 +332,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.g8production.Template-Framework-Project.Example-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9A489EC2037776A00887BDC"
BuildableName = "Example Swift.app"
BlueprintName = "Example Swift"
ReferencedContainer = "container:Example Swift.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9A489EC2037776A00887BDC"
BuildableName = "Example Swift.app"
BlueprintName = "Example Swift"
ReferencedContainer = "container:Example Swift.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9A489EC2037776A00887BDC"
BuildableName = "Example Swift.app"
BlueprintName = "Example Swift"
ReferencedContainer = "container:Example Swift.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9A489EC2037776A00887BDC"
BuildableName = "Example Swift.app"
BlueprintName = "Example Swift"
ReferencedContainer = "container:Example Swift.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion Examples/Example Swift/Example Swift/AppDelegate.swift
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down

0 comments on commit aa4e387

Please sign in to comment.