NIC: Difference between revisions

From iPhone Development Wiki
(First Commit)
 
(~/.nicrc)
Line 50: Line 50:


''Say something about old and new templates, refer to denicify.pl and nicify.pl''
''Say something about old and new templates, refer to denicify.pl and nicify.pl''
== How to set default values ==
You can create the file <code>~/.nicrc</code> to set up some default values for '''NIC''' to use. Writing the following lines in this file:
  username = "Dustin L. Howett"
  package_prefix = "net.howett"
will make '''NIC''' not ask for username. When prompted for a packagename,
  Package Name [com.yourcompany.iphonedevwiki]:
will be
  Package Name [net.howett.iphonedevwiki]:
If you add an e-mail address in the username like this:
  username = "Dustin L. Howett <[email protected]>"
will make the "Author" cell in the package description in [[Cydia]] prompt to create a mail with the To: field already set.


== References ==
== References ==
[http://theos.howett.net/nic/ How nic.pl works]
[http://theos.howett.net/nic/ How nic.pl works]

Revision as of 03:00, 30 April 2014

New Instance Creator is a project templating system that creates ready-to-build empty projects for varying purposes.

How to use a template

$THEOS/bin/nic.pl

NIC will prompt you for all the necessary information before creating a project.

NIC Example

Here is an example of what you will see when using the NIC to create a project (with user input shown in bold):

$ $THEOS/bin/nic.pl
NIC 1.0 - New Instance Creator
------------------------------
  [1.] iphone/application
  [2.] iphone/library
  [3.] iphone/preference_bundle
  [4.] iphone/tool
  [5.] iphone/tweak
Choose a Template (required): 1
Project Name (required): iPhoneDevWiki
Package Name [com.yourcompany.iphonedevwiki]: net.howett.iphonedevwiki
Authour/Maintainer Name [Dustin L. Howett]:              
Instantiating iphone/application in iphonedevwiki/...
Done.
$

The above will create a folder ./iphonedevwiki in the current working directory - make sure you have permissions to create a folder.

Alternately, nic.pl supports the following arguments:

short flag long flag argument example
-t -template iphone/template iphone/tweak
-n -name project name iPhoneDevWiki
-p -packagename package name net.howett.iphonedevwiki
-u -user user name "Dustin L. Howett"
-nic template file libactivator_listener.nic

If a template requires extra variables, they will have to be provided by hand.

How to create new templates

Say something about old and new templates, refer to denicify.pl and nicify.pl

How to set default values

You can create the file ~/.nicrc to set up some default values for NIC to use. Writing the following lines in this file:

 username = "Dustin L. Howett"
 package_prefix = "net.howett"

will make NIC not ask for username. When prompted for a packagename,

 Package Name [com.yourcompany.iphonedevwiki]:

will be

 Package Name [net.howett.iphonedevwiki]:

If you add an e-mail address in the username like this:

 username = "Dustin L. Howett <[email protected]>"

will make the "Author" cell in the package description in Cydia prompt to create a mail with the To: field already set.

References

How nic.pl works