m (Formatting.) |
m (Unnecessary change inconsistent with standard) |
||
Line 3: | Line 3: | ||
''To do: would be nice to explain what the five options mean, what the arguments mean, and why you might want to use those options and those arguments.'' | ''To do: would be nice to explain what the five options mean, what the arguments mean, and why you might want to use those options and those arguments.'' | ||
= How to use a template = | == How to use a template == | ||
$THEOS/bin/nic.pl | $THEOS/bin/nic.pl | ||
Line 11: | Line 11: | ||
NIC will prompt you for all the necessary information before creating a project. | NIC will prompt you for all the necessary information before creating a project. | ||
== NIC Example == | === 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): | Here is an example of what you will see when using the NIC to create a project (with user input shown in bold): | ||
Line 51: | Line 51: | ||
If a template requires extra variables, they will have to be provided by hand. | If a template requires extra variables, they will have to be provided by hand. | ||
= How to create new templates = | == How to create new templates == | ||
''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 = | == 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: | 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: | ||
Line 69: | Line 69: | ||
will make the "Author" cell in the package description in [[Cydia]] prompt to create a mail with the To: field already set. | will make the "Author" cell in the package description in [[Cydia]] prompt to create a mail with the To: field already set. | ||
= External links = | == External links == | ||
* [http://theos.howett.net/nic/ How nic.pl works] | * [http://theos.howett.net/nic/ How nic.pl works] |
Revision as of 03:11, 11 April 2016
New Instance Creator is a project templating system that creates ready-to-build empty projects for varying purposes.
To do: would be nice to explain what the five options mean, what the arguments mean, and why you might want to use those options and those arguments.
How to use a template
$THEOS/bin/nic.pl
NIC will list all the available templates present in $THEOS/templates/
. Usually, these templates will reside within a second folder named iphone
as most templates are made for the iPhone platform (includes iPhones, iPods and iPads).
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.