Skip to content

Commit

Permalink
Leave the beta phase
Browse files Browse the repository at this point in the history
  • Loading branch information
phacoxcll authored Oct 16, 2019
1 parent efcdf3b commit 3e21d63
Show file tree
Hide file tree
Showing 11 changed files with 186 additions and 35 deletions.
30 changes: 30 additions & 0 deletions 64Inject/64Inject.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.6\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.6\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props')" />
<Import Project="..\packages\Microsoft.NetFramework.Analyzers.2.9.6\build\Microsoft.NetFramework.Analyzers.props" Condition="Exists('..\packages\Microsoft.NetFramework.Analyzers.2.9.6\build\Microsoft.NetFramework.Analyzers.props')" />
<Import Project="..\packages\Microsoft.NetCore.Analyzers.2.9.6\build\Microsoft.NetCore.Analyzers.props" Condition="Exists('..\packages\Microsoft.NetCore.Analyzers.2.9.6\build\Microsoft.NetCore.Analyzers.props')" />
<Import Project="..\packages\Microsoft.CodeQuality.Analyzers.2.9.6\build\Microsoft.CodeQuality.Analyzers.props" Condition="Exists('..\packages\Microsoft.CodeQuality.Analyzers.2.9.6\build\Microsoft.CodeQuality.Analyzers.props')" />
<Import Project="..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.6\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.6\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -34,6 +39,8 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -250,7 +257,9 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include=".editorconfig" />
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down Expand Up @@ -294,6 +303,17 @@
<ItemGroup>
<Content Include="Icon.ico" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.6\analyzers\dotnet\cs\Microsoft.CodeAnalysis.VersionCheckAnalyzer.resources.dll" />
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.6\analyzers\dotnet\Microsoft.CodeAnalysis.VersionCheckAnalyzer.dll" />
<Analyzer Include="..\packages\Microsoft.CodeQuality.Analyzers.2.9.6\analyzers\dotnet\cs\Humanizer.dll" />
<Analyzer Include="..\packages\Microsoft.CodeQuality.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeQuality.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.CodeQuality.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.CodeQuality.CSharp.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.NetCore.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.NetCore.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.NetCore.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.NetCore.CSharp.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.NetFramework.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.NetFramework.Analyzers.dll" />
<Analyzer Include="..\packages\Microsoft.NetFramework.Analyzers.2.9.6\analyzers\dotnet\cs\Microsoft.NetFramework.CSharp.Analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand All @@ -305,4 +325,14 @@
<PropertyGroup>
<PreBuildEvent>"C:\Users\Alberto\source\repos\64Inject\64Inject\CllAssemblyVersion.exe" assemblyInfo "$(ProjectDir)Properties\AssemblyInfo.cs" projectPath "$(ProjectPath)" config "$(ConfigurationName)" platform "$(PlatformName)" title "$(SolutionName)" format "major.minor.build.revision" replaceIn "$(ProjectDir)64Injector.cs"</PreBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.6\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.VersionCheckAnalyzer.2.9.6\build\Microsoft.CodeAnalysis.VersionCheckAnalyzer.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeQuality.Analyzers.2.9.6\build\Microsoft.CodeQuality.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeQuality.Analyzers.2.9.6\build\Microsoft.CodeQuality.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.NetCore.Analyzers.2.9.6\build\Microsoft.NetCore.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NetCore.Analyzers.2.9.6\build\Microsoft.NetCore.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.NetFramework.Analyzers.2.9.6\build\Microsoft.NetFramework.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NetFramework.Analyzers.2.9.6\build\Microsoft.NetFramework.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.6\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.FxCopAnalyzers.2.9.6\build\Microsoft.CodeAnalysis.FxCopAnalyzers.props'))" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion 64Inject/64InjectCMD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class _64InjectCMD
public _64InjectCMD()
{
Cll.Log.SaveIn("64Inject_log.txt");
Cll.Log.WriteLine(DateTime.UtcNow.ToString());
Cll.Log.WriteLine(DateTime.Now.ToString());
Cll.Log.WriteLine("64Inject open in CMD mode.");

injector = new _64Injector();
Expand Down
66 changes: 48 additions & 18 deletions 64Inject/64InjectGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial class _64InjectGUI : Form
public _64InjectGUI()
{
Cll.Log.SaveIn("64Inject.log");
Cll.Log.WriteLine(DateTime.UtcNow.ToString());
Cll.Log.WriteLine(DateTime.Now.ToString());
Cll.Log.WriteLine("64Inject open in GUI mode.");

injector = new _64Injector();
Expand Down Expand Up @@ -70,8 +70,8 @@ public _64InjectGUI()

labelLoadedBase.Text = "Base: " + injector.LoadedBase;
if (injector.BaseIsLoaded)
panelLoadedBase.BackgroundImage = Properties.Resources.checkmark_16;
panelLoadedBase.BackgroundImage = Properties.Resources.checkmark_16;

if (File.Exists("resources\\boot.png"))
{
injector.BootTvImg.Frame = new Bitmap("resources\\boot.png");
Expand Down Expand Up @@ -99,7 +99,23 @@ private void _64InjectGUI_FormClosing(object sender, FormClosingEventArgs e)
Cll.Log.WriteLine("Close.");
Cll.Log.WriteLine("----------------------------------------------------------------");
}


private void LoadLogFile()
{
try
{
textBoxLog.Clear();
StreamReader sr = File.OpenText(Cll.Log.Filename);
textBoxLog.AppendText(sr.ReadToEnd());
sr.Close();
//this.Update();
}
catch
{
Cll.Log.WriteLine("Error reading log file.");
}
}

private void LoadSettings()
{
BasePath = Properties.Settings.Default.BasePath;
Expand Down Expand Up @@ -132,7 +148,7 @@ private void LoadSettings()

textBoxRomPath.Text = Properties.Settings.Default.ROMPath;
textBoxImagesPath.Text = Properties.Settings.Default.ImagePath;
textBoxConfigFilesPath.Text = Properties.Settings.Default.ConfigFilePath;
textBoxConfigFilesPath.Text = Properties.Settings.Default.ConfigFilePath;

checkBoxRomPath.Checked = Properties.Settings.Default.ROMCheck;
checkBoxImagesPath.Checked = Properties.Settings.Default.ImageCheck;
Expand Down Expand Up @@ -199,6 +215,8 @@ private void ButtonImages_Click(object sender, EventArgs e)

private void ButtonPacking_Click(object sender, EventArgs e)
{
LoadLogFile();

buttonMain.BackColor = Color.FromArgb(17, 17, 17);
buttonImages.BackColor = Color.FromArgb(17, 17, 17);
buttonPacking.BackColor = Color.FromArgb(16, 110, 190);
Expand All @@ -220,7 +238,7 @@ private void ButtonSettings_Click(object sender, EventArgs e)
panelPacking.Visible = false;
panelSettings.Visible = true;
}

#region Main

private void buttonRom_Click(object sender, EventArgs e)
Expand All @@ -234,7 +252,7 @@ private void buttonRom_Click(object sender, EventArgs e)
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (openFileDialog.ShowDialog() == DialogResult.OK)
{
{
injector.RomPath = openFileDialog.FileName;
textBoxRom.Text = Path.GetFileName(injector.RomPath);

Expand Down Expand Up @@ -439,7 +457,7 @@ private void numericUpDownZoom_ValueChanged(object sender, EventArgs e)
labelTitleId.Text = "Title ID: " + injector.TitleId;
}
}

private void buttonConfigFile_Click(object sender, EventArgs e)
{
openFileDialog.FileName = "";
Expand All @@ -466,8 +484,21 @@ private void buttonConfigFile_Click(object sender, EventArgs e)
labelTitleId.Text = "Title ID: " + injector.TitleId;
}
}

private void buttonEditConfigFile_Click(object sender, EventArgs e)
{
try
{
StartVCN64ConfigEditor();
}
catch
{
Cll.Log.WriteLine("Error \"VCN64Config.exe\" program not found.");
MessageBox.Show("\"VCN64Config.exe\" program not found.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void StartVCN64ConfigEditor()
{
if (!Directory.Exists("resources\\vcn64configs"))
Directory.CreateDirectory("resources\\vcn64configs");
Expand All @@ -482,8 +513,8 @@ private void buttonEditConfigFile_Click(object sender, EventArgs e)
output.Append(injector.Rom.ProductCodeVersion);
output.Append(" (" + injector.Rom.Title + ")");
}
else
output.Append("TempConfigFile");
else
output.Append("TempConfigFile");
output.Append(".ini");

StringBuilder desc = new StringBuilder();
Expand All @@ -495,7 +526,6 @@ private void buttonEditConfigFile_Click(object sender, EventArgs e)
desc.Append(injector.Rom.ProductCodeVersion);

VCN64Config.FormEditor editor = new VCN64Config.FormEditor();

if (editor.ShowDialog(input, output.ToString(), desc.ToString()) == DialogResult.OK)
{
injector.IniPath = output.ToString();
Expand All @@ -511,7 +541,6 @@ private void buttonEditConfigFile_Click(object sender, EventArgs e)
if (injector.BaseIsLoaded && injector.RomIsLoaded)
labelTitleId.Text = "Title ID: " + injector.TitleId;
}

editor.Dispose();
}

Expand Down Expand Up @@ -776,6 +805,10 @@ private void ButtonInjectNotPack_Click(object sender, EventArgs e)

private void Inject(bool pack)
{
UpdateBootName();
UpdateBootTvPictureBox();
UpdateBootDrcPictureBox();

bool _continue = true;

if (textBoxShortName.Text.Length != 0)
Expand Down Expand Up @@ -839,11 +872,8 @@ private void Inject(bool pack)

_continue = injector.Inject();

textBoxLog.Clear();
StreamReader sr = File.OpenText(Cll.Log.Filename);
textBoxLog.AppendText(sr.ReadToEnd());
sr.Close();
this.Update();
LoadLogFile();


if (_continue)
MessageBox.Show(HelpString.Injection_Successfully,
Expand Down
4 changes: 2 additions & 2 deletions 64Inject/64Injector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace _64Inject
{
public class _64Injector
{
public const string Release = "1.6 debug"; //CllVersionReplace "major.minor stability"
public const string Release = "1.7 debug"; //CllVersionReplace "major.minor stability"

public string BasePath;
public string ShortName;
Expand Down Expand Up @@ -184,7 +184,7 @@ public bool Inject()
if (_continue)
Cll.Log.WriteLine("Injection completed successfully!");
else
Cll.Log.WriteLine("The injection failed.\nCheck the log file \"" + Cll.Log.Filename + "\".");
Cll.Log.WriteLine("The injection failed.");

return _continue;
}
Expand Down
2 changes: 1 addition & 1 deletion 64Inject/HelpString.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 64Inject/HelpString.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
<value>Realiza la inyección y copia el resultado en la ruta que selecciones. Para Loadiine.</value>
</data>
<data name="Log Description" xml:space="preserve">
<value>Una vez realizada una inyección muestra el contenido del archivo de registro del programa.</value>
<value>Muestra el contenido del archivo de registro del programa.</value>
</data>
<data name="Wii U Common Key Description" xml:space="preserve">
<value>Clave común para empacar o desempacar los juegos de Wii U.</value>
Expand Down Expand Up @@ -310,7 +310,7 @@
<value>Base error</value>
</data>
<data name="Base" xml:space="preserve">
<value>base</value>
<value>Base</value>
</data>
<data name="Config File" xml:space="preserve">
<value>Archivo de configuración</value>
Expand Down
2 changes: 1 addition & 1 deletion 64Inject/HelpString.resx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
<value>Perform the injection and copy the result in the path you select. For loadiine.</value>
</data>
<data name="Log Description" xml:space="preserve">
<value>Once an injection is made, it shows the contents of the program log file.</value>
<value>Shows the contents of the program log file.</value>
</data>
<data name="Wii U Common Key Description" xml:space="preserve">
<value>Common key to pack or unpack Wii U games.</value>
Expand Down
5 changes: 5 additions & 0 deletions 64Inject/NusContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public static bool CheckCommonKeyFiles()
}
catch
{
Cll.Log.WriteLine("Error restoring Wii U common key in nuspacker.");
return false;
}
}
Expand All @@ -203,11 +204,15 @@ public static bool CheckCommonKeyFiles()
}
catch
{
Cll.Log.WriteLine("Error restoring Wii U common key in jnustool.");
return false;
}
}
else
{
Cll.Log.WriteLine("You have not entered the Wii U common key.");
return false;
}
}

public static bool Encrypt(string inputPath, string outputPath)
Expand Down
4 changes: 2 additions & 2 deletions 64Inject/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Puede especificar todos los valores o establecer como predeterminados los números de versión de compilación y de revisión
// mediante el asterisco ('*'), como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.6.47.0")]
[assembly: AssemblyFileVersion("1.6.47.0")]
[assembly: AssemblyVersion("1.7.76.0")]
[assembly: AssemblyFileVersion("1.7.76.0")]
Loading

0 comments on commit 3e21d63

Please sign in to comment.