mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
more GGCP
- move Core sources to platform folder - make sure source files on Mac include DefaultInclude - make sure sources are added in cmake
This commit is contained in:
parent
d4610df914
commit
02efe58724
11 changed files with 23 additions and 16 deletions
|
@ -12,6 +12,7 @@ configure_file(src/internal/about.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/src/interna
|
|||
# Source files
|
||||
file(GLOB SOURCES CONFIGURE_DEPENDS
|
||||
src/cocos2d-ext/*.cpp
|
||||
src/cocos2d-ext/zip/*.cpp
|
||||
src/core/*.cpp
|
||||
src/hooks/*.cpp
|
||||
src/ids/*.cpp
|
||||
|
@ -24,8 +25,6 @@ file(GLOB SOURCES CONFIGURE_DEPENDS
|
|||
src/mac/*.cpp
|
||||
src/main.cpp
|
||||
src/utils/*.cpp
|
||||
src/utils/windows/*.cpp
|
||||
src/utils/zip/*.cpp
|
||||
src/index/*.cpp
|
||||
src/ui/nodes/*.cpp
|
||||
src/ui/internal/*.cpp
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef GEODE_IS_WINDOWS
|
||||
|
||||
#if defined(GEODE_IS_MACOS)
|
||||
#include "MacOS.hpp"
|
||||
#include "../platform/mac/"
|
||||
#elif defined(GEODE_IS_IOS)
|
||||
// #include "iOS.hpp"
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <Geode/platform/platform.hpp>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
#include <Geode/DefaultInclude.hpp>
|
||||
|
||||
#ifdef GEODE_IS_IOS
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "MacOS.hpp"
|
||||
|
||||
#include "Core.hpp"
|
||||
#include "../../core/Core.hpp"
|
||||
|
||||
#include <Geode/DefaultInclude.hpp>
|
||||
|
||||
#ifdef GEODE_IS_MACOS
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Platform.hpp"
|
||||
#include "../../core/Platform.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
#include <Geode/DefaultInclude.hpp>
|
||||
|
||||
#ifdef GEODE_IS_MACOS
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "Windows.hpp"
|
||||
|
||||
#include "Core.hpp"
|
||||
#include "../../core/Core.hpp"
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Platform.hpp"
|
||||
#include "../../core/Platform.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
#include <fs/filesystem.hpp>
|
||||
|
||||
#include <Geode/DefaultInclude.hpp>
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
|
||||
USE_GEODE_NAMESPACE();
|
||||
|
||||
#include "nfdwin.hpp"
|
||||
|
||||
#include <fs/filesystem.hpp>
|
||||
#include <Windows.h>
|
||||
#include <iostream>
|
||||
#include <shlwapi.h>
|
||||
|
|
|
@ -8,21 +8,21 @@
|
|||
USE_GEODE_NAMESPACE();
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
#define THE_SSCANF sscanf_s
|
||||
#define GEODE_SSCANF sscanf_s
|
||||
#else
|
||||
#define THE_SSCANF sscanf
|
||||
#define GEODE_SSCANF sscanf
|
||||
#endif
|
||||
|
||||
VersionInfo::VersionInfo(char const* versionString) {
|
||||
if (!THE_SSCANF(versionString, "v%d.%d.%d", &this->m_major, &this->m_minor, &this->m_patch)) {
|
||||
THE_SSCANF(versionString, "%d.%d.%d", &this->m_major, &this->m_minor, &this->m_patch);
|
||||
if (!GEODE_SSCANF(versionString, "v%d.%d.%d", &this->m_major, &this->m_minor, &this->m_patch)) {
|
||||
GEODE_SSCANF(versionString, "%d.%d.%d", &this->m_major, &this->m_minor, &this->m_patch);
|
||||
}
|
||||
}
|
||||
|
||||
bool VersionInfo::validate(std::string const& string) {
|
||||
int buf0, buf1, buf2;
|
||||
if (THE_SSCANF(string.c_str(), "v%d.%d.%d", &buf0, &buf1, &buf2)) return true;
|
||||
if (THE_SSCANF(string.c_str(), "%d.%d.%d", &buf0, &buf1, &buf2)) return true;
|
||||
if (GEODE_SSCANF(string.c_str(), "v%d.%d.%d", &buf0, &buf1, &buf2)) return true;
|
||||
if (GEODE_SSCANF(string.c_str(), "%d.%d.%d", &buf0, &buf1, &buf2)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue