mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Merge pull request #2060 from heinrich5991/pr_mac_ci
Add Travis CI for macOS builds
This commit is contained in:
commit
bde59d73de
18
.travis.yml
Normal file
18
.travis.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
os: osx
|
||||||
|
script:
|
||||||
|
- brew install sdl2
|
||||||
|
- mkdir build; cd build
|
||||||
|
- cmake -Werror=dev -DDOWNLOAD_GTEST=ON ..
|
||||||
|
- make everything
|
||||||
|
- make run_tests
|
||||||
|
- make package_default
|
||||||
|
- cd ..
|
||||||
|
- mkdir build_debug; cd build_debug
|
||||||
|
- cmake -Werror=dev -DDOWNLOAD_GTEST=ON -DDEV=ON ..
|
||||||
|
- make run_tests
|
||||||
|
- cd ..
|
||||||
|
- build/teeworlds_srv shutdown
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- CFLAGS="-Wdeclaration-after-statement -Werror"
|
||||||
|
- CXXFLAGS="-Werror"
|
|
@ -51,8 +51,8 @@ struct CVoice
|
||||||
int m_X, m_Y;
|
int m_X, m_Y;
|
||||||
};
|
};
|
||||||
|
|
||||||
static CSample m_aSamples[NUM_SAMPLES] = {0};
|
static CSample m_aSamples[NUM_SAMPLES] = {{0}};
|
||||||
static CVoice m_aVoices[NUM_VOICES] = {0};
|
static CVoice m_aVoices[NUM_VOICES] = {{0}};
|
||||||
static CChannel m_aChannels[NUM_CHANNELS];
|
static CChannel m_aChannels[NUM_CHANNELS];
|
||||||
|
|
||||||
static LOCK m_SoundLock = 0;
|
static LOCK m_SoundLock = 0;
|
||||||
|
|
|
@ -32,9 +32,9 @@ CMenus::CColumn CMenus::ms_aBrowserCols[] = { // Localize("Server"); Localize("
|
||||||
{COL_BROWSER_PING, IServerBrowser::SORT_PING, "Ping", 1, 40.0f, 0, {0}, {0}, CUI::ALIGN_CENTER},
|
{COL_BROWSER_PING, IServerBrowser::SORT_PING, "Ping", 1, 40.0f, 0, {0}, {0}, CUI::ALIGN_CENTER},
|
||||||
};
|
};
|
||||||
|
|
||||||
CServerFilterInfo CMenus::CBrowserFilter::ms_FilterStandard = {IServerBrowser::FILTER_COMPAT_VERSION|IServerBrowser::FILTER_PURE|IServerBrowser::FILTER_PURE_MAP, 999, -1, 0, {0}, 0};
|
CServerFilterInfo CMenus::CBrowserFilter::ms_FilterStandard = {IServerBrowser::FILTER_COMPAT_VERSION|IServerBrowser::FILTER_PURE|IServerBrowser::FILTER_PURE_MAP, 999, -1, 0, {{0}}, {0}};
|
||||||
CServerFilterInfo CMenus::CBrowserFilter::ms_FilterFavorites = {IServerBrowser::FILTER_COMPAT_VERSION|IServerBrowser::FILTER_FAVORITE, 999, -1, 0, {0}, 0};
|
CServerFilterInfo CMenus::CBrowserFilter::ms_FilterFavorites = {IServerBrowser::FILTER_COMPAT_VERSION|IServerBrowser::FILTER_FAVORITE, 999, -1, 0, {{0}}, {0}};
|
||||||
CServerFilterInfo CMenus::CBrowserFilter::ms_FilterAll = {IServerBrowser::FILTER_COMPAT_VERSION, 999, -1, 0, {0}, 0};
|
CServerFilterInfo CMenus::CBrowserFilter::ms_FilterAll = {IServerBrowser::FILTER_COMPAT_VERSION, 999, -1, 0, {{0}}, {0}};
|
||||||
|
|
||||||
|
|
||||||
// filters
|
// filters
|
||||||
|
|
|
@ -53,7 +53,7 @@ void CMenus::RenderGame(CUIRect MainView)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char aBuf[128];
|
char aBuf[128];
|
||||||
CSwitchTeamInfo Info = { 0 };
|
CSwitchTeamInfo Info = {{0}};
|
||||||
GetSwitchTeamInfo(&Info);
|
GetSwitchTeamInfo(&Info);
|
||||||
CUIRect Button, ButtonRow, Label;
|
CUIRect Button, ButtonRow, Label;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation ServerView
|
@implementation ServerView
|
||||||
- (void)listenTo: (NSTask*)t;
|
- (void)listenTo: (NSTask *)t
|
||||||
{
|
{
|
||||||
NSPipe *pipe;
|
NSPipe *pipe;
|
||||||
task = t;
|
task = t;
|
||||||
|
@ -58,14 +58,10 @@ void runServer()
|
||||||
NSOpenPanel *openDlg = [NSOpenPanel openPanel];
|
NSOpenPanel *openDlg = [NSOpenPanel openPanel];
|
||||||
[openDlg setCanChooseFiles:YES];
|
[openDlg setCanChooseFiles:YES];
|
||||||
|
|
||||||
if([openDlg runModalForDirectory:nil file:nil] != NSOKButton)
|
if([openDlg runModal] != NSOKButton)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NSArray* filenames = [openDlg filenames];
|
NSString *filename = [[openDlg URL] path];
|
||||||
if([filenames count] != 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
NSString* filename = [filenames objectAtIndex: 0];
|
|
||||||
NSArray *arguments = [NSArray arrayWithObjects: @"-f", filename, nil];
|
NSArray *arguments = [NSArray arrayWithObjects: @"-f", filename, nil];
|
||||||
|
|
||||||
// run server
|
// run server
|
||||||
|
|
Loading…
Reference in a new issue