Skip to content

Commit

Permalink
Update build scripts and regenerate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyxo committed Apr 5, 2015
1 parent 4f97257 commit 0e393bc
Show file tree
Hide file tree
Showing 44 changed files with 25,899 additions and 3,014 deletions.
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
language: objective-c
before_install:
- brew update
- brew unlink xctool
- brew install xctool --HEAD
- brew install protobuf
- ./build.sh
- ./travis/travis.sh
- brew update
- brew uninstall xctool
- brew install xctool --HEAD
- xctool -v
- brew install protobuf
install:
- scripts/build.sh
- scripts/makeTests.sh
script: xctool -project ./src/runtime/ProtocolBuffers.xcodeproj -sdk iphonesimulator -scheme ProtocolBuffers build test
2 changes: 1 addition & 1 deletion ProtocolBuffers.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ProtocolBuffers"
s.version = "1.9.7"
s.version = "1.9.8"
s.summary = "Protocol Buffers for Objective-C"
s.description = <<-DESC
An implementation of Protocol Buffers 2.6 in Objective C.
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ How To Install Protobuf

### Building the Objective-C Protobuf compiler

1. Check if you have Homebrew
`brew -v`
2. If you don't already have Homebrew, then install it
`ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
3. Install the main Protobuf compiler and required tools
`brew install automake`
`brew install libtool`
`brew install protobuf`
4. (optional) Create a symlink to your Protobuf compiler.
`ln -s /usr/local/Cellar/protobuf/2.6.1/bin/protoc /usr/local/bin`
5. Clone this repository.
`git clone https://github.com/alexeyxo/protobuf-objc.git`
6. Build it!
`./build.sh`
1. Check if you have Homebrew
`brew -v`
2. If you don't already have Homebrew, then install it
`ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`
3. Install the main Protobuf compiler and required tools
`brew install automake`
`brew install libtool`
`brew install protobuf`
4. (optional) Create a symlink to your Protobuf compiler.
`ln -s /usr/local/Cellar/protobuf/2.6.1/bin/protoc /usr/local/bin`
5. Clone this repository.
`git clone https://github.com/alexeyxo/protobuf-objc.git`
6. Build it!
`./build.sh`

### Adding to your project as a sub project

Expand All @@ -41,7 +41,7 @@ How To Install Protobuf

7. `cd <your .xcodeproj directory>`

8. `echo -e "platform :ios , 6.0 \nlink_with '<YourAppTarget>', '<YourAppTarget_Test>' \npod 'ProtocolBuffers', '1.9.7' " > Podfile`
8. `echo -e "platform :ios , 6.0 \nlink_with '<YourAppTarget>', '<YourAppTarget_Test>' \npod 'ProtocolBuffers'" > Podfile`

9. `pod install`

Expand Down
5 changes: 0 additions & 5 deletions build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion compile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

scriptversion=2012-10-14.11; # UTC

# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
Expand Down
8 changes: 8 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env sh

set -ex

./autogen.sh
./configure CXXFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
make clean
make -j8 && make install
16 changes: 16 additions & 0 deletions scripts/makeDescriptor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env sh

set -ex

compiler_root=src/compiler

PATH=$PATH:$compiler_root

# we need this for bootstrapping
protoc -I$compiler_root $compiler_root/google/protobuf/{,objectivec-}descriptor.proto --cpp_out=$compiler_root

# build the objc generator
scripts/build.sh

# compile the objc descriptors into the runtime library
protoc -I$compiler_root $compiler_root/google/protobuf/{,objectivec-}descriptor.proto --objc_out=src/runtime/Classes/
10 changes: 10 additions & 0 deletions scripts/makeTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env sh

set -ex

compiler_root=src/compiler

PATH=$PATH:$compiler_root

# compile the unit tests into the runtime library's fixture directory
protoc -I$compiler_root $compiler_root/google/protobuf/unittest*.proto --objc_out=src/runtime/Tests/
9,135 changes: 9,135 additions & 0 deletions src/compiler/google/protobuf/descriptor.pb.cc

Large diffs are not rendered by default.

Loading

0 comments on commit 0e393bc

Please sign in to comment.