Sorry my bad English. I share my script that automates the signing process of the .nsp created in Unity.
Includes 2 script. Script 1 does the process from the .nsp created by Unity; script 2 does the process from the temporary folder in the project that you made the .nsp. You can edit the language of the script and Edit the title ID with which you used
Needs to:
Add environment variables that lead to the following paths:
- %NINTENDO_SDK_ROOT% = Nintendo Switch SDK path
- %userprofile% = is the user's path. Here it will take your prod.keys in the path "\ .switch\prod.keys". Most programs look for prod.keys and title.keys in this path.
- You also need hacpack.exe. You can insert these scripts next to the executable or put hacpack.exe in an environment variable (patch) of your system
Other paths (Script 1 - Lower):
- NSP_Unpack = .nsp path to unpack
- Output_Unpack = path where the .nsp is unpacked
- %Output_Pack% = folder where the signed .nsp will be packed.
Other paths (Script 2 - Faster):
- %Temp_Unity% = Temporary folder created in the root folder of your project. Inside is the files needed to pack.
- %program% = program folder path (exefs, romfs).
- %Control% = control folder path (logo, etc...)
- Output_Unpack (it should actually say %Output_Pack%) = folder where the signed .nsp will be packed.
- %largefiles% & %smalledfiles% = temporary text files in% temp% of your system where it points to the correct files (control, romfs, exefs, etc ...)
Script 1
- Run it (don't do it in administrator mode or you won't be able to move things to the window). Drag the NSP created by Unity. Press ENTER.
- It will ask you for the folder where the NSP will be unpacked. Press ENTER and wait for it to finish.
- It will ask you for the path of the programs, it contains files such as exefs, romfs and logo. Locate it where the NSP was unpacked. Press ENTER.
- It will ask you for the data folder (control) in it contains the files as the data or headers. Locate it where the NSP was unpacked. Press ENTER.
- In this process, a temporary list will be created to identify the folders.
- It will ask you for the path where the .nsp will be packaged. There you will get the signed .nsp. Press ENTER and wait for it to finish.
- Now you can close the program (All temporary files will be deleted)
Script 2:
- Make sure a path equal to this = "temp \ StagingArea \ SwitchPlayer.nspd \" is found in your Unity project. If you don't successfully create an .nsp in Unity, there will be no files there. Inside there will be a folder "program0.ncd" and "control0.ncd"
- Run it and Enter the temp folder, created in the root of your project, after packaging your .nsp in Unity. Press ENTER.
- In this process, a temporary list will be created to identify the folders.
- Enter the folder where you want to save the NSP. Press ENTER and wait for it to finish.
- Press ENTER to finish