mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
Merge branch 'main' of https://github.com/geode-sdk/geode
This commit is contained in:
commit
6e58a0a721
22 changed files with 160 additions and 65 deletions
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
|
@ -109,6 +109,7 @@ jobs:
|
|||
path: ${{ matrix.config.installer_path }}
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.ref == 'refs/heads/main'
|
||||
|
@ -134,30 +135,36 @@ jobs:
|
|||
mv geode-installer-win/geode-installer-win.exe geode-installer-${{ steps.ref.outputs.hash }}-win.exe
|
||||
|
||||
- name: Zip MacOS Artifacts
|
||||
uses: vimtor/action-zip@v1
|
||||
uses: vimtor/action-zip@v1.1
|
||||
with:
|
||||
files: geode-mac/Geode.dylib geode-mac/GeodeBootstrapper.dylib
|
||||
dest: geode-${{ steps.ref.outputs.hash }}-mac.zip
|
||||
|
||||
- name: Zip Windows Artifacts
|
||||
uses: vimtor/action-zip@v1
|
||||
uses: vimtor/action-zip@v1.1
|
||||
with:
|
||||
files: geode-win/XInput9_1_0.dll geode-win/Geode.dll geode-win/GeodeUpdater.exe geode-win/Geode.lib
|
||||
dest: geode-${{ steps.ref.outputs.hash }}-win.zip
|
||||
|
||||
# TODO change in 2.0.0
|
||||
- name: Zip Resources
|
||||
uses: vimtor/action-zip@v1.1
|
||||
with:
|
||||
files: geode-win/resources
|
||||
dest: resources.zip
|
||||
|
||||
- name: Update Nightly Release
|
||||
uses: andelf/nightly-release@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: nightly
|
||||
name: 'Dev Release'
|
||||
draft: false
|
||||
prerelease: true
|
||||
name: 'Development Release'
|
||||
body: |
|
||||
Geode dev release for commit ${{ github.sha }}. Since this is not a regular release, Geode will not install the resources automatically, so you should use the installer if you want them.
|
||||
Geode development release for commit ${{ github.sha }}. Since this is not a regular release, Geode will not install the resources automatically, so you should use the installer if you want them.
|
||||
files: |
|
||||
./geode-${{ steps.ref.outputs.hash }}-mac.zip
|
||||
./geode-${{ steps.ref.outputs.hash }}-win.zip
|
||||
./geode-installer-${{ steps.ref.outputs.hash }}-mac.pkg
|
||||
./geode-installer-${{ steps.ref.outputs.hash }}-win.exe
|
||||
./geode-${{ steps.ref.outputs.hash }}-mac.zip
|
||||
./geode-${{ steps.ref.outputs.hash }}-win.zip
|
||||
./resources.zip
|
||||
|
|
19
.github/workflows/draft.yml
vendored
19
.github/workflows/draft.yml
vendored
|
@ -5,6 +5,7 @@ on:
|
|||
|
||||
jobs:
|
||||
draft:
|
||||
name: Draft Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Development Release
|
||||
|
@ -23,10 +24,11 @@ jobs:
|
|||
|
||||
- name: Move Files
|
||||
run: |
|
||||
mv dev/geode-installer-*-mac.pkg geode-installer-${{ steps.ref.outputs.version }}-mac.pkg
|
||||
mv dev/geode-installer-*-win.exe geode-installer-${{ steps.ref.outputs.version }}-win.exe
|
||||
mv dev/geode-*-mac.zip geode-${{ steps.ref.outputs.version }}-mac.zip
|
||||
mv dev/geode-*-win.zip geode-${{ steps.ref.outputs.version }}-win.zip
|
||||
mv dev/geode-installer-*-mac.pkg geode-installer-v${{ steps.ref.outputs.version }}-mac.pkg
|
||||
mv dev/geode-installer-*-win.exe geode-installer-v${{ steps.ref.outputs.version }}-win.exe
|
||||
mv dev/geode-*-mac.zip geode-v${{ steps.ref.outputs.version }}-mac.zip
|
||||
mv dev/geode-*-win.zip geode-v${{ steps.ref.outputs.version }}-win.zip
|
||||
mv dev/resources.zip resources.zip
|
||||
|
||||
- name: Create Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
|
@ -42,7 +44,8 @@ jobs:
|
|||
- remove this
|
||||
draft: true
|
||||
files: |
|
||||
./geode-${{ steps.ref.outputs.version }}-mac.zip
|
||||
./geode-${{ steps.ref.outputs.version }}-win.zip
|
||||
./geode-installer-${{ steps.ref.outputs.version }}-mac.pkg
|
||||
./geode-installer-${{ steps.ref.outputs.version }}-win.exe
|
||||
./geode-installer-v${{ steps.ref.outputs.version }}-mac.pkg
|
||||
./geode-installer-v${{ steps.ref.outputs.version }}-win.exe
|
||||
./geode-v${{ steps.ref.outputs.version }}-mac.zip
|
||||
./geode-v${{ steps.ref.outputs.version }}-win.zip
|
||||
./resources.zip
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
# Geode Changelog
|
||||
|
||||
## v1.0.3
|
||||
* Fix mod changelogs only showing Geode's own changelog (29454227)
|
||||
* Fix some filesystem functions for Geode running under wine (7a83354c)
|
||||
* Lazy load the real XInput9 dll, removing the need for an XInput 1.3 (041d44cf)
|
||||
|
||||
## v1.0.2
|
||||
* Fix auto-updating (1f7e6da)
|
||||
|
||||
## v1.0.1
|
||||
* New textures for list tabs (8ce1227)
|
||||
* Switch libraries for SHA3 256 (bbf2608)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.0.1
|
||||
1.0.3
|
||||
|
|
|
@ -7,8 +7,6 @@ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tento průvodce vás provede odi
|
|||
|
||||
; installer
|
||||
|
||||
${LangFileString} GEODE_TEXT_SYSTEM_XINPUT_MISSING "$0 nebyl nalezen. Geode je kompatibilní pouze s Windows 7 a vyšším."
|
||||
|
||||
${LangFileString} GEODE_TEXT_GD_MISSING "$\r$\n$\r$\nV této cestě se nenachází Geometry Dash!"
|
||||
${LangFileString} GEODE_TEXT_MH_ALREADY_INSTALLED "V této cestě je již nainstalován Mega Hack v6/v7!$\r$\nGeode nefunguje s MHv6/v7 (MHv8 ale již kompatibilní bude).$\r$\nProsím, odinstalujte jej, než budete pokračovat."
|
||||
${LangFileString} GEODE_TEXT_MOD_LOADER_ALREADY_INSTALLED "V této cestě je již nainstalován jiný mod loader!$\r$\nGeode s žádným jiným mod loaderem dohromady nefunguje.$\r$\nProsím, odinstalujte jej, než budete pokračovat."
|
||||
|
|
|
@ -11,8 +11,6 @@ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Setup will guide you through the
|
|||
|
||||
; installer
|
||||
|
||||
${LangFileString} GEODE_TEXT_SYSTEM_XINPUT_MISSING "$0 was not found. Geode is only compatible with Windows 7 and newer."
|
||||
|
||||
${LangFileString} GEODE_TEXT_GD_MISSING "$\r$\n$\r$\nThis path does not have Geometry Dash installed!"
|
||||
${LangFileString} GEODE_TEXT_MH_ALREADY_INSTALLED "This path already has Mega Hack v6/v7 installed!$\r$\nGeode doesn't work with MHv6/v7 (MHv8 will be compatible with Geode).$\r$\nPlease, uninstall it before proceeding."
|
||||
${LangFileString} GEODE_TEXT_MOD_LOADER_ALREADY_INSTALLED "This path already has another mod loader installed!$\r$\nGeode doesn't work with any other mod loader.$\r$\nPlease, uninstall it before proceeding."
|
||||
|
|
|
@ -7,8 +7,6 @@ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Saat tarvittavia ohjeita sitä m
|
|||
|
||||
; installer
|
||||
|
||||
${LangFileString} GEODE_TEXT_SYSTEM_XINPUT_MISSING "$0 ei löytynyt asennettuna koneesta. Geode on yhteensopiva ainoastaan Windows 7 ja uudempien versioiden kanssa."
|
||||
|
||||
${LangFileString} GEODE_TEXT_GD_MISSING "$\r$\n$\r$\nValitussa kansiossa ei ole Geometry Dash -peliä asennettuna."
|
||||
${LangFileString} GEODE_TEXT_MH_ALREADY_INSTALLED "Valitussa kansiossa on jo Mega Hack v6/v7 asennettuna.$\r$\nGeode ei ole yhteensopiva MHv6/v7 kanssa (MHv8 on ensimmäinen yhteensopiva versio Geoden kanssa).$\r$\nPoistathan Mega Hackin ennen Geoden asentamista."
|
||||
${LangFileString} GEODE_TEXT_MOD_LOADER_ALREADY_INSTALLED "Valitussa kansiossa on jo joitain modeja asennettuna.$\r$\nGeode ei ole yhteensopiva .DLL-muotoisten modien tai niiden lataajien kanssa.$\r$\nPoistathan .DLL-muotoiset modit ja niiden lataajat ennen Geoden asentamista."
|
||||
|
|
|
@ -7,8 +7,6 @@ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "O instalador guiará você atrav
|
|||
|
||||
; installer
|
||||
|
||||
${LangFileString} GEODE_TEXT_SYSTEM_XINPUT_MISSING "$0 não foi encontrado. Geode só é compatível com Windows 7 pra cima."
|
||||
|
||||
${LangFileString} GEODE_TEXT_GD_MISSING "$\r$\n$\r$\nEsse caminho não tem Geometry Dash instalado!"
|
||||
${LangFileString} GEODE_TEXT_MH_ALREADY_INSTALLED "Esse caminho já tem Mega Hack v6/v7 instalado!$\r$\nGeode não funciona com MHv6/v7 (MHv8 será compatível com Geode).$\r$\nPor favor, desinstale-o antes de proceder."
|
||||
${LangFileString} GEODE_TEXT_MOD_LOADER_ALREADY_INSTALLED "Esse caminho já tem outro mod loader instalado!$\r$\nGeode não funciona com nenhum outro mod loader.$\r$\nPor favor, desinstale-o antes de proceder."
|
||||
|
|
|
@ -7,8 +7,6 @@ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Эта программа уда
|
|||
|
||||
; installer
|
||||
|
||||
${LangFileString} GEODE_TEXT_SYSTEM_XINPUT_MISSING "$0 не найден. Geode совместим только с Windows 7 и выше."
|
||||
|
||||
${LangFileString} GEODE_TEXT_GD_MISSING "$\r$\n$\r$\nПо этому пути не установлен Geometry Dash!"
|
||||
${LangFileString} GEODE_TEXT_MH_ALREADY_INSTALLED "По этому пути уже установлен Mega Hack v6/v7!$\r$\nGeode не работает с MHv6/v7 (MHv8 будет совместим Geode).$\r$\nПожалуйста, удалите его перед продолжением."
|
||||
${LangFileString} GEODE_TEXT_MOD_LOADER_ALREADY_INSTALLED "По этому пути уже установлен другой загрузчик модов!$\r$\nGeode не работает с другими загрузчиками модов.$\r$\nПожалуйста, удалите его перед продолжением."
|
||||
|
|
|
@ -7,8 +7,6 @@ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este asistente te va a guiar dur
|
|||
|
||||
; installer
|
||||
|
||||
${LangFileString} GEODE_TEXT_SYSTEM_XINPUT_MISSING "$0 no se ha podido encontrar. Geode solo es compatible con Windows 7 en adelante"
|
||||
|
||||
${LangFileString} GEODE_TEXT_GD_MISSING "$\r$\n$\r$\n¡Geometry Dash no está instalado en esta ruta!"
|
||||
${LangFileString} GEODE_TEXT_MH_ALREADY_INSTALLED "¡Mega Hack v6/v7 está instalado en esta ruta!$\r$\nGeode no es compatible con MHv6/v7 (MHv8 será compatible con Geode).$\r$\nPor favor, desinstálalo antes de seguir."
|
||||
${LangFileString} GEODE_TEXT_MOD_LOADER_ALREADY_INSTALLED "¡Hay otro mod loader instalado en esta ruta!$\r$\nGeode no funciona con ningún otro mod loader.$\r$\nPor favor, desinstálalo antes de seguir."
|
||||
|
|
|
@ -7,8 +7,6 @@ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este asistente le guiará durant
|
|||
|
||||
; installer
|
||||
|
||||
${LangFileString} GEODE_TEXT_SYSTEM_XINPUT_MISSING "$0 no se encontró. Geode solo es compatible con Windows 7 y versiones más recientes"
|
||||
|
||||
${LangFileString} GEODE_TEXT_GD_MISSING "$\r$\n$\r$\n¡Geometry Dash no está instalado en esta ruta!"
|
||||
${LangFileString} GEODE_TEXT_MH_ALREADY_INSTALLED "¡Mega Hack v6/v7 está instalado en esta ruta!$\r$\nGeode no es compatible con MHv6/v7 (MHv8 será compatible con Geode).$\r$\nPor favor, desinstálelo antes de continuar."
|
||||
${LangFileString} GEODE_TEXT_MOD_LOADER_ALREADY_INSTALLED "¡Hay otro mod loader instalado en esta ruta!$\r$\nGeode no funciona con ningún otro mod loader.$\r$\nPor favor, desinstálelo antes de continuar."
|
||||
|
|
|
@ -7,8 +7,6 @@ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denna guide tar dig igenom avins
|
|||
|
||||
; installer
|
||||
|
||||
${LangFileString} GEODE_TEXT_SYSTEM_XINPUT_MISSING "$0 hittades inte på din dator. Geode är inte kompatibel med Windows 7 och senare."
|
||||
|
||||
${LangFileString} GEODE_TEXT_GD_MISSING "$\r$\n$\r$\nDen valda mappen innehåller ingen installation av Geometry Dash."
|
||||
${LangFileString} GEODE_TEXT_MH_ALREADY_INSTALLED "Den valda mappen innehåller redan Mega Hack v6/v7.$\r$\nGeode är inte kompatibel med MHv6/v7 (MHv8 är den första versionen som är kompatibel med Geode).$\r$\nSe till att avinstallera Mega Hack innan du startar installationen av Geode."
|
||||
${LangFileString} GEODE_TEXT_MOD_LOADER_ALREADY_INSTALLED "Den valda mappen innehåller redan några andra mod.$\r$\nGeode är inte kompatibel med .DLL-slag mod eller sin mod loader.$\r$\nSe till att avinstallera .DLL-slag mod och sin mod loader innan du startar installationen av Geode."
|
||||
|
|
|
@ -251,13 +251,6 @@ FunctionEnd
|
|||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
|
||||
StrCpy $0 "$WINDIR\System32\xinput1_3.dll"
|
||||
IfFileExists $0 findGamePath 0
|
||||
MessageBox MB_ICONSTOP|MB_OK $(GEODE_TEXT_SYSTEM_XINPUT_MISSING)
|
||||
Abort
|
||||
Return
|
||||
|
||||
findGamePath:
|
||||
Call FindGamePath
|
||||
IfErrors 0 +3
|
||||
StrCpy $GamePath ""
|
||||
|
|
|
@ -1,10 +1,49 @@
|
|||
#include <Windows.h>
|
||||
#include <stdio.h>
|
||||
#include <Xinput.h>
|
||||
|
||||
#pragma comment(linker, "/export:XInputGetState=xinput1_3.XInputGetState")
|
||||
#pragma comment(linker, "/export:XInputSetState=xinput1_3.XInputSetState")
|
||||
#pragma comment(linker, "/export:XInputGetCapabilities=xinput1_3.XInputGetCapabilities")
|
||||
#pragma comment(linker, "/export:XInputGetDSoundAudioDeviceGuids=xinput1_3.XInputGetDSoundAudioDeviceGuids")
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 260
|
||||
#endif
|
||||
|
||||
HMODULE xinput = NULL;
|
||||
DWORD(WINAPI* getState)(DWORD, XINPUT_STATE*) = NULL;
|
||||
DWORD(WINAPI* setState)(DWORD, XINPUT_VIBRATION*) = NULL;
|
||||
DWORD(WINAPI* getCapabilities)(DWORD, DWORD, XINPUT_CAPABILITIES*) = NULL;
|
||||
DWORD(WINAPI* getDSoundAudioDeviceGuids)(DWORD, GUID*, GUID*) = NULL;
|
||||
void lazyLoadXInput() {
|
||||
if (xinput)
|
||||
return;
|
||||
char path[MAX_PATH];
|
||||
GetSystemDirectoryA(path, MAX_PATH);
|
||||
strcat_s(path, MAX_PATH, "\\XInput9_1_0.dll");
|
||||
xinput = LoadLibraryA(path);
|
||||
getState = (DWORD(WINAPI*)(DWORD, XINPUT_STATE*))GetProcAddress(xinput, "XInputGetState");
|
||||
setState = (DWORD(WINAPI*)(DWORD, XINPUT_VIBRATION*))GetProcAddress(xinput, "XInputSetState");
|
||||
getCapabilities = (DWORD(WINAPI*)(DWORD, DWORD, XINPUT_CAPABILITIES*))GetProcAddress(xinput, "XInputGetCapabilities");
|
||||
getDSoundAudioDeviceGuids = (DWORD(WINAPI*)(DWORD, GUID*, GUID*))GetProcAddress(xinput, "XInputGetDSoundAudioDeviceGuids");
|
||||
}
|
||||
|
||||
DWORD WINAPI xinputGetState(DWORD dwUserIndex, XINPUT_STATE* pState) {
|
||||
lazyLoadXInput();
|
||||
return getState(dwUserIndex, pState);
|
||||
}
|
||||
DWORD WINAPI xinputSetState(DWORD dwUserIndex, XINPUT_VIBRATION* pVibration) {
|
||||
lazyLoadXInput();
|
||||
return setState(dwUserIndex, pVibration);
|
||||
}
|
||||
DWORD WINAPI xinputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities) {
|
||||
lazyLoadXInput();
|
||||
return getCapabilities(dwUserIndex, dwFlags, pCapabilities);
|
||||
}
|
||||
DWORD WINAPI xinputGetDSoundAudioDeviceGuids(DWORD dwUserIndex, GUID* pDSoundRenderGuid, GUID* pDSoundCaptureGuid) {
|
||||
lazyLoadXInput();
|
||||
return getDSoundAudioDeviceGuids(dwUserIndex, pDSoundRenderGuid, pDSoundCaptureGuid);
|
||||
}
|
||||
|
||||
#pragma comment(linker, "/export:XInputGetState=_xinputGetState@8")
|
||||
#pragma comment(linker, "/export:XInputSetState=_xinputSetState@8")
|
||||
#pragma comment(linker, "/export:XInputGetCapabilities=_xinputGetCapabilities@12")
|
||||
#pragma comment(linker, "/export:XInputGetDSoundAudioDeviceGuids=_xinputGetDSoundAudioDeviceGuids@12")
|
||||
|
||||
__declspec(dllimport) void fake();
|
||||
__declspec(dllexport) void sussy_impostor_sus_red_sus_vote_red_red_was_not_the_impostor() { fake(); }
|
||||
|
|
|
@ -205,9 +205,7 @@ struct CustomMenuLayer : Modify<CustomMenuLayer, MenuLayer> {
|
|||
|
||||
#ifdef GEODE_IS_DESKTOP
|
||||
|
||||
try {
|
||||
ghc::filesystem::create_directories(dirs::getGeodeDir() / "update" / "resources");
|
||||
} catch(...) {}
|
||||
(void) utils::file::createDirectoryAll(dirs::getGeodeDir() / "update" / "resources");
|
||||
|
||||
createQuickPopup(
|
||||
"Missing Textures",
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
#include <hash/hash.hpp>
|
||||
#include <Geode/utils/JsonValidation.hpp>
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
#include <filesystem>
|
||||
#endif
|
||||
|
||||
using namespace geode::prelude;
|
||||
|
||||
// ModInstallEvent
|
||||
|
@ -137,8 +141,13 @@ static Result<> flattenGithubRepo(ghc::filesystem::path const& dir) {
|
|||
// only flatten if there is only one file and it's a directory
|
||||
if (files.size() == 1 && ghc::filesystem::is_directory(files[0])) {
|
||||
for (auto& file : ghc::filesystem::directory_iterator(files[0])) {
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
ghc::filesystem::path const relative = std::filesystem::relative(file.path().wstring(), files[0].wstring()).wstring();
|
||||
#else
|
||||
auto const relative = ghc::filesystem::relative(file, files[0]);
|
||||
#endif
|
||||
ghc::filesystem::rename(
|
||||
file, dir / ghc::filesystem::relative(file, files[0])
|
||||
file, dir / relative
|
||||
);
|
||||
}
|
||||
ghc::filesystem::remove(files[0]);
|
||||
|
|
|
@ -46,12 +46,12 @@ void Loader::Impl::createDirectories() {
|
|||
// try deleting geode/unzipped if it already exists
|
||||
try { ghc::filesystem::remove_all(dirs::getModRuntimeDir()); } catch(...) {}
|
||||
|
||||
ghc::filesystem::create_directories(dirs::getGeodeResourcesDir());
|
||||
ghc::filesystem::create_directory(dirs::getModConfigDir());
|
||||
ghc::filesystem::create_directory(dirs::getModsDir());
|
||||
ghc::filesystem::create_directory(dirs::getGeodeLogDir());
|
||||
ghc::filesystem::create_directory(dirs::getTempDir());
|
||||
ghc::filesystem::create_directory(dirs::getModRuntimeDir());
|
||||
(void) utils::file::createDirectoryAll(dirs::getGeodeResourcesDir());
|
||||
(void) utils::file::createDirectory(dirs::getModConfigDir());
|
||||
(void) utils::file::createDirectory(dirs::getModsDir());
|
||||
(void) utils::file::createDirectory(dirs::getGeodeLogDir());
|
||||
(void) utils::file::createDirectory(dirs::getTempDir());
|
||||
(void) utils::file::createDirectory(dirs::getModRuntimeDir());
|
||||
|
||||
if (!ranges::contains(m_modSearchDirectories, dirs::getModsDir())) {
|
||||
m_modSearchDirectories.push_back(dirs::getModsDir());
|
||||
|
@ -745,9 +745,9 @@ void Loader::Impl::checkForLoaderUpdates() {
|
|||
// find release asset
|
||||
for (auto asset : root.needs("assets").iterate()) {
|
||||
auto obj = asset.obj();
|
||||
if (string::contains(
|
||||
if (string::endsWith(
|
||||
obj.needs("name").template get<std::string>(),
|
||||
GEODE_PLATFORM_SHORT_IDENTIFIER
|
||||
GEODE_PLATFORM_SHORT_IDENTIFIER ".zip"
|
||||
)) {
|
||||
this->downloadLoaderUpdate(
|
||||
obj.needs("browser_download_url").template get<std::string>()
|
||||
|
|
|
@ -34,7 +34,7 @@ Mod::Impl::~Impl() {
|
|||
|
||||
Result<> Mod::Impl::setup() {
|
||||
m_saveDirPath = dirs::getModsSaveDir() / m_info.id();
|
||||
ghc::filesystem::create_directories(m_saveDirPath);
|
||||
(void) utils::file::createDirectoryAll(m_saveDirPath);
|
||||
|
||||
// always create temp dir for all mods, even if disabled, so resources can be loaded
|
||||
GEODE_UNWRAP(this->createTempDir().expect("Unable to create temp dir: {error}"));
|
||||
|
|
|
@ -84,7 +84,37 @@ void earlyError(std::string message) {
|
|||
LoaderImpl::get()->platformMessageBox("Unable to Load Geode!", message);
|
||||
}
|
||||
|
||||
extern "C" __declspec(dllexport) void fake() { }
|
||||
DWORD WINAPI sus(void*) {
|
||||
ShellExecuteA(nullptr, nullptr, "https://media.tenor.com/cW1jA2hYdfcAAAAC/among-us-funny.gif", nullptr, nullptr, SW_SHOW);
|
||||
MessageBoxA(
|
||||
nullptr,
|
||||
"Red sus. Red suuuus. I\r\n"
|
||||
"said red, sus,\r\n"
|
||||
"hahahahahaha. Why\r\n"
|
||||
"arent you laughing? I\r\n"
|
||||
"just made a reference\r\n"
|
||||
"to the popular game\r\n"
|
||||
"\"Among Us\"! How can\r\n"
|
||||
"you not laugh at it?\r\n"
|
||||
"Emergency meeting!\r\n"
|
||||
"Guys, this here guy\r\n"
|
||||
"doesn't laugh at my\r\n"
|
||||
"funny Among Us\r\n"
|
||||
"memes! Let's beat him\r\n"
|
||||
"to death! Dead body\r\n"
|
||||
"reported! Skip! Skip!\r\n"
|
||||
"Vote blue! Blue was\r\n"
|
||||
"not an impostor.\r\n",
|
||||
"AMONG US ACTIVATED REAL !!!!!!!!!",
|
||||
MB_OK
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
extern "C" __declspec(dllexport) void fake() {
|
||||
for (int i = 0; i < 5; i++)
|
||||
CreateThread(nullptr, 0, sus, nullptr, 0, nullptr);
|
||||
}
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID) {
|
||||
if (reason != DLL_PROCESS_ATTACH)
|
||||
return TRUE;
|
||||
|
|
|
@ -224,7 +224,7 @@ void ModInfoPopup::onChangelog(CCObject* sender) {
|
|||
auto winSize = CCDirector::get()->getWinSize();
|
||||
|
||||
if (!m_changelogArea) {
|
||||
m_changelogArea = MDTextArea::create(Mod::get()->getModInfo().changelog().value(), { 350.f, 137.5f });
|
||||
m_changelogArea = MDTextArea::create(this->getModInfo().changelog().value(), { 350.f, 137.5f });
|
||||
m_changelogArea->setPosition(
|
||||
-5000.f, winSize.height / 2 - m_changelogArea->getScaledContentSize().height / 2 - 20.f
|
||||
);
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
#define FTS_FUZZY_MATCH_IMPLEMENTATION
|
||||
#include <Geode/external/fts/fts_fuzzy_match.h>
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
#include <filesystem>
|
||||
#endif
|
||||
|
||||
static ModListType g_tab = ModListType::Installed;
|
||||
static ModListLayer* g_instance = nullptr;
|
||||
|
||||
|
@ -624,7 +628,11 @@ void ModListLayer::onFilters(CCObject*) {
|
|||
}
|
||||
|
||||
void ModListLayer::onOpenFolder(CCObject*) {
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
file::openFolder(std::filesystem::canonical(dirs::getModsDir().wstring()).wstring());
|
||||
#else
|
||||
file::openFolder(ghc::filesystem::canonical(dirs::getModsDir()));
|
||||
#endif
|
||||
}
|
||||
|
||||
void ModListLayer::onResetSearch(CCObject*) {
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
#include <mz_zip.h>
|
||||
#include <internal/FileWatcher.hpp>
|
||||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
#include <filesystem>
|
||||
#endif
|
||||
|
||||
using namespace geode::prelude;
|
||||
using namespace geode::utils::file;
|
||||
|
||||
|
@ -97,7 +101,11 @@ Result<> utils::file::writeBinary(ghc::filesystem::path const& path, ByteVector
|
|||
|
||||
Result<> utils::file::createDirectory(ghc::filesystem::path const& path) {
|
||||
try {
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
std::filesystem::create_directory(path.wstring());
|
||||
#else
|
||||
ghc::filesystem::create_directory(path);
|
||||
#endif
|
||||
return Ok();
|
||||
}
|
||||
catch (...) {
|
||||
|
@ -107,7 +115,11 @@ Result<> utils::file::createDirectory(ghc::filesystem::path const& path) {
|
|||
|
||||
Result<> utils::file::createDirectoryAll(ghc::filesystem::path const& path) {
|
||||
try {
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
std::filesystem::create_directories(path.wstring());
|
||||
#else
|
||||
ghc::filesystem::create_directories(path);
|
||||
#endif
|
||||
return Ok();
|
||||
}
|
||||
catch (...) {
|
||||
|
@ -453,7 +465,11 @@ Result<> Unzip::extractAllTo(Path const& dir) {
|
|||
for (auto& [entry, info] : m_impl->getEntries()) {
|
||||
// make sure zip files like root/../../file.txt don't get extracted to
|
||||
// avoid zip attacks
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
if (!std::filesystem::relative((dir / entry).wstring(), dir.wstring()).empty()) {
|
||||
#else
|
||||
if (!ghc::filesystem::relative(dir / entry, dir).empty()) {
|
||||
#endif
|
||||
if (info.isDirectory) {
|
||||
GEODE_UNWRAP(file::createDirectoryAll(dir / entry));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue