Skip to content

Commit

Permalink
yea no win bindings is bad
Browse files Browse the repository at this point in the history
hi android
  • Loading branch information
user95401 committed Jun 15, 2024
1 parent 4063e1e commit 815b49e
Show file tree
Hide file tree
Showing 54 changed files with 39 additions and 112,938 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ add_compile_definitions(GEODE_EXPOSE_SECRET_INTERNALS_IN_HEADERS_DO_NOT_DEFINE_P
cmake_minimum_required(VERSION 3.21)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(GEODE_BINDINGS_REPO_PATH "${CMAKE_CURRENT_LIST_DIR}/bindings")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")

project(MainMod)

Expand Down
12 changes: 12 additions & 0 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ]
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
}
10 changes: 5 additions & 5 deletions _Src/_ModCfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ using namespace geode::prelude;
void CopyConfigFromUnzipped() {
auto game_dir = Mod::get()->getTempDir() / "config" / ""; //from_game_dir
auto save_dir = Mod::get()->getConfigDir(); //from_game_dir
if (!ghc::filesystem::exists(game_dir)) return;
//if (!ghc::filesystem::exists(save_dir)) return;
ghc::filesystem::copy(
if (!std::filesystem::exists(game_dir)) return;
//if (!std::filesystem::exists(save_dir)) return;
std::filesystem::copy(
game_dir, //from game dir
save_dir, //to game save dir
ghc::filesystem::copy_options::overwrite_existing |
ghc::filesystem::copy_options::recursive
std::filesystem::copy_options::overwrite_existing |
std::filesystem::copy_options::recursive
);
};

Expand Down
80 changes: 0 additions & 80 deletions _Src/_RepoSync.cpp

This file was deleted.

16 changes: 8 additions & 8 deletions _Src/_YourLocalCfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ using namespace geode::prelude;
void CopyFromLocal() {
auto game_dir = Mod::get()->getConfigDir() / "settings.json"; //from_game_dir
auto save_dir = Mod::get()->getSaveDir() / "settings.json"; //from_game_dir
if (!ghc::filesystem::exists(game_dir)) return;
//if (!ghc::filesystem::exists(save_dir)) return;
ghc::filesystem::copy(
if (!std::filesystem::exists(game_dir)) return;
//if (!std::filesystem::exists(save_dir)) return;
std::filesystem::copy(
game_dir, //from game dir
save_dir, //to game save dir
ghc::filesystem::copy_options::overwrite_existing);
std::filesystem::copy_options::overwrite_existing);
};

void CopyFromData() {
auto game_dir = Mod::get()->getConfigDir() / "settings.json"; //from_game_dir
auto save_dir = Mod::get()->getSaveDir() / "settings.json"; //from_game_dir
//if (!ghc::filesystem::exists(game_dir)) return;
if (!ghc::filesystem::exists(save_dir)) return;
ghc::filesystem::copy(
//if (!std::filesystem::exists(game_dir)) return;
if (!std::filesystem::exists(save_dir)) return;
std::filesystem::copy(
save_dir, //to game save dir
game_dir, //from game dir
ghc::filesystem::copy_options::overwrite_existing);
std::filesystem::copy_options::overwrite_existing);
};

$on_mod(Loaded) {
Expand Down
10 changes: 5 additions & 5 deletions _Src/_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ using namespace geode::prelude;
std::string FilePathFromModFolder(std::string fname) {//they force me
auto sFullPath = Mod::get()->getConfigDir(true).string();
#ifdef GEODE_IS_WINDOWS
auto sCurrPath = ghc::filesystem::current_path().string();
auto sCurrPath = std::filesystem::current_path().string();
auto sRelPath = sFullPath.erase(0, sCurrPath.size() + 1);//sucks
ghc::filesystem::path path = (sRelPath + "//" + fname);
ghc::filesystem::create_directories(path.parent_path());
std::filesystem::path path = (sRelPath + "//" + fname);
std::filesystem::create_directories(path.parent_path());
#else
ghc::filesystem::path path = (sFullPath + "//" + fname);
std::filesystem::path path = (sFullPath + "//" + fname);
#endif
ghc::filesystem::create_directories(path.parent_path());
std::filesystem::create_directories(path.parent_path());
auto rtn = path.string();
//std::replace(rtn.begin(), rtn.end(), '\\', '/'); // replace all '\' to '/' ;3
if(rtn.find("\\_") != std::string::npos) rtn.insert(rtn.find("\\_"), "\\"); // fun thing (MDLNK)
Expand Down
6 changes: 3 additions & 3 deletions _Src/controllers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ class $modify(LevelSelectLayerExd, LevelSelectLayer) {
}
//setup nodes
if (pBackgroundSprite) {
auto BG_SPRITE_NAME = Mod::get()->getSettingValue<ghc::filesystem::path>("BG_SPRITE_NAME").filename();
auto BG_SPRITE_NAME = Mod::get()->getSettingValue<std::filesystem::path>("BG_SPRITE_NAME").filename();
auto filename = BG_SPRITE_NAME.string();
pBackgroundSprite->initWithFile(filename.c_str());
pBackgroundSprite->setPosition(CCPointZero);
pBackgroundSprite->setScale(CCDirector::get()->getScreenRight() / pBackgroundSprite->getContentSize().width);
listenForSettingChanges("BG_SPRITE_NAME", +[](ghc::filesystem::path value) {
value = ghc::filesystem::path(value).filename();
listenForSettingChanges("BG_SPRITE_NAME", +[](std::filesystem::path value) {
value = std::filesystem::path(value).filename();
if (CCDirector::get()->m_pRunningScene->getChildByTag(6481)) return;
auto pop = geode::createQuickPopup(
"BG_SPRITE_NAME",
Expand Down
2 changes: 1 addition & 1 deletion _Src/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class MainLevelsEditorLayer : public CCLayer {
//hi
auto ntfy = Notification::create("Removed!");
ntfy->setIcon(NotificationIcon::Warning);
if (not ghc::filesystem::remove_all(FilePathFromModFolder(""))) ntfy->setString("Failed to remove!");
if (not std::filesystem::remove_all(FilePathFromModFolder(""))) ntfy->setString("Failed to remove!");
ntfy->show();
});
pop->m_buttonMenu->addChild(someInput);
Expand Down
127 changes: 0 additions & 127 deletions bindings/.github/workflows/build.yml

This file was deleted.

Loading

0 comments on commit 815b49e

Please sign in to comment.