Add macOS to azure pipeline

main/atys-live
Nimetu 3 years ago committed by Nuno
parent 37abc25dcb
commit 7344c98e6e

@ -135,3 +135,30 @@ jobs:
# inputs:
# targetPath: build.release/bin
# artifactName: RyzomUbuntu18Release
- job: macOS11
timeoutInMinutes: 120
pool:
vmImage: 'macOS-11'
steps:
- checkout: self
fetchDepth: 0
- task: Cache@2
inputs:
key: 'hunter317-macOS11-rel"'
path: "$(Pipeline.Workspace)/.hunter/_Base/Cache"
- task: CMake@1
inputs:
workingDirectory: build.release
cmakeArgs: '-GXcode -DCMAKE_CONFIGURATION_TYPES=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_CONFIGURATION_TYPES=Release -DHUNTER_ROOT="$(Pipeline.Workspace)/.hunter" -DWITH_LIBXML2_ICONV=OFF -DFINAL_VERSION=OFF -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_DRIVER_DIRECT3D=OFF -DWITH_DRIVER_XAUDIO2=OFF ..'
- task: Xcode@5
inputs:
actions: 'build'
configuration: Release
sdk: macosx12.0
xcWorkspacePath: 'build.release/RyzomCore.xcodeproj'
scheme: 'ALL_BUILD'
packageApp: false
#- task: PublishPipelineArtifact@1
# inputs:
# targetPath: build.release/bin/
# artifactName: RyzomClientMacOS11Release

@ -96,6 +96,7 @@ public:
_Property = 0;
_oldProperty = 0;
_Type = UNKNOWN;
m_Nullable = false;
_Changed = false;
_LastChangeGC = 0;
}
@ -235,6 +236,9 @@ private:
/// property type
EPropType _Type;
/// nullable
bool m_Nullable;
/// true if this value has changed
bool _Changed;

@ -152,7 +152,7 @@ static NLMISC::TKey virtualKeycodeToNelKey(unsigned short keycode)
return NLMISC::KeyNOKEY;
}
bool CCocoaEventEmitter::pasteTextFromClipboard(ucstring &text)
bool CCocoaEventEmitter::pasteTextFromClipboard(std::string &text)
{
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
NSArray *classArray = [NSArray arrayWithObject:[NSString class]];
@ -163,17 +163,17 @@ bool CCocoaEventEmitter::pasteTextFromClipboard(ucstring &text)
{
NSArray *objectsToPaste = [pasteboard readObjectsForClasses:classArray options:options];
NSString *nstext = [objectsToPaste objectAtIndex:0];
text.fromUtf8([nstext UTF8String]);
text = [nstext UTF8String];
return true;
}
return false;
}
bool CCocoaEventEmitter::copyTextToClipboard(const ucstring &text)
bool CCocoaEventEmitter::copyTextToClipboard(const std::string &text)
{
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
[pasteboard clearContents];
NSArray *copiedObjects = [NSArray arrayWithObject:[NSString stringWithUTF8String:text.toUtf8().c_str()]];
NSArray *copiedObjects = [NSArray arrayWithObject:[NSString stringWithUTF8String:text.c_str()]];
[pasteboard writeObjects:copiedObjects];
return true;
}

@ -21,6 +21,7 @@
#ifndef NL_COCOA_EVENT_EMITTER_H
#define NL_COCOA_EVENT_EMITTER_H
#include <string.h>
#include "nel/misc/event_emitter.h"
#include "nel/misc/event_server.h"
#include "nel/misc/events.h"
@ -53,8 +54,8 @@ public:
virtual void submitEvents(CEventServer& server, bool allWindows);
bool handleQuitRequest();
virtual bool copyTextToClipboard(const ucstring &text);
virtual bool pasteTextFromClipboard(ucstring &text);
virtual bool copyTextToClipboard(const std::string &text);
virtual bool pasteTextFromClipboard(std::string &text);
};
}

@ -51,6 +51,18 @@ namespace NLMISC{
//-----------------------------------------------
void CCDBNodeLeaf::init( xmlNodePtr node, IProgressCallback &/* progressCallBack */, bool /* mapBanks */, CCDBBankHandler * /* bankHandler */ )
{
// Read nullable
CXMLAutoPtr nullable((const char*)xmlGetProp (node, (xmlChar*)"nullable"));
if ((const char *) nullable != NULL)
{
m_Nullable = (nullable.getDatas()[0] == '1');
}
else
{
m_Nullable = false;
}
// Read type
CXMLAutoPtr type((const char*)xmlGetProp (node, (xmlChar*)"type"));
nlassert((const char *) type != NULL);
@ -141,6 +153,13 @@ void CCDBNodeLeaf::readDelta(TGameCycle gc, CBitMemStream & f )
{
// Read the Property Value according to the Property Type.
uint64 recvd = 0;
uint64 isNull = 0;
if (m_Nullable)
{
f.serial(isNull, 1);
}
uint bits;
if (_Type == TEXT)
bits = 32;

Loading…
Cancel
Save