| 158 | } |
| 159 | |
| 160 | const Result CtrlrWindows::getDefaultResources(MemoryBlock& dataToWrite) |
| 161 | { |
| 162 | #ifdef DEBUG_INSTANCE |
| 163 | File temp("c:\\devel\\debug_small.bpanelz"); |
| 164 | |
| 165 | MemoryBlock data; |
| 166 | { |
| 167 | ScopedPointer <FileInputStream> fis (temp.createInputStream()); |
| 168 | fis->readIntoMemoryBlock (data); |
| 169 | } |
| 170 | |
| 171 | ValueTree t = ValueTree::readFromGZIPData(data.getData(), data.getSize()); |
| 172 | |
| 173 | if (t.isValid()) |
| 174 | { |
| 175 | ValueTree r = t.getChildWithName (Ids::resourceExportList); |
| 176 | if (r.isValid()) |
| 177 | { |
| 178 | MemoryOutputStream mos (dataToWrite, false); |
| 179 | { |
| 180 | GZIPCompressorOutputStream gzipOutputStream (&mos); |
| 181 | r.writeToStream(gzipOutputStream); |
| 182 | gzipOutputStream.flush(); |
| 183 | } |
| 184 | return (Result::ok()); |
| 185 | } |
| 186 | } |
| 187 | else |
| 188 | { |
| 189 | return (Result::fail("Windows Native: getDefaultResources got data but couldn't parse it as a compressed ValueTree")); |
| 190 | } |
| 191 | #endif |
| 192 | |
| 193 | return (readResource (nullptr, MAKEINTRESOURCE(CTRLR_INTERNAL_RESOURCES_RESID), RT_RCDATA, dataToWrite)); |
| 194 | } |
| 195 | |
| 196 | const Result CtrlrWindows::getSignature(MemoryBlock &dataToWrite) |
| 197 | { |
nothing calls this directly
no test coverage detected