Skip to content

Commit

Permalink
feat: fix no pch
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleeym committed Nov 25, 2024
1 parent a90c0b4 commit afc0ffd
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")

set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)

project(jukebox VERSION 1.0.0)

file(GLOB SOURCES
Expand All @@ -18,9 +20,12 @@ file(GLOB SOURCES
src/*.cpp
)


add_library(${PROJECT_NAME} SHARED ${SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC include src)

set_property(TARGET ${PROJECT_NAME} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)

if (PROJECT_IS_TOP_LEVEL)
target_compile_definitions(${PROJECT_NAME} PRIVATE FLEYM_JUKEBOX_EXPORTING)
endif()
Expand Down
11 changes: 9 additions & 2 deletions include/nong_serialize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,15 @@ struct matjson::Serialize<jukebox::LocalSong> {
value.dump(matjson::NO_INDENTATION));
}

return geode::Ok(jukebox::LocalSong{std::move(metadata),
value["path"].asString().unwrap()});
std::string path = value["path"].asString().unwrap();

#ifdef GEODE_IS_WINDOWS
std::filesystem::path p = geode::utils::string::utf8ToWide(path);
#else
std::filesystem::path p = path;
#endif

return geode::Ok(jukebox::LocalSong{std::move(metadata), std::move(p)});
}

static matjson::Value toJson(const jukebox::LocalSong& value) {
Expand Down
4 changes: 2 additions & 2 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"geode": "4.0.0",
"version": "3.0.2",
"geode": "4.0.1",
"version": "3.0.2-beta.2",
"id": "fleym.nongd",
"name": "Jukebox",
"gd": {
Expand Down
1 change: 1 addition & 0 deletions src/hooks/level_cell.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <optional>

#include <Geode/modify/LevelCell.hpp>
#include "Geode/binding/GJGameLevel.hpp"
#include "Geode/binding/LevelCell.hpp"
#include "Geode/cocos/base_nodes/CCNode.h"
#include "Geode/cocos/label_nodes/CCLabelBMFont.h"
Expand Down
2 changes: 1 addition & 1 deletion src/ui/index_choose_popup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include "Geode/binding/CCMenuItemSpriteExtra.hpp"
#include "Geode/cocos/CCDirector.h"
#include "Geode/cocos/base_nodes/CCNode.h"
#include "Geode/ui/Layout.hpp"
#include "Geode/cocos/label_nodes/CCLabelBMFont.h"
#include "Geode/cocos/sprite_nodes/CCSprite.h"
#include "Geode/ui/Layout.hpp"

#include <fmod_common.h>
#include <fmt/core.h>
Expand Down
1 change: 1 addition & 0 deletions src/ui/index_choose_popup.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include "Geode/cocos/label_nodes/CCLabelBMFont.h"
#include "Geode/ui/Popup.hpp"

using namespace geode::prelude;

Expand Down
1 change: 0 additions & 1 deletion src/ui/indexes_popup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "Geode/cocos/base_nodes/CCNode.h"
#include "Geode/ui/Layout.hpp"
#include "Geode/cocos/sprite_nodes/CCSprite.h"
#include "Geode/loader/Log.hpp"
#include "Geode/ui/Popup.hpp"

#include "index.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ui/indexes_popup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <functional>

#include "Geode/cocos/cocoa/CCObject.h"
#include "Geode/ui/Popup.hpp"
#include "Geode/ui/ScrollLayer.hpp"

#include "index.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ui/indexes_setting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <matjson.hpp>
#include "Geode/Result.hpp"
#include "Geode/binding/ButtonSprite.hpp"
#include "Geode/binding/CCMenuItemSpriteExtra.hpp"
#include "Geode/cocos/cocoa/CCObject.h"
#include "Geode/cocos/platform/CCPlatformMacros.h"
Expand Down
2 changes: 2 additions & 0 deletions src/ui/list/index_cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

#include <fmt/format.h>
#include "Geode/binding/CCMenuItemSpriteExtra.hpp"
#include "Geode/binding/CCMenuItemToggler.hpp"
#include "Geode/cocos/base_nodes/CCNode.h"
#include "Geode/ui/Layout.hpp"
#include "Geode/cocos/cocoa/CCGeometry.h"
#include "Geode/cocos/cocoa/CCObject.h"
#include "Geode/cocos/sprite_nodes/CCSprite.h"

#include "Geode/ui/TextInput.hpp"
#include "index.hpp"

namespace jukebox {
Expand Down
1 change: 1 addition & 0 deletions src/ui/list/index_cell.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <functional>

#include "Geode/binding/CCMenuItemToggler.hpp"
#include "Geode/cocos/base_nodes/CCNode.h"
#include "Geode/cocos/cocoa/CCObject.h"

Expand Down
2 changes: 2 additions & 0 deletions src/ui/list/song_cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#include <ccTypes.h>
#include <fmt/format.h>
#include "GUI/CCControlExtension/CCScale9Sprite.h"
#include "Geode/binding/CCMenuItemSpriteExtra.hpp"
#include "Geode/cocos/label_nodes/CCLabelBMFont.h"
#include "Geode/ui/Layout.hpp"

namespace jukebox {

Expand Down

0 comments on commit afc0ffd

Please sign in to comment.