mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-17 06:18:22 +01:00
Group platform files into their own directory
This commit is contained in:
parent
694bc8eb0f
commit
159d0eb4b7
@ -7,7 +7,7 @@
|
||||
#include "client/SaveFile.h"
|
||||
#include "client/SaveInfo.h"
|
||||
#include "client/http/RequestManager.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "simulation/SaveRenderer.h"
|
||||
#include "common/tpt-rand.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "PowderToySDL.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "common/tpt-rand.h"
|
||||
#include "gui/font/FontEditor.h"
|
||||
#include "gui/interface/Engine.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "gui/interface/Engine.h"
|
||||
#include "client/GameSave.h"
|
||||
#include "simulation/Simulation.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "Config.h"
|
||||
#include "gui/interface/Engine.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include <iostream>
|
||||
|
||||
int desktopWidth = 1280;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "client/SaveFile.h"
|
||||
#include "client/SaveInfo.h"
|
||||
#include "client/UserInfo.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "common/String.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "prefs/Prefs.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "SaveFile.h"
|
||||
#include "GameSave.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
|
||||
SaveFile::SaveFile(SaveFile & save):
|
||||
gameSave(NULL),
|
||||
|
@ -1,60 +1,7 @@
|
||||
common_files += files(
|
||||
'Platform.cpp',
|
||||
'String.cpp',
|
||||
'tpt-rand.cpp',
|
||||
'tpt-thread-local.cpp',
|
||||
)
|
||||
|
||||
can_install_enforce_no = false
|
||||
set_window_icon = false
|
||||
path_sep_char = '/'
|
||||
if host_platform == 'windows'
|
||||
path_sep_char = '\\\\'
|
||||
common_files += files(
|
||||
'PlatformWindows.cpp',
|
||||
)
|
||||
elif host_platform == 'darwin'
|
||||
can_install_enforce_no = true
|
||||
common_files += files(
|
||||
'PlatformDarwin.cpp',
|
||||
'PlatformPosix.cpp',
|
||||
)
|
||||
elif host_platform == 'android'
|
||||
can_install_enforce_no = true
|
||||
common_files += files(
|
||||
'PlatformAndroid.cpp',
|
||||
'PlatformPosix.cpp',
|
||||
)
|
||||
elif host_platform == 'linux'
|
||||
# TODO: again, this is more like "posix" than "linux"
|
||||
set_window_icon = true
|
||||
common_files += files(
|
||||
'PlatformLinux.cpp',
|
||||
'PlatformPosix.cpp',
|
||||
)
|
||||
else
|
||||
can_install_enforce_no = true
|
||||
common_files += files(
|
||||
'PlatformNull.cpp',
|
||||
'PlatformPosix.cpp',
|
||||
)
|
||||
endif
|
||||
conf_data.set('SET_WINDOW_ICON', set_window_icon ? 'true' : 'false')
|
||||
conf_data.set('PATH_SEP_CHAR', path_sep_char)
|
||||
|
||||
can_install = get_option('can_install')
|
||||
if can_install == 'auto'
|
||||
can_install = 'yes_check'
|
||||
if is_debug
|
||||
can_install = 'yes'
|
||||
endif
|
||||
if can_install_enforce_no
|
||||
can_install = 'no'
|
||||
endif
|
||||
endif
|
||||
if can_install != 'no' and can_install_enforce_no
|
||||
error('cannot provide install support, configure with -Dcan_install=no to fix this error')
|
||||
endif
|
||||
conf_data.set('CAN_INSTALL', can_install != 'no' ? 'true' : 'false')
|
||||
conf_data.set('INSTALL_CHECK', can_install == 'yes_check' ? 'true' : 'false')
|
||||
|
||||
subdir('platform')
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "Platform.h"
|
||||
#include "resource.h"
|
||||
#include "tpt-rand.h"
|
||||
#include "common/tpt-rand.h"
|
||||
#include "Config.h"
|
||||
#include <memory>
|
||||
#include <list>
|
56
src/common/platform/meson.build
Normal file
56
src/common/platform/meson.build
Normal file
@ -0,0 +1,56 @@
|
||||
common_files += files(
|
||||
'Common.cpp',
|
||||
)
|
||||
|
||||
can_install_enforce_no = false
|
||||
set_window_icon = false
|
||||
path_sep_char = '/'
|
||||
if host_platform == 'windows'
|
||||
path_sep_char = '\\\\'
|
||||
common_files += files(
|
||||
'Windows.cpp',
|
||||
)
|
||||
elif host_platform == 'darwin'
|
||||
can_install_enforce_no = true
|
||||
common_files += files(
|
||||
'Darwin.cpp',
|
||||
'Posix.cpp',
|
||||
)
|
||||
elif host_platform == 'android'
|
||||
can_install_enforce_no = true
|
||||
common_files += files(
|
||||
'Android.cpp',
|
||||
'Posix.cpp',
|
||||
)
|
||||
elif host_platform == 'linux'
|
||||
# TODO: again, this is more like "posix" than "linux"
|
||||
set_window_icon = true
|
||||
common_files += files(
|
||||
'Linux.cpp',
|
||||
'Posix.cpp',
|
||||
)
|
||||
else
|
||||
can_install_enforce_no = true
|
||||
common_files += files(
|
||||
'Null.cpp',
|
||||
'Posix.cpp',
|
||||
)
|
||||
endif
|
||||
conf_data.set('SET_WINDOW_ICON', set_window_icon ? 'true' : 'false')
|
||||
conf_data.set('PATH_SEP_CHAR', path_sep_char)
|
||||
|
||||
can_install = get_option('can_install')
|
||||
if can_install == 'auto'
|
||||
can_install = 'yes_check'
|
||||
if is_debug
|
||||
can_install = 'yes'
|
||||
endif
|
||||
if can_install_enforce_no
|
||||
can_install = 'no'
|
||||
endif
|
||||
endif
|
||||
if can_install != 'no' and can_install_enforce_no
|
||||
error('cannot provide install support, configure with -Dcan_install=no to fix this error')
|
||||
endif
|
||||
conf_data.set('CAN_INSTALL', can_install != 'no' ? 'true' : 'false')
|
||||
conf_data.set('INSTALL_CHECK', can_install == 'yes_check' ? 'true' : 'false')
|
@ -1,5 +1,5 @@
|
||||
#include "Graphics.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "FontReader.h"
|
||||
#include "resampler/resampler.h"
|
||||
#include "SimulationConfig.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "client/GameSave.h"
|
||||
#include "client/SaveFile.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "gui/Style.h"
|
||||
#include "tasks/Task.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "prefs/GlobalPrefs.h"
|
||||
#include "client/Client.h"
|
||||
#include "client/GameSave.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "debug/DebugInfo.h"
|
||||
#include "debug/DebugLines.h"
|
||||
#include "debug/DebugParts.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "client/GameSave.h"
|
||||
#include "client/SaveFile.h"
|
||||
#include "client/SaveInfo.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Renderer.h"
|
||||
#include "simulation/Air.h"
|
||||
#include "simulation/GOLString.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "client/SaveInfo.h"
|
||||
#include "client/SaveFile.h"
|
||||
#include "client/Client.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "graphics/Renderer.h"
|
||||
#include "gui/Style.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "Engine.h"
|
||||
#include "PowderToySDL.h"
|
||||
#include "Window.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "gui/dialogues/ConfirmPrompt.h"
|
||||
#include <cmath>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "RichLabel.h"
|
||||
#include "Colour.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/FontReader.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "gui/interface/Component.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "Textbox.h"
|
||||
#include "Format.h"
|
||||
#include "PowderToySDL.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/FontReader.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "gui/interface/Engine.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "Format.h"
|
||||
#include "OptionsController.h"
|
||||
#include "OptionsModel.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "graphics/Renderer.h"
|
||||
#include "gui/Style.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "PreviewView.h"
|
||||
#include "client/Client.h"
|
||||
#include "client/SaveInfo.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "gui/dialogues/ErrorMessage.h"
|
||||
#include "gui/dialogues/InformationMessage.h"
|
||||
#include "gui/login/LoginController.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ProfileActivity.h"
|
||||
#include "client/Client.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "gui/Style.h"
|
||||
#include "gui/interface/AvatarButton.h"
|
||||
#include "gui/interface/Button.h"
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "client/Client.h"
|
||||
#include "client/GameSave.h"
|
||||
#include "client/ThumbnailRendererTask.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "gui/Style.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "SearchView.h"
|
||||
|
||||
#include "client/Client.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "tasks/Task.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "client/http/Request.h"
|
||||
#include "prefs/GlobalPrefs.h"
|
||||
#include "client/Client.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "tasks/Task.h"
|
||||
#include "tasks/TaskWindow.h"
|
||||
#include "gui/dialogues/ConfirmPrompt.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "LuaSmartRef.h"
|
||||
#include "PowderToySDL.h"
|
||||
#include "prefs/GlobalPrefs.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "graphics/Renderer.h"
|
||||
#include "simulation/ElementCommon.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "client/GameSave.h"
|
||||
#include "client/SaveFile.h"
|
||||
#include "client/SaveInfo.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "graphics/Renderer.h"
|
||||
#include "simulation/Air.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "Prefs.h"
|
||||
#include "common/Platform.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "common/tpt-rand.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
Loading…
x
Reference in New Issue
Block a user