Fix small build break found on Mac
This commit is contained in:
Родитель
2446059951
Коммит
89fa6a2d68
|
@ -187,7 +187,7 @@ int ParseAndRun(std::map<std::string, Command>& commands, State& state, int argc
|
|||
auto option = command->second.Options.find(argv[index]);
|
||||
while (option != command->second.Options.end())
|
||||
{
|
||||
char* parameter = "";
|
||||
char const *parameter = "";
|
||||
if (option->second.TakesParameter)
|
||||
{
|
||||
if (++index == argc) { break; }
|
||||
|
@ -208,6 +208,7 @@ int ParseAndRun(std::map<std::string, Command>& commands, State& state, int argc
|
|||
|
||||
switch (state.specified)
|
||||
{
|
||||
case UserSpecified::Help:
|
||||
case UserSpecified::Nothing:
|
||||
return Help(argv[0], commands, state);
|
||||
case UserSpecified::Pack:
|
||||
|
|
|
@ -16,16 +16,16 @@ namespace xPlat {
|
|||
{
|
||||
public:
|
||||
// TODO: Implement actual XML validation....
|
||||
XmlObject(std::shared_ptr<StreamBase>& stream) : m_stream(stream) {}
|
||||
XmlObject(std::shared_ptr<StreamBase> stream) : m_stream(stream) {}
|
||||
|
||||
// StreamBase interface is largely pass through.
|
||||
// XML de-serialization happens during construction, of this object.
|
||||
// XML serialization happens through
|
||||
virtual void Write(std::size_t size, const std::uint8_t* bytes) { throw Exception(Error::NotSupported); }
|
||||
virtual std::size_t Read(std::size_t size, const std::uint8_t* bytes) { return m_stream->Read(size, bytes); }
|
||||
virtual void Seek(std::uint64_t offset, Reference where) { m_stream->Seek(offset,where); }
|
||||
virtual int Ferror() { return m_stream->Ferror(); }
|
||||
virtual bool Feof() { return m_stream->Feof(); }
|
||||
virtual void Write(std::size_t size, const std::uint8_t* bytes) { throw Exception(Error::NotSupported); }
|
||||
virtual std::size_t Read(std::size_t size, const std::uint8_t* bytes) { return m_stream->Read(size, bytes); }
|
||||
virtual void Seek(std::uint64_t offset, Reference where) { m_stream->Seek(offset,where); }
|
||||
virtual int Ferror() { return m_stream->Ferror(); }
|
||||
virtual bool Feof() { return m_stream->Feof(); }
|
||||
virtual std::uint64_t Ftell() { return m_stream->Ftell(); }
|
||||
|
||||
// Returns a shared pointer to the DOMDocument representing the contents of this stream
|
||||
|
|
|
@ -55,24 +55,24 @@ namespace xPlat {
|
|||
// 1. Get the appx signature from the container and parse it
|
||||
// TODO: pass validation flags and other necessary goodness through.
|
||||
m_appxSignature = std::make_unique<AppxSignatureObject>(m_container->GetFile(APPXSIGNATURE_P7X));
|
||||
ThrowErrorIfNot(Error::AppxMissingSignatureP7X, (m_appxSignature != nullptr), "AppxSignature.p7x not in archive!");
|
||||
ThrowErrorIf(Error::AppxMissingSignatureP7X, (m_appxSignature == nullptr), "AppxSignature.p7x not in archive!");
|
||||
|
||||
// 2. Get content type using signature object for validation
|
||||
// TODO: switch underlying type of m_contentType to something more specific.
|
||||
m_contentType = std::make_unique<XmlObject>(m_appxSignature->GetValidationStream(
|
||||
CONTENT_TYPES_XML, m_container->GetFile(CONTENT_TYPES_XML)));
|
||||
ThrowErrorIfNot(Error::AppxMissingContentTypesXML, (m_contentType != nullptr), "[Content_Types].xml not in archive!");
|
||||
ThrowErrorIf(Error::AppxMissingContentTypesXML, (m_contentType == nullptr), "[Content_Types].xml not in archive!");
|
||||
|
||||
// 3. Get blockmap object using signature object for validation
|
||||
m_appxBlockMap = std::make_unique<AppxBlockMapObject>(m_appxSignature->GetValidationStream(
|
||||
APPXBLOCKMAP_XML, m_container->GetFile(APPXBLOCKMAP_XML)));
|
||||
ThrowErrorIfNot(Error::AppxMissingBlockMapXML, (m_appxBlockMap != nullptr), "AppxBlockMap.xml not in archive!");
|
||||
ThrowErrorIf(Error::AppxMissingBlockMapXML, (m_appxBlockMap == nullptr), "AppxBlockMap.xml not in archive!");
|
||||
|
||||
// 4. Get manifest object using blockmap object for validation
|
||||
// TODO: pass validation flags and other necessary goodness through.
|
||||
m_appxManifest = std::make_unique<AppxManifestObject>(m_appxBlockMap->ValidationStream(
|
||||
APPXMANIFEST_XML, m_container->GetFile(APPXMANIFEST_XML)));
|
||||
ThrowErrorIfNot(Error::AppxMissingAppxManifestXML, (m_appxBlockMap != nullptr), "AppxManifest.xml not in archive!");
|
||||
ThrowErrorIf(Error::AppxMissingAppxManifestXML, (m_appxBlockMap == nullptr), "AppxManifest.xml not in archive!");
|
||||
|
||||
std::map<std::string, bool> footPrintFileNames = {
|
||||
{ APPXBLOCKMAP_XML, false },
|
||||
|
|
Загрузка…
Ссылка в новой задаче