mirror of
https://github.com/eliboa/TegraRcmGUI.git
synced 2024-11-28 05:02:06 +00:00
Cleaning
Made a consolidated output path style that seems reasonable, and ignored it from SCM. Thought the project should build in release mode and found it was over-customized in debug mode. Also had to fix some random security errors. Made the build configurations more consistent, and also simplified them, opting now to only enable the env var method that is more flexible and may have been added automatically by the IDE as a successful recommendation. Simplified README accordingly.
This commit is contained in:
parent
5c37ceaa97
commit
6c0fb778f4
5 changed files with 22 additions and 24 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
|||
.vs
|
||||
x64
|
||||
Output
|
|
@ -39,10 +39,7 @@ Please open new [issue](https://github.com/eliboa/TegraRcmGUI/issues) to report
|
|||
|
||||
## Development
|
||||
|
||||
Install the [libusbk dev kit](https://sourceforge.net/projects/libusbk/) using the setup program.
|
||||
If not installed in the default `C:\libusbK-dev-kit` location, then create an encironment variable with the other path as the value.
|
||||
The project seems to survive a target upgrade from the tools in Visual Studio 2017 to 2019.
|
||||
Make sure with the library's include files path correct, the actual library name still exists in the Project Settings/Properties > Linker > Input > Additional Dependencies list as `libusbK.lib`.
|
||||
Install the [libusbk dev kit](https://sourceforge.net/projects/libusbk/) using the setup program, then create an environment variable `LIBUSBK_DIR` with the installation path as the value.
|
||||
|
||||
## How to backup/restore your Nintendo Switch's NAND ?
|
||||
|
||||
|
|
|
@ -144,16 +144,16 @@ void DialogTab02::OnBnClickedMountSd()
|
|||
switch (pmyComboBox->GetCurSel())
|
||||
{
|
||||
case 0:
|
||||
_tcscpy(args, TEXT(".\\tools\\memloader\\memloader_usb.bin -r --dataini=.\\tools\\memloader\\ums_boot0.ini"));
|
||||
_tcscpy_s(args, 255, TEXT(".\\tools\\memloader\\memloader_usb.bin -r --dataini=.\\tools\\memloader\\ums_boot0.ini"));
|
||||
break;
|
||||
case 1:
|
||||
_tcscpy(args, TEXT(".\\tools\\memloader\\memloader_usb.bin -r --dataini=.\\tools\\memloader\\ums_boot1.ini"));
|
||||
_tcscpy_s(args, 255, TEXT(".\\tools\\memloader\\memloader_usb.bin -r --dataini=.\\tools\\memloader\\ums_boot1.ini"));
|
||||
break;
|
||||
case 2:
|
||||
_tcscpy(args, TEXT(".\\tools\\memloader\\memloader_usb.bin -r --dataini=.\\tools\\memloader\\ums_emmc.ini"));
|
||||
_tcscpy_s(args, 255, TEXT(".\\tools\\memloader\\memloader_usb.bin -r --dataini=.\\tools\\memloader\\ums_emmc.ini"));
|
||||
break;
|
||||
default:
|
||||
_tcscpy(args, TEXT(".\\tools\\memloader\\memloader_usb.bin -r --dataini=.\\tools\\memloader\\ums_sd.ini"));
|
||||
_tcscpy_s(args, 255, TEXT(".\\tools\\memloader\\memloader_usb.bin -r --dataini=.\\tools\\memloader\\ums_sd.ini"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -869,10 +869,9 @@ int TegraRcm::Smasher(TCHAR args[4096], BOOL bInheritHandles)
|
|||
CString csPath2(csPath);
|
||||
csPath.Append(TEXT(".\\TegraRcmSmash.exe "));
|
||||
TCHAR cmd[4096];
|
||||
_tcscpy_s(cmd, csPath);
|
||||
_tcscpy_s(cmd, 4095, csPath);
|
||||
lstrcat(cmd, args);
|
||||
|
||||
|
||||
SECURITY_ATTRIBUTES sa;
|
||||
sa.nLength = sizeof(sa);
|
||||
sa.lpSecurityDescriptor = NULL;
|
||||
|
@ -1126,7 +1125,7 @@ char* TegraRcm::GetRelativeFilename(char *currentDirectory, char *absoluteFilena
|
|||
if (currentDirectory[0] != absoluteFilename[0])
|
||||
{
|
||||
// not on the same drive, so only absolute filename will do
|
||||
strcpy(relativeFilename, absoluteFilename);
|
||||
strcpy_s(relativeFilename, MAX_FILENAME_LEN, absoluteFilename);
|
||||
return relativeFilename;
|
||||
}
|
||||
// they are on the same drive, find out how much of the current directory
|
||||
|
@ -1147,7 +1146,7 @@ char* TegraRcm::GetRelativeFilename(char *currentDirectory, char *absoluteFilena
|
|||
// file name should not have a leading one...
|
||||
i++;
|
||||
}
|
||||
strcpy(relativeFilename, &absoluteFilename[i]);
|
||||
strcpy_s(relativeFilename, MAX_FILENAME_LEN, &absoluteFilename[i]);
|
||||
return relativeFilename;
|
||||
}
|
||||
// The file is not in a child directory of the current directory, so we
|
||||
|
@ -1192,6 +1191,6 @@ char* TegraRcm::GetRelativeFilename(char *currentDirectory, char *absoluteFilena
|
|||
relativeFilename[rfMarker++] = SLASH;
|
||||
}
|
||||
// copy the rest of the filename into the result string
|
||||
strcpy(&relativeFilename[rfMarker], &absoluteFilename[afMarker]);
|
||||
strcpy_s(&relativeFilename[rfMarker], MAX_FILENAME_LEN, &absoluteFilename[afMarker]);
|
||||
return relativeFilename;
|
||||
}
|
|
@ -78,12 +78,15 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)\Output\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>Output\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)\Output\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>Output\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -92,13 +95,13 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\libusbK-dev-kit\includes;$(LIBUSBK_DIR)\includes\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(LIBUSBK_DIR)\includes\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Version.lib;libusbK.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>C:\libusbK-dev-kit\bin\lib\x86;$(LIBUSBK_DIR)\bin\lib\$(PlatformShortName.Replace('x64','amd64'))\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Version.lib;libusbK.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(LIBUSBK_DIR)\bin\lib\$(PlatformShortName.Replace('x64','amd64'))\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Link>
|
||||
<Midl>
|
||||
|
@ -119,14 +122,13 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\libusbK-dev-kit\includes\;$(LIBUSBK_DIR)\includes\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(LIBUSBK_DIR)\includes\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>C:\libusbK-dev-kit\bin\lib\amd64\;$(LIBUSBK_DIR)\bin\lib\$(PlatformShortName.Replace('x64','amd64'))\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libusbK.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(LIBUSBK_DIR)\bin\lib\$(PlatformShortName.Replace('x64','amd64'))\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Version.lib;libusbK.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Midl>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
|
@ -148,14 +150,14 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\libusbK-dev-kit\includes;$(LIBUSBK_DIR)\includes\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(LIBUSBK_DIR)\includes\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\libusbK-dev-kit\bin\lib\x86;$(LIBUSBK_DIR)\bin\lib\$(PlatformShortName.Replace('x64','amd64'))\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(LIBUSBK_DIR)\bin\lib\$(PlatformShortName.Replace('x64','amd64'))\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Version.lib;libusbK.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
|
||||
<EnableUAC>true</EnableUAC>
|
||||
|
|
Loading…
Reference in a new issue