Bob suddenly bundling debug version

I’ve been using the same build script for a few weeks now and suddenly I notice that my testers are seeing debug related things in the game - I use the sys.get_engine_info().is_debug flag in my game code to test a bunch of features. Long story short - builds now seem to be reporting this property as true, when in the past they didn’t.

I am using the latest version of Bob, and Defold is up to date as of writing this post.

Here is how my build script looks, I don’t use -d anywhere. The target in question is bundle-ios-itunes

I’ll keep digging and update this thread if I find anything, but currently I’m a little stumped :slight_smile:

<target name="prepare.plist">
          <exec executable="python" failonerror="true">
               <arg line ="prepare-plist.py" />
          </exec>
     </target>

 <target name="clean">
          <echo>Cleaning</echo>
          <java jar="bob.jar" fork="true" failonerror="true">
               <arg line="clean distclean" />
               <arg line="-r ${bob.root}" />
               <arg line="-o ${bob.output}" />
               <arg line="--verbose" />
          </java>
     </target>

     <target name="resolve">
          <echo>Resolving</echo>
          <java jar="bob.jar" fork="true"  failonerror="true">
               <arg line="resolve" />
               <arg line="--email foos@bar.com --auth 12345" />
               <arg line="-r ${bob.root}" />
               <arg line="-o ${bob.output}" />
               <arg line="--verbose" />
          </java>
     </target>

 <target name="build" unless="already.built" depends="clean,resolve,prepare.plist" >
          <property name="already.built" value="true" />
          <antcall target="increment-revision" />
          <antcall target="update-project-version" />
          <echo>Building</echo>
          <java jar="bob.jar" fork="true"  failonerror="true">
               <arg line="build" />
               <arg line="--archive" />
               <arg line="-tc true" />
               <arg line="-r ${bob.root}" />
               <arg line="-o ${bob.output}" />
          </java>
     </target>

    <target name="bundle-ios-itunes" depends="build">
              <echo>Building for iTunes Connect</echo>
              <java jar="bob.jar" fork="true"  failonerror="true">
                   <arg line="bundle" />
                   <arg line="-p armv7-darwin" />
                   <arg line="--identity ${ios.identity.distribution}" />
                   <arg line="-mp ${ios.provision.distribution}" />
                   <arg line="-r ${bob.root}" />
                   <arg line="-o ${bob.output}" />
                   <arg line="--bundle-output ${bundle.output.public}" />
              </java>
         </target>

Are you using native extensions?
Currently, by default, you’ll get a debug build. We currently have an issue we’re working on, that the “Release” button isn’t respected when using native extensions. There is a workaround though, by using an app manifest.

Yes, I am using native extensions.

What’s the workaround you speak of? :slight_smile:

Edit: I haven’t changed the extensions I have used for a few weeks either though - and didn’t notice the problem before now, and I am making builds 3-4 times a week using this script. Is the limitation when using bob, through the IDE, or both?

Yes, you can create a “Release” app manifest, which tells the NE builder that it should use certain libraries when building. You can use @britzl’s tool Manifestation to create such an app manifest.

Then, download it, add it to your project and refer to it in game.projectunder native_extension.app_manifest.

1 Like

Will this mean when building the game through the IDE it will be a release version too, when developing?

Yes.

One way is ofc to only use the app manifest when bundling, e.g. when using bob.jar on a CI machine.

1 Like

I used a manifest generated using the tool, and when I build or rebuild from the editor it is_debug is showing correctly as false.

However, when I build with bob, using the same parameters as my initial post, the resulting build is still reporting is_debug to be true.

Any idea what could be causing this? I have double and triple checked to make sure that the manifest is correct and is set in the game project file.

Here is the manifest:

# App manifest generated Tue Aug 21 2018 23:07:42 GMT+0100 (BST)
# Settings: Release
platforms:
    x86_64-osx:
        context:
            excludeLibs: ["engine"]
            excludeSymbols: []
            libs: ["engine_release"]

    x86_64-linux:
        context:
            excludeLibs: ["engine"]
            excludeSymbols: []
            libs: ["engine_release"]

    js-web:
        context:
            excludeLibs: ["engine"]
            excludeSymbols: []
            libs: ["engine_release"]

    x86-win32:
        context:
            excludeLibs: ["libengine"]
            excludeSymbols: []
            libs: ["libengine_release.lib"]

    x86_64-win32:
        context:
            excludeLibs: ["libengine"]
            excludeSymbols: []
            libs: ["libengine_release.lib"]

    armv7-android:
        context:
            excludeLibs: ["engine"]
            excludeSymbols: []
            libs: ["engine_release"]

    armv7-ios:
        context:
            excludeLibs: ["engine"]
            excludeSymbols: []
            libs: ["engine_release"]

    arm64-ios:
        context:
            excludeLibs: ["engine"]
            excludeSymbols: []
            libs: ["engine_release"]

What if you bundle from within the editor and then run that bundle?

Will try and post my findings.

When I bundle through the editor, is_debug is correctly showing as false.

I will continue experimenting with bob after lunch, I’ll try some older versions etc.

Bundling through the editor uses Bob as well, sounds like there is some difference in how you invoke Bob compared to the editor. Could you post the command line for bundling with bob that causes the issue?

1 Like

Sure, I’m using it as part of an ant target, it looks like:

 <java jar="bob.jar" fork="true"  failonerror="true">
               <arg line="build" />
               <arg line="--archive" />
               <arg line="-tc true" />
               <arg line="-r ${bob.root}" />
               <arg line="-o ${bob.output}" />
          </java>

Followed by bundle:

<target name="bundle-ios-developer" depends="build">
          <echo>Building for iOS internal distribution</echo>
          <java jar="bob.jar" fork="true"  failonerror="true">
               <arg line="bundle" />
               <arg line="-p armv7-darwin" />
               <arg line="--identity ${ios.identity.development}" />
               <arg line="-mp ${ios.provision.development}" />
               <arg line="-r ${bob.root}" />
               <arg line="-o ${bob.output}" />
               <arg line="--bundle-output ${bundle.output.internal}" />
          </java>
     </target>

I also clean, and resolve before every build:

<target name="clean">
          <echo>Cleaning</echo>
          <java jar="bob.jar" fork="true" failonerror="true">
               <arg line="clean distclean" />
               <arg line="-r ${bob.root}" />
               <arg line="-o ${bob.output}" />
               <arg line="--verbose" />
          </java>
     </target>

     <target name="resolve">
          <echo>Resolving</echo>
          <java jar="bob.jar" fork="true"  failonerror="true">
               <arg line="resolve" />
               <arg line="--email foos@bar.com --auth 12345" />
               <arg line="-r ${bob.root}" />
               <arg line="-o ${bob.output}" />
               <arg line="--verbose" />
          </java>
     </target>

I don’t see anything odd about your ant setup.
I’d double check that the Editor 2 bundle is identical with the Ant bundle.

EDIT: Specifically if the executables are identical (same checksum)

Are you referring to my bob.jar or the actual IPA file?

EDIT: Or the outputted binary from the build?

The outputted binary. If you compare it between the Editor2 bundle and the Bob.jar bundle, are they the same?

I’ll have a look. I’ve been streamlining my build script and integrated automatic downloading of the latest bob.jar in the hopes that it would help… :slight_smile: - just trying to eliminate any manual human error. When in doubt, automate :smiley:

1 Like

I checked the package contents of two bundled apps (iOS), one made with the aforementioned ant script, the other with Editor 2 bundle option.

Neither the game.arcd or the Triggered (file named after the project, with no extension - I’m guessing its the engine?) are identical.

Even the file size is different, the file Triggered (no extension) from the Editor 2 output is 5.5mb and the one from the build script, 5.3mb.

It’s possible it ‘suddenly’ started to behave as expected. I’m double checking, but its rather disconcerting because I couldn’t put my finger on what it was. Will update the thread with more information later.

Ok my build script is now outputting release builds. I wish I knew why. If I figure out why, or if the problem comes back I’ll use this thread to explore the problem further. I am guessing this is human error on my part though.

2 Likes