48{
49
51 if (projectName.
isEmpty()) projectName=
"root";
53 if (bundleId.
isEmpty()) bundleId=
"org.doxygen.Project";
55 if (feedName.
isEmpty()) feedName=
"FeedName";
57 if (feedURL.
isEmpty()) feedURL=
"FeedUrl";
59 if (publisherId.
isEmpty()) publisherId=
"PublisherId";
61 if (publisherName.
isEmpty()) publisherName=
"PublisherName";
63 if (projectNumber.
isEmpty()) projectNumber=
"ProjectNumber";
64
65
66 {
69 if (!ts.is_open())
70 {
71 term(
"Could not open file %s for writing\n",
qPrint(mfName));
72 }
73
74 ts << "DOCSET_NAME=" << bundleId << ".docset\n"
75 "DOCSET_CONTENTS=$(DOCSET_NAME)/Contents\n"
76 "DOCSET_RESOURCES=$(DOCSET_CONTENTS)/Resources\n"
77 "DOCSET_DOCUMENTS=$(DOCSET_RESOURCES)/Documents\n"
78 "DESTDIR=~/Library/Developer/Shared/Documentation/DocSets\n"
79 "XCODE_INSTALL=\"$(shell xcode-select -print-path)\"\n"
80 "\n"
81 "all: docset\n"
82 "\n"
83 "docset:\n"
84 "\tmkdir -p $(DOCSET_DOCUMENTS)\n"
85 "\tcp Nodes.xml $(DOCSET_RESOURCES)\n"
86 "\tcp Tokens.xml $(DOCSET_RESOURCES)\n"
87 "\tcp Info.plist $(DOCSET_CONTENTS)\n"
88 "\ttar --exclude $(DOCSET_NAME) \\\n"
89 "\t --exclude Nodes.xml \\\n"
90 "\t --exclude Tokens.xml \\\n"
91 "\t --exclude Info.plist \\\n"
92 "\t --exclude Makefile -c -f - . \\\n"
93 "\t | (cd $(DOCSET_DOCUMENTS); tar xvf -)\n"
94 "\t$(XCODE_INSTALL)/usr/bin/docsetutil index $(DOCSET_NAME)\n"
95 "\trm -f $(DOCSET_DOCUMENTS)/Nodes.xml\n"
96 "\trm -f $(DOCSET_DOCUMENTS)/Info.plist\n"
97 "\trm -f $(DOCSET_DOCUMENTS)/Makefile\n"
98 "\trm -f $(DOCSET_RESOURCES)/Nodes.xml\n"
99 "\trm -f $(DOCSET_RESOURCES)/Tokens.xml\n"
100 "\n"
101 "clean:\n"
102 "\trm -rf $(DOCSET_NAME)\n"
103 "\n"
104 "install: docset\n"
105 "\tmkdir -p $(DESTDIR)\n"
106 "\tcp -R $(DOCSET_NAME) $(DESTDIR)\n"
107 "\n"
108 "uninstall:\n"
109 "\trm -rf $(DESTDIR)/$(DOCSET_NAME)\n"
110 "\n"
111 "always:\n";
112 }
113
114
115 {
118 if (!ts.is_open())
119 {
120 term(
"Could not open file %s for writing\n",
qPrint(plName));
121 }
122
123 ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
124 "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n"
125 "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
126 "<plist version=\"1.0\">\n"
127 "<dict>\n"
128 " <key>CFBundleName</key>\n"
129 " <string>" << projectName << "</string>\n"
130 " <key>CFBundleIdentifier</key>\n"
131 " <string>" << bundleId << "</string>\n"
132 " <key>CFBundleVersion</key>\n"
133 " <string>" << projectNumber << "</string>\n"
134 " <key>DocSetFeedName</key>\n"
135 " <string>" << feedName << "</string>\n"
136 " <key>DocSetFeedUrl</key>\n"
137 " <string>" << feedURL << "</string>\n"
138 " <key>DocSetPublisherIdentifier</key>\n"
139 " <string>" << publisherId << "</string>\n"
140 " <key>DocSetPublisherName</key>\n"
141 " <string>" << publisherName << "</string>\n"
142
143 " <key>DashDocSetFamily</key>\n"
144 " <string>doxy</string>\n"
145 " <key>DocSetPlatformFamily</key>\n"
146 " <string>doxygen</string>\n"
147 "</dict>\n"
148 "</plist>\n";
149 }
150
151
154 if (!
p->ntf.is_open())
155 {
156 term(
"Could not open file %s for writing\n",
qPrint(notes));
157 }
158 p->nts.setStream(&
p->ntf);
159
160 QCString indexName="index";
161 p->nts <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
162 p->nts <<
"<DocSetNodes version=\"1.0\">\n";
163 p->nts <<
" <TOC>\n";
164 p->nts <<
" <Node>\n";
165 p->nts <<
" <Name>Root</Name>\n";
167 p->nts <<
" <Subnodes>\n";
168 p->indentStack.push(
true);
169
172 if (!
p->ttf.is_open())
173 {
174 term(
"Could not open file %s for writing\n",
qPrint(tokens));
175 }
176 p->tts.setStream(&
p->ttf);
177 p->tts <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
178 p->tts <<
"<Tokens version=\"1.0\">\n";
179}
static QCString htmlFileExtension
#define Config_getString(name)
std::ofstream openOutputStream(const QCString &name, bool append=false)
const char * qPrint(const char *s)