Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12419] CLI: Provide option for full simulator builds

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-02-08T02:38:44.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.2, Release 3.1.0, 2013 Sprint 02 JS, 2013 Sprint 02, 2013 Sprint 03 JS
ComponentsTooling
Labelsbuild, cli, cli-review, qe-port
ReporterNeville Dastur
AssigneeChris Barber
Created2013-01-17T11:27:15.000+0000
Updated2013-02-08T23:55:08.000+0000

Description

By default Ti speeds up simulator builds by sym linking and not pre-compiling js, but for uploads to systems such as pieceable a "full" non-symlinked .app build is required. Pieceable provided some patches for SDK 1.8 and 2.0. See: https://github.com/pieceable/titanium-patches but none since. I think it would be a useful option anyway and would avoid having to patch. Please consider adding a "buildfull" option to the ti cmd line build options.

Comments

  1. Chris Barber 2013-01-24

    Good idea! I'll see what I can do.
  2. Chris Barber 2013-01-25

    While being able to force the copy of files instead of symlinking is a decent idea, we will not allow the deploy type to be set to "production" for anything other than a packaged build.
  3. Chris Barber 2013-01-25

    Also, the Titanium specific static libraries would continue to be symlinked. The libTiCore.a file is 250MB and it seems irresponsible to copy this file around.
  4. Neville Dastur 2013-01-25

    Thanks Chris for looking into this. I think for Pieceable to work everything needs to be in the simulator package. Even libTiCore etc. Because in essence you copy the package to another machine. My idea was that this is added as something only accessible from the CLI either build.py or titanium that way the responsibility of copy large files around is down to the dev and is used only when needed.
  5. Chris Barber 2013-01-25

    Hmm, I see what you mean. Let me get back to you.
  6. Neville Dastur 2013-01-25

    Chris, Interestingly I don't think libTiCore comes into it. I did this inside the simulator dir for the app.
       find . -type l -exec bash -c 'FULLPATH=$(readlink "{}"); ORIGPATH="{}"; echo "Copying $FULLPATH onto $ORIGPATH"; rm "$ORIGPATH"; cp -f "$FULLPATH" "$ORIGPATH"' \;
       
    This works for upload to pieceable
  7. Chris Barber 2013-01-25

    libTiCore.a is symlinked into the build/iphone/lib directory. I added a --force-copy flag that will copy everything (no symlinks) EXCEPT libTiCore.a. I also added a --force-copy-all flag that does everything --force-copy does plus it copies libTiCore.a.
  8. Neville Dastur 2013-01-25

    Okay, but the simulator app bundle doesn't contain libTiCore.a. I assume it is linked into the binary. Is there a way I can test the new flag?
  9. Chris Barber 2013-01-25

    Yes, it's linked into the binary. You can test the new flag once it's been committed. I'm still working things. I'll have something next week.
  10. Neville Dastur 2013-01-25

    Thank you. I assume you mean in the CLI update rather than a new SDK version
  11. Chris Barber 2013-01-25

    No, SDK update. iOS build scripts are bundled with the SDK.
  12. Chris Barber 2013-01-26

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3796 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3797
  13. Chris Barber 2013-01-26

    To test: 1) create a project 2) build the project for ios simulator: titanium build -p ios 3) inspect build/iphone/build/Debug-iphonesimulator/appname.app 4) files such as app.js and appicon.png should be symlinked 5) now build with --force-copy: titanium build -p ios --force-copy 6) inspect build/iphone/build/Debug-iphonesimulator/appname.app 7) files such as app.js and appicon.png should have been copied and are not links
  14. Eric Merriman 2013-02-07

    The --force-copy flag works as expected, except in cases where "ti clean" is not used. If you build, then rebuild without cleaning, the symlinks remain and the files are not copied.
  15. Chris Barber 2013-02-07

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3850
  16. Olga Romero 2013-02-08

    Closing as fixed. Tested and verified with: Titanium Studio, build: 3.0.2.201302041757 Titanium SDK, build: 3.0.2.v20130207164659 CLI 3.0.24-cr

JSON Source