-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: redo installer to clean up code & make it simpler
- Loading branch information
Showing
6 changed files
with
1,288 additions
and
1,731 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
Preloader/Priiloader Installer - An installation utiltiy for preloader (c) 2008-2020 crediar | ||
Copyright (c) 2020 DacoTaco | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public License | ||
as published by the Free Software Foundation; either version 2 | ||
of the License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#ifndef ALIGN32 | ||
#define ALIGN32(x) (((x) + 31) & ~31) | ||
#endif | ||
|
||
#include <gctypes.h> | ||
|
||
enum InstallerAction { | ||
None = 0, | ||
Install = 1, | ||
Update = 2, | ||
Remove = 3, | ||
}; | ||
|
||
void InitializeInstaller(u64 titleId, bool isvWii); | ||
bool PriiloaderInstalled(void); | ||
void DeletePriiloaderFiles(InstallerAction action); | ||
s32 RemovePriiloader(void); | ||
s32 WritePriiloader(InstallerAction action); | ||
s32 CopyTicket(void); | ||
s32 PatchTMD(InstallerAction action); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
Preloader/Priiloader Installer - An installation utiltiy for preloader (c) 2008-2020 crediar | ||
Copyright (c) 2024 DacoTaco | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public License | ||
as published by the Free Software Foundation; either version 2 | ||
of the License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <gctypes.h> | ||
#include <string> | ||
|
||
enum NandActionErrors | ||
{ | ||
InvalidArgument = -80, | ||
MemoryAllocation = -81, | ||
HashCalculation = -82, | ||
HashComparison = -83, | ||
RenameFailure = -84, | ||
}; | ||
|
||
typedef struct | ||
{ | ||
u32 owner; | ||
u16 group; | ||
u8 attributes; | ||
u8 ownerperm; | ||
u8 groupperm; | ||
u8 otherperm; | ||
} NandPermissions; | ||
|
||
s32 NandWrite(const std::string destination, const void* data, u32 dataSize, NandPermissions destPermissions); | ||
s32 NandCopy(const std::string source, const std::string destination, NandPermissions srcPermissions); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
Preloader/Priiloader Installer - An installation utiltiy for preloader (c) 2008-2020 crediar | ||
Copyright (c) 2020 DacoTaco | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public License | ||
as published by the Free Software Foundation; either version 2 | ||
of the License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define TITLE_UPPER(x) (u32)(x >> 32) | ||
#define TITLE_LOWER(x) (u32)(x & 0xFFFFFFFF) |
Oops, something went wrong.