xcode 4 support

196 vues
Accéder directement au premier message non lu

Francisco Tolmasky

non lue,
14 avr. 2011, 12:55:4414/04/2011
à objec...@googlegroups.com
I just landed a change that should get us back compatibility wise to where we were in xcode 3 days. I've created a new tool, xcodecapp, which you can run from the directory of your project:

> cd MyCappApp
> xcodecapp

This will create a shadow xcode project and launch it. From within this project, you can edit all your nibs (and they will be automatically nib2cibed watch-style), as well as edit your source files, and it will automatically pick up on IBOutlets and IBActions (allowing us to once again have custom outlets and actions). Note that you can actually edit your .j source files outside of xcode, and it will still be smart enough to pick up on your new outlets/actions automatically and allow you to use them when you edit your nibs. It does this by monitoring all your .j files and creating secret .h parallel files.

This is still very new so it probably has a bunch of bugs, but should get us going in the right direction. I still have to handle cases like when you delete files, etc., but once this is ready we shouldn't need nib2cib --watch anymore I think. Feel free to start editing the xcodecapp code as there is still much to be done (no docs, better handling of edge cases, etc -- aparajita looking at you ;) )

Nathaniel Martin

non lue,
14 avr. 2011, 13:38:3114/04/2011
à objec...@googlegroups.com
Sounds fantastic... I can't wait to try it out.

> --
> You received this message because you are subscribed to the Google Groups
> "Cappuccino & Objective-J" group.
> To post to this group, send email to objec...@googlegroups.com.
> To unsubscribe from this group, send email to
> objectivej+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/objectivej?hl=en.
>

Aparajita Fishman

non lue,
14 avr. 2011, 13:49:1614/04/2011
à objec...@googlegroups.com
> once this is ready we shouldn't need nib2cib --watch anymore I think.

...except if the user doesn't have Xcode 4.

Many thanks,

Aparajita
www.aparajitaworld.com

"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoy.org

Aparajita Fishman

non lue,
14 avr. 2011, 13:50:3814/04/2011
à objec...@googlegroups.com
>> once this is ready we shouldn't need nib2cib --watch anymore I think.
>
> ...except if the user doesn't have Xcode 4.

Or does xcodecapp work the same way with Xcode 3?

Francisco Tolmasky

non lue,
14 avr. 2011, 13:56:0414/04/2011
à objec...@googlegroups.com
Although I haven't tried (because I only have xcode 4 now), there is no reason it shouldn't work with xcode 3. The file updating code is the same as nib2cib's watch code (with the addition of also watching .j's), so that alone should have no xcode dependencies. On top of that, xcode 4 projects are compatible with xcode 3, so the project magic *should* also work.

My general idea is to have xcodecapp be a "management" tool, and having little apps do (like nib2cib) doing the heavy lifting specific tasks. One of the benefits of this is that since xcodecapp just calls out to nib2cib it can actually run many of them in parallel as opposed to nib by nib serially.

Another nice addition to xcodecapp would be to make Safari/Chrome/FireFox/etc targets so that you can "build and run" from xcode and have it launch in the browser of your choice.

Aparajita Fishman

non lue,
14 avr. 2011, 13:59:1014/04/2011
à objec...@googlegroups.com
> start editing the xcodecapp code as there is still much to be done (no docs, better handling of edge cases, etc -- aparajita looking at you ;) )

I'll definitely take a look at it after I finish fixing nib2cib to do real WYSIWYG conversion.

Klaas Pieter Annema

non lue,
14 avr. 2011, 14:21:0914/04/2011
à objec...@googlegroups.com
The targets shouldn't be to hard. I'm not sure about XCode4 but in 3 you could create a script target that runs open <path to index.html> -a <preferred browser>.

- Klaas Pieter
--

Ichsan

non lue,
15 avr. 2011, 02:23:1215/04/2011
à objec...@googlegroups.com

Aparajita Fishman <apar...@aparajitaworld.com> wrote:

>>> once this is ready we shouldn't need nib2cib --watch anymore I think.
>>
>> ...except if the user doesn't have Xcode 4.
>
>Or does xcodecapp work the same way with Xcode 3?
>

>Many thanks,
>
> Aparajita
> www.aparajitaworld.com
>
> "If you dare to fail, you are bound to succeed."
> - Sri Chinmoy | www.srichinmoy.org
>

Klaas Pieter Annema

non lue,
15 avr. 2011, 02:33:0915/04/2011
à objec...@googlegroups.com
I got a chance to play around with this. On startup it launches xcode 3, preprocesses all my .j and nib2cibs all my .xib files. This brings the total startup time for my project to about 5 minutes.

Other things I noticed:
  1. No command line option to provide xcode version to use
  2. No documentation, --help should give general information, man xcodebuild should
- Klaas Pieter

p.s. it didn't do anything for me, it might be because I'm using XCode 3. I might have also used it wrong, which is where the documentation comes in.

Antoine Mercadal

non lue,
15 avr. 2011, 02:56:1015/04/2011
à objec...@googlegroups.com
Great news!

I played with it too and I have problem with my Capp libraries that are parsed (even cappuccino itself stored in rootProject/Libraries/Cappuccino. 

Is there an option to ignore folders?

Regards,

-- 
Antoine Mercadal

Francisco Tolmasky

non lue,
15 avr. 2011, 12:19:1415/04/2011
à objec...@googlegroups.com
I've gone ahead and made it so it ignores subfolders that themselves have Jakefiles ("subprojects"). Hopefully this alleviates the situation.

Antoine Mercadal

non lue,
15 avr. 2011, 12:40:0515/04/2011
à objec...@googlegroups.com
great, I'm gonna try right now.

For my information, how can I just install xcodecapp, not the whole framework ?

--
Antoine Mercadal

Le 15 avr. 2011 à 18:19, Francisco Tolmasky a écrit :

> I've gone ahead and made it so it ignores subfolders that themselves have
> Jakefiles ("subprojects"). Hopefully this alleviates the situation.
>

Antoine Mercadal

non lue,
15 avr. 2011, 12:43:0615/04/2011
à objec...@googlegroups.com
seems that it continue to parse the Build directory (that in my case is in the root project)

--
Antoine Mercadal

Ignacio Cases

non lue,
15 avr. 2011, 14:01:2715/04/2011
à objec...@googlegroups.com
It works beautifully with Xcode 4. Thanks!

-Ignacio

On Fri, Apr 15, 2011 at 5:19 PM, Francisco Tolmasky <tolm...@gmail.com> wrote:
I've gone ahead and made it so it ignores subfolders that themselves have Jakefiles ("subprojects"). Hopefully this alleviates the situation.

--

stephen white

non lue,
15 avr. 2011, 15:47:1015/04/2011
à objec...@googlegroups.com
On 16/04/2011, at 1:49 AM, Francisco Tolmasky wrote:
> I've gone ahead and made it so it ignores subfolders


I've just had a play and it looks promising! I did "capp gen -l testproj; cd testproj; xcodecapp" and it came up fine.

I had to do "mkdir .xCodeSupport/Another; cp Info.plist .xCodeSupport/Another/Another-Info.plist" before it would build, and it won't run due to no executable specified.

As a quick feature add, how can XCode be told to use Objective-C syntax colouring for .j files, as this already works pretty well including the navigation jump bar.

--
st...@adam.com.au

Diogo

non lue,
15 avr. 2011, 18:34:4515/04/2011
à objec...@googlegroups.com
I tried adding the j extension to the objective-c filetype in /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/Resources/Standard file types.pbfilespec  but nothing happened.

But I also delete the file to see what would happen, and obj-c files were still being recognized correctly.. so this maybe this is just the wrong file...

Diogo

Antoine Mercadal

non lue,
21 avr. 2011, 08:46:2221/04/2011
à objec...@googlegroups.com
Hello,

xcodecapp is a pretty cool tool. I use it to re make all my Atlas CIB to standard XIB. The conversion process runs well and now I'm done with my 25 cibs, I can make some feedback. My project as a relatively complex tree and I run into problems.

First here is how the app is globally organized:

+ The project
`--+ AppController.j
`--+ Info.plist
`--+ some tools
`--+ indexes
`-- Jakefile
`--+ Categories
| `--+ some categories, one per files
`--+ Controllers
| `--+ some controllers
`--+ Views
| `--+ some views
`--+ Model
| `--+ some model
`--+ Build
| `--+ Release
| `--+ Debug
`--+ Module
| `--+ links to built bundles in Modules.src
`--+ Modules.src
| `--+ commons modules Jakefile
| `--+ moduleA
| | `--+ files.j
| | `--+ Resources
| | | `--+ some XIB files
| | `--+ Build
| | | `--+ Release
| | | `--+ Debug
| | `--+ Jakefile
| `--+ moduleB
| | `--+ files.j
| | `--+ Resources
| | | `--+ some XIB files
| | `--+ Build
| | | `--+ Release
| | | `--+ Debug
| | `--+ Jakefile
| `--+ etc...
`--+ Resources
| `--+ some XIB files
`--+ Libraries
`--+ Cappuccino (git submodule)
`--+ TNKit (git submodule)
`--+ StropheCappuccino (git submodule)
`--+ etc..

The full tree can be seen at http://github.com/primalmotion/archipel (I suck at ASCII art)

So the problems mainly come from the bundles.

* Bundles's principal classes are inherited from for a class that resides on /model. And obviously xcodecapp doesn't find it. I fix this by adding a symlink in each bundle folder and it works.

* When I want to edit a specific XIB in a specific bundle, I need to run xcodecapp for each one. after 10 or more, the fans become crazy.

* I don't know when a conversion is done. We can see "Edited blah/blih.xib" then some warnings/errors if any, but there is no "conversion done.". That would help to know when it's ok

* I need one instance of xcodeproj for each of my bundles + one for the main app, that pretty annoying.

So what would definitely be wonderfull, would like to be able to have some sort of gitignore for xcodecapp instead of looking for Jakefile in subfolders. for instance, a .xcodecappignore with a list of folder to ignore (I would be able to ignore my Libraries and Build folders, but I will get one full XCode project with everything in it and only one xcodecapp process running)

What do you think?

Regards,

--
Antoine Mercadal

Antoine Mercadal

non lue,
21 avr. 2011, 10:14:2821/04/2011
à objec...@googlegroups.com
Ok actually I played with it a bit, and I implement this

https://github.com/primalmotion/cappuccino/tree/xcodecapp-ignore

It certainly some optimization as I'm not really at ease with commonJS, but it works pretty well and fix all my problems.

Should I pull-request it ?

--
Antoine Mercadal

Johannes Fahrenkrug

non lue,
22 avr. 2011, 07:26:5922/04/2011
à Cappuccino & Objective-J
This is awesome! Thank you!

johnlabarge

non lue,
26 avr. 2011, 21:21:0626/04/2011
à Cappuccino & Objective-J
I have the following error in xcodecapp with a fresh capp gen'd
application. All I did was cd to that directory and type xcodecapp
<return>.

error: could not read data from '/Developer/SS/looks2/.xCodeSupport/
Another/Another-Info.plist': The file “Another-Info.plist” couldn’t be
opened because there is no such file.

(1) Should it be looking for this file?
If not it may be related to the fact that I originally tried to
install the developer tools for xcode.

(2) If so, then maybe there was a problem with my original
installation??

Thanks for your help and thanks for this awesome work on an awesome
framework.

johnlabarge

non lue,
26 avr. 2011, 21:33:0626/04/2011
à Cappuccino & Objective-J
I should have said error in Xcode, not xcodecapp. I'm trying a rebuild
+install of cappuccino from source to see if that resolves.
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message