Skip to content

Commit

Permalink
Add instructions on how to rebuild protos
Browse files Browse the repository at this point in the history
It's done by hand for now because of the
manual edits required (see the bug referenced
in the text).
  • Loading branch information
jensck committed Oct 29, 2019
1 parent 1a95191 commit eaa04b1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions firmwareprotos/README.md
@@ -0,0 +1,12 @@
This module consists solely of the Java source code generated by `protoc` for [the DeviceOS protobuf definitions](https://github.com/particle-iot/firmware-protobuf).

To regenerate the Java protobuf sources:

1. Check out the protobuf repo linked above
1. `cd` to the root of the protobuf repo
1. Run `mkdir java`
1. Run `cd control`
1. In `common.proto`, remove/comment out the message `IPAddress` (But _do not_ remove `IpAddress`: note the case difference!), and do the same in `network.proto` for the messages/enums `NetworkGetStatusRequest`, `NetworkGetStatusReply`, `NetworkGetConfigurationRequest`, `NetworkSetConfigurationRequest`, `NetworkState`, `IPConfiguration`, `DNSConfiguration`, and `NetworkConfiguration` (See this bug for more information: https://github.com/particle-iot/firmware-protobuf/issues/8)
1. Run: `protoc --java_out=../java/ cellular.proto cloud.proto common.proto config.proto extensions.proto mesh.proto network.proto storage.proto wifi_new.proto`
1. Copy the Java sources under the `java` dir to the `src/main/java` dir of this module.

0 comments on commit eaa04b1

Please sign in to comment.