LoginSignup
0
0

More than 5 years have passed since last update.

面倒くさがり屋だからnic.plいじる

Last updated at Posted at 2015-12-17

面倒くさがり屋なんです。

$ nic.pl
NIC 2.0 - New Instance Creator
------------------------------
  [1.] iOS/Flipswitch Toggle
  [2.] iphone/activator_listener_infinite
  [3.] iphone/application
  [4.] iphone/library
  [5.] iphone/preference_bundle
  [6.] iphone/tool
  [7.] iphone/tweak
Choose a Template (required): 7
Project Name (required): foo
Package Name [com.yourcompany.foo]: com.chikuwa.foo ←めんどい
Author/Maintainer Name [MAIN-PC/Chikuwa]: Chikuwa ←めんどい
[iphone/tweak by Chikuwa] MobileSubstrate Bundle filter [com.apple.springboard]:
[iphone/tweak by Chikuwa] List of applications to terminate upon installation (space-separated, '-' for none) [SpringBoard]:
Instantiating iphone/tweak by Chikuwa in foo/...

そう!いちいちPackage Nameとか手で入力するのめんどくさい

ということでnic.plを書き換えちゃおうというわけです。

いざ編集!

まず、46行あたりの
(https://github.com/DHowett/theos/blob/master/bin/nic.pl#L46)を

元:$package_prefix = "com.yourcompany" if !$package_prefix;

後:$package_prefix = "com.chikuwa" if !$package_prefix;

次に、95行あたりの
(https://github.com/DHowett/theos/blob/master/bin/nic.pl#L95)を

元:promptIfMissing(\$username, getUserName(), "Author/Maintainer Name") unless $NIC->variableIgnored("USER");

後:promptIfMissing(\$username, "Chikuwa", "Author/Maintainer Name") unless $NIC->variableIgnored("USER");

以上!

使ってみると。。

$ nic.pl
NIC 2.0 - New Instance Creator
------------------------------
  [1.] iOS/Flipswitch Toggle
  [2.] iphone/activator_listener_infinite
  [3.] iphone/application
  [4.] iphone/library
  [5.] iphone/preference_bundle
  [6.] iphone/tool
  [7.] iphone/tweak
  [8.] iphone/tweak by Chikuwa
Choose a Template (required): 8
Project Name (required): foo
Package Name [com.chikuwa.foo]:
Author/Maintainer Name [Chikuwa]:
[iphone/tweak by Chikuwa] MobileSubstrate Bundle filter [com.apple.springboard]:
[iphone/tweak by Chikuwa] List of applications to terminate upon installation (space-separated, '-' for none) [SpringBoard]:
Instantiating iphone/tweak by Chikuwa in foo/...
Adding 'foo' as an aggregate subproject in Theos makefile 'Makefile'.
Done.

これで作業効率もアップ!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0