• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom Rules with xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Rules with xcode


  • Subject: Re: Custom Rules with xcode
  • From: Willard Myers <email@hidden>
  • Date: Tue, 9 Dec 2003 08:37:35 -0500

On Dec 9, 2003, at 08:11, Trenton Schulz wrote:

I've tried a similar thing with uic and Qt Designer ui files.
Source files with names matching: *.ui
using: Custom script:
/Users/twschulz/troll/qt/3.3/bin/uic $INPUT_FILE_PATH -o ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.h
/Users/twschulz/troll/qt/3.3/bin/uic -impl ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.h $INPUT_FILE_PATH -o ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.cpp


with output files:
${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.h
${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.cpp

And the files are generated just fine. But then all it does is copy the files. It would be great if Xcode would build them and link them into the application, since they are C++ files. I can, of course, add these files to the project myself, but then you have some sort of chicken and egg problem. How can I tell Xcode what to do?

I tried exactly the same thing and got no further. For now, I've fallen back to a (Python) script build phase that runs both uic and moc on a wired list of .ui files, and moc on a wired list of .h files. I add all the files in DERIVED_FILES_DIR to the project once; then I only need to fixup my project when the lists in my script change.


Qt/Mac users need two things for the Xcode custom rule feature to help us out (immensely):

(1) The target should depend on the generated (C++) files, so they get appropriately generated *and* compiled and linked.

(2) The pattern matcher needs to look inside .h files to find those containing the Q_OBJECT macro.

  Bill
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Custom Rules with xcode
      • From: Trenton Schulz <email@hidden>
References: 
 >building ada with xcode (From: jim hopper <email@hidden>)
 >Re: building ada with xcode (From: Glen Low <email@hidden>)
 >Re: building ada with xcode (From: Trenton Schulz <email@hidden>)

  • Prev by Date: Re: building ada with xcode
  • Next by Date: Re: Custom Rules with xcode
  • Previous by thread: Re: building ada with xcode
  • Next by thread: Re: Custom Rules with xcode
  • Index(es):
    • Date
    • Thread