mirror of
https://github.com/ModOrganizer2/modorganizer-NCC.git
synced 2026-07-27 14:00:52 -07:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e61f4aff90 | ||
|
|
7fbc9f0770 | ||
|
|
3ba23e0a80 | ||
|
|
66a91265c8 | ||
|
|
89500bc02e | ||
|
|
e58be3d748 |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
Copyright 2004-2014 Castle Project - http://www.castleproject.org/
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Nexus.Client.ModManagement.Scripting;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Nexus.Client.CLI
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to some files in previously installed mods' installation path.
|
||||
/// </summary>
|
||||
class DummyDataFileUtil : IDataFileUtil
|
||||
{
|
||||
private string m_gamePath;
|
||||
private DataFileUtil m_dataFileUtil;
|
||||
|
||||
protected List<string> SearchPaths { get; set; }
|
||||
|
||||
// To be used internally by DummyDataFileUtilFactory
|
||||
// Use DummyDataFileUtilFactory.CreateDummyDataFileUtil() to instantiate
|
||||
internal DummyDataFileUtil(string installationPath, string gamePath, List<string> installationPaths)
|
||||
{
|
||||
m_gamePath = gamePath;
|
||||
m_dataFileUtil = new DataFileUtil(installationPath);
|
||||
SearchPaths = installationPaths;
|
||||
}
|
||||
|
||||
public void AssertFilePathIsSafe(string p_strPath)
|
||||
{
|
||||
m_dataFileUtil.AssertFilePathIsSafe(p_strPath);
|
||||
}
|
||||
|
||||
public bool DataFileExists(string p_strPath)
|
||||
{
|
||||
string unfixedPath = p_strPath;
|
||||
if (unfixedPath.StartsWith("data", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
unfixedPath = unfixedPath.Substring(5);
|
||||
}
|
||||
foreach (string path in SearchPaths) {
|
||||
if (File.Exists(Path.Combine(path, unfixedPath)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public string[] GetExistingDataFileList(string p_strPath, string p_strPattern, bool p_booAllFolders)
|
||||
{
|
||||
// Not implemented
|
||||
// Will implement if needed
|
||||
return new string[] {};
|
||||
}
|
||||
|
||||
public byte[] GetExistingDataFile(string p_strPath)
|
||||
{
|
||||
AssertFilePathIsSafe(p_strPath);
|
||||
if (p_strPath.StartsWith("data", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
foreach (string path in SearchPaths)
|
||||
{
|
||||
string dataPath = Path.Combine(path, p_strPath.Substring(5));
|
||||
Console.WriteLine("test: " + dataPath + " - " + File.Exists(dataPath));
|
||||
if (File.Exists(dataPath))
|
||||
{
|
||||
return File.ReadAllBytes(dataPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string dataPath = Path.Combine(m_gamePath, p_strPath);
|
||||
if (File.Exists(dataPath))
|
||||
{
|
||||
return File.ReadAllBytes(dataPath);
|
||||
}
|
||||
}
|
||||
throw new FileNotFoundException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Nexus.Client.CLI
|
||||
{
|
||||
class DummyDataFileUtilFactory
|
||||
{
|
||||
private string m_installationPath;
|
||||
private string m_gamePath;
|
||||
private int m_copiedFiles = 0;
|
||||
private List<string> m_searchPaths = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of DummyDataFileUtilFactory.
|
||||
/// </summary>
|
||||
/// <param name="installationPath">The path where the current mod is being installed</param>
|
||||
/// <param name="modlistFile">The path to the modlist.txt file</param>
|
||||
/// <param name="modsPath">The path to the mods directory where previously installed mods are located</param>
|
||||
public DummyDataFileUtilFactory(string installationPath, string modlistFile, string modsPath, string gamePath, List<string> additionalSearchPaths)
|
||||
{
|
||||
m_installationPath = installationPath;
|
||||
m_gamePath = gamePath;
|
||||
m_searchPaths = additionalSearchPaths;
|
||||
m_searchPaths.Add(Path.Combine(m_installationPath, "data"));
|
||||
|
||||
StreamReader reader = new StreamReader(modlistFile);
|
||||
string line;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
// A mod name per line
|
||||
// Handle only activated mods (ignore inactive and unmanaged)
|
||||
if (line[0] == '+')
|
||||
{
|
||||
string modName = line.Substring(1);
|
||||
string modPath = Path.Combine(modsPath, modName);
|
||||
|
||||
// Ignore mod when it is being reinstalled
|
||||
// That folder has no relevant data files anyway
|
||||
// This happens when an activated mod is being reinstalled
|
||||
if (modPath.Equals(m_installationPath, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
Logger.Debug("Ignoring mod {0} that appears to be the one that is being installed", modName);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_searchPaths.Add(modPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new instance DummyDataFileUtil that will use the dummy data folder created by this factory.
|
||||
/// </summary>
|
||||
/// <returns>New instance of DummyDataFileUtil</returns>
|
||||
public DummyDataFileUtil CreateDummyDataFileUtil()
|
||||
{
|
||||
return new DummyDataFileUtil(m_installationPath, m_gamePath, m_searchPaths);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using Castle.DynamicProxy;
|
||||
using Nexus.Client.Games;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Nexus.Client.CLI
|
||||
{
|
||||
public class GameModeInterceptorSelector : IInterceptorSelector
|
||||
{
|
||||
public IInterceptor[] SelectInterceptors(Type type, MethodInfo method, IInterceptor[] interceptors)
|
||||
{
|
||||
if (IsGetter(method))
|
||||
{
|
||||
return interceptors;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsGetter(MethodInfo method)
|
||||
{
|
||||
return method.IsSpecialName && method.Name.StartsWith("get_", StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
private bool IsSetter(MethodInfo method)
|
||||
{
|
||||
return method.IsSpecialName && method.Name.StartsWith("set_", StringComparison.Ordinal);
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class GameModeInterceptor : IInterceptor
|
||||
{
|
||||
private List<string> m_AdditionalWritablePaths;
|
||||
private Version m_ExtenderVersion;
|
||||
|
||||
public GameModeInterceptor(List<string> additionalWritablePaths, Version extenderVersion)
|
||||
{
|
||||
m_AdditionalWritablePaths = additionalWritablePaths;
|
||||
m_ExtenderVersion = extenderVersion;
|
||||
}
|
||||
|
||||
public void Intercept(IInvocation invocation)
|
||||
{
|
||||
invocation.Proceed();
|
||||
|
||||
if (invocation.Method.Name == "get_WritablePaths")
|
||||
{
|
||||
IEnumerable<string> temp = (IEnumerable<string>)invocation.ReturnValue;
|
||||
invocation.ReturnValue = temp.Concat(m_AdditionalWritablePaths);
|
||||
}
|
||||
else if (invocation.Method.Name == "get_ScriptExtenderVersion")
|
||||
{
|
||||
if (invocation.ReturnValue == null)
|
||||
invocation.ReturnValue = m_ExtenderVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Nexus.Client.CLI
|
||||
{
|
||||
class Logger
|
||||
{
|
||||
public enum Level
|
||||
{
|
||||
None = 0,
|
||||
Error = 1,
|
||||
Warning = 2,
|
||||
Info = 3,
|
||||
Debug = 4,
|
||||
Fine = 5,
|
||||
// Place finer levels here if needed
|
||||
All = 9
|
||||
}
|
||||
|
||||
|
||||
private const string s_logfileName = "NexusClientCLI.log";
|
||||
private static string s_logfilePath = null;
|
||||
private static Level s_maxVerbosity = Level.None;
|
||||
|
||||
public static void SetVerbosity(Level verbostity)
|
||||
{
|
||||
s_maxVerbosity = verbostity;
|
||||
}
|
||||
|
||||
public static void SetLogDestination(string path)
|
||||
{
|
||||
s_logfilePath = Path.Combine(path, s_logfileName);
|
||||
}
|
||||
|
||||
public static void Error(String msg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Error))
|
||||
WriteMessage(Level.Error, msg);
|
||||
}
|
||||
|
||||
public static void Error(String fmt, Object arg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Error))
|
||||
WriteMessage(Level.Error, String.Format(fmt, arg));
|
||||
}
|
||||
|
||||
public static void Warning(String msg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Warning))
|
||||
WriteMessage(Level.Warning, msg);
|
||||
}
|
||||
|
||||
public static void Warning(String fmt, Object arg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Warning))
|
||||
WriteMessage(Level.Warning, String.Format(fmt, arg));
|
||||
}
|
||||
|
||||
public static void Info(String msg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Info))
|
||||
WriteMessage(Level.Info, msg);
|
||||
}
|
||||
|
||||
public static void Info(String fmt, Object arg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Info))
|
||||
WriteMessage(Level.Info, String.Format(fmt, arg));
|
||||
}
|
||||
|
||||
public static void Debug(String msg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Debug))
|
||||
WriteMessage(Level.Debug, msg);
|
||||
}
|
||||
|
||||
public static void Debug(String fmt, Object arg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Debug))
|
||||
WriteMessage(Level.Debug, String.Format(fmt, arg));
|
||||
}
|
||||
|
||||
public static void Fine(String msg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Fine))
|
||||
WriteMessage(Level.Fine, msg);
|
||||
}
|
||||
|
||||
public static void Fine(String fmt, Object arg)
|
||||
{
|
||||
if (IsLevelLoggable(Level.Fine))
|
||||
WriteMessage(Level.Fine, String.Format(fmt, arg));
|
||||
}
|
||||
|
||||
public static bool IsLevelLoggable(Level level)
|
||||
{
|
||||
return level <= s_maxVerbosity;
|
||||
}
|
||||
|
||||
private static void WriteMessage(Level level, string msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
string output = string.Format("[{0}] {1}{2}", level, msg, Environment.NewLine);
|
||||
if (s_logfilePath != null) {
|
||||
File.AppendAllText(s_logfilePath, output);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(output);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Ignore exception
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -257,6 +257,11 @@ namespace Nexus.Client.ModManagement
|
||||
File.Delete(destinationPath);
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Exception: " + ex.ToString());
|
||||
throw;
|
||||
}
|
||||
|
||||
// Checks whether the file is a gamebryo plugin
|
||||
if (IsPlugin)
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>true</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -64,6 +65,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>5BAE3112B789DE525238306EB42F614854F1C292</ManifestCertificateThumbprint>
|
||||
@@ -102,6 +104,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>true</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
@@ -113,6 +116,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'x64' ">
|
||||
<BaseAddress>4194304</BaseAddress>
|
||||
@@ -120,7 +124,7 @@
|
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>Full</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
@@ -129,9 +133,10 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>true</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>PdbOnly</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
@@ -139,6 +144,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
|
||||
<BaseAddress>4194304</BaseAddress>
|
||||
@@ -146,6 +152,9 @@
|
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.Core">
|
||||
<HintPath>.\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SevenZipSharp">
|
||||
<HintPath>..\NMM\lib\SevenZipSharp.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -160,6 +169,11 @@
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="GameModeInterceptor.cs" />
|
||||
<Compile Include="GameModeWrapper.cs" />
|
||||
<Compile Include="DummyDataFileUtilFactory.cs" />
|
||||
<Compile Include="Logger.cs" />
|
||||
<Compile Include="DummyDataFileUtil.cs" />
|
||||
<Compile Include="DummyInstallLog.cs" />
|
||||
<Compile Include="DummyPluginManager.cs" />
|
||||
<Compile Include="EnvironmentInfo.cs" />
|
||||
@@ -167,6 +181,7 @@
|
||||
<Compile Include="ModManagement\IniMethods.cs" />
|
||||
<Compile Include="ModManagement\ModExtension.cs" />
|
||||
<Compile Include="ModManagement\ModFileInstaller.cs" />
|
||||
<Compile Include="ModManagement\Scripting\IScriptExtensions.cs" />
|
||||
<Compile Include="Mods\NexusModCacheManager.cs" />
|
||||
<Compile Include="Pair.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
@@ -244,6 +259,7 @@
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<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.
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>c:\temp\ncc\</PublishUrlHistory>
|
||||
<InstallUrlHistory />
|
||||
<SupportUrlHistory />
|
||||
<UpdateUrlHistory />
|
||||
<BootstrapperUrlHistory />
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<StartArguments>-g Skyrim -p "E:\Documents\Projects\ModOrganizer_sf\output\profiles\adminowned\plugins.txt" -i "E:\Documents\Projects\ModOrganizer_sf\output\downloads\Caliente Female Body Mod BBE v3-2-2666-3-2-3.7z" "E:\Documents\Projects\ModOrganizer_sf\output\mods\cbbe"</StartArguments>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<StartWorkingDirectory>E:\Documents\Projects\ModOrganizer_sf\source\NCC\nmm\bin\Debug\</StartWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<StartArguments>-g Skyrim -p "E:\Documents\Projects\ModOrganizer_sf\output\profiles\adminowned\plugins.txt" -i "E:\Documents\Projects\ModOrganizer_sf\output\downloads\Caliente Female Body Mod BBE v3-2-2666-3-2-3.7z" "E:\Documents\Projects\ModOrganizer_sf\output\mods\cbbe"</StartArguments>
|
||||
<StartWorkingDirectory />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||
<StartArguments>-g Skyrim -p "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\profiles\Default\plugins.txt" -i "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\downloads\SMIM v1-43-8655-1-43.7z" "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\mods\SMIM"</StartArguments>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<StartArguments>-g Skyrim -p "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\profiles\Default\plugins.txt" -i "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\downloads\SMIM v1-43-8655-1-43.7z" "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\mods\SMIM"</StartArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<StartArguments>-g Skyrim -p "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\profiles\gna2\plugins.txt" -i "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\downloads\Skyrim Immersive Creatures v6_5_2 NMM BAIN-24913-v6-5-2.7z" "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\mods\Skyrim Immersive Creatures"</StartArguments>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<StartArguments>-g FalloutNV -p "E:\Steam\SteamApps\common\fallout new vegas\ModOrganizer\profiles\Default\plugins.txt" -i "E:\Steam\SteamApps\common\fallout new vegas\ModOrganizer\downloads\ohud.fomod" "E:\Steam\SteamApps\common\fallout new vegas\ModOrganizer\mods\One Hud"</StartArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -29,6 +29,8 @@ using Nexus.Client.ModManagement.InstallationLog;
|
||||
using Nexus.Client.PluginManagement;
|
||||
using Nexus.Client.Settings;
|
||||
using Nexus.Client.BackgroundTasks;
|
||||
using Castle;
|
||||
using Castle.DynamicProxy;
|
||||
|
||||
|
||||
namespace Nexus.Client.CLI
|
||||
@@ -85,7 +87,8 @@ namespace Nexus.Client.CLI
|
||||
return lstFormats[0].Value.CreateMod(modPath, gameMode);
|
||||
}
|
||||
|
||||
static int DoInstall(string game, string filename, string installationPath, string pluginsFile, ref string errorString)
|
||||
static int DoInstall(string game, string filename, string installationPath, string profilePath, string gamePath,
|
||||
List<string> additionalSearchPaths, string seVersion, ref string errorString)
|
||||
{
|
||||
|
||||
if (game == null)
|
||||
@@ -98,9 +101,14 @@ namespace Nexus.Client.CLI
|
||||
errorString = "no file specified";
|
||||
return 1;
|
||||
}
|
||||
if (pluginsFile == null)
|
||||
if (profilePath == null)
|
||||
{
|
||||
errorString = "no plugin file specified";
|
||||
errorString = "no profile path specified";
|
||||
return 1;
|
||||
}
|
||||
if (gamePath == null)
|
||||
{
|
||||
errorString = "no game path specified";
|
||||
return 1;
|
||||
}
|
||||
try
|
||||
@@ -147,6 +155,7 @@ namespace Nexus.Client.CLI
|
||||
environmentInfo.Settings.DelayedSettings["ALL"] = new KeyedSettings<string>();
|
||||
|
||||
ViewMessage warning = null;
|
||||
|
||||
IGameMode gameMode = gameModeFactory.BuildGameMode(fileUtil, out warning);
|
||||
|
||||
IModCacheManager cacheManager = new NexusModCacheManager(environmentInfo.TemporaryPath, gameMode.GameModeEnvironmentInfo.ModDirectory, fileUtil);
|
||||
@@ -158,6 +167,16 @@ namespace Nexus.Client.CLI
|
||||
return 2;
|
||||
}
|
||||
|
||||
// use a proxy so we can intercept accesses to the IGameMode interface. This allows us to make the additional search paths accessible from
|
||||
// the sandbox and feed in the script extender version even though the nmm lib won't find it.
|
||||
// This has to happen after DiscoverScriptTypes becaus that function tries to localize the assembly which fails for the dynamic assembly
|
||||
// of the proxy. Fortunately DiscoverScriptTypes has no side-effects on the gameMode.
|
||||
// This recreates the gamemode object so it's important no code above modifies gameMode
|
||||
ProxyGenerator generator = new ProxyGenerator();
|
||||
GameModeInterceptor interceptor = new GameModeInterceptor(additionalSearchPaths, seVersion != null ? new Version(seVersion) : null);
|
||||
|
||||
gameMode = (IGameMode)generator.CreateClassProxy(gameMode.GetType(), new object[] { environmentInfo, fileUtil }, new IInterceptor[] { interceptor });
|
||||
|
||||
IModFormatRegistry formatRegistry = ModFormatRegistry.DiscoverFormats(cacheManager, scriptTypeRegistry, Path.Combine(Path.GetDirectoryName(exeLocation), "ModFormats"));
|
||||
if (formatRegistry.Formats.Count == 0)
|
||||
{
|
||||
@@ -180,11 +199,21 @@ namespace Nexus.Client.CLI
|
||||
|
||||
if (mod.HasInstallScript)
|
||||
{
|
||||
IDataFileUtil dataFileUtility = new DataFileUtil(gameMode.GameModeEnvironmentInfo.InstallationPath);
|
||||
DummyDataFileUtilFactory dummyFactory = null;
|
||||
IDataFileUtil dataFileUtility;
|
||||
Logger.Info("Detected C# script that relies on files in the actual data folder");
|
||||
|
||||
string modlistFile = Path.Combine(profilePath, "modlist.txt");
|
||||
// ASSUMED mods path is the parent directory of the gameMode.InstallationPath
|
||||
string modsPath = Directory.GetParent(gameMode.InstallationPath).FullName;
|
||||
// Prepare dummy data directory
|
||||
dummyFactory = new DummyDataFileUtilFactory(gameMode.GameModeEnvironmentInfo.InstallationPath, modlistFile, modsPath, gamePath, additionalSearchPaths);
|
||||
dataFileUtility = dummyFactory.CreateDummyDataFileUtil();
|
||||
|
||||
TxFileManager fileManager = new TxFileManager();
|
||||
IInstallLog installLog = new DummyInstallLog();
|
||||
IIniInstaller iniIniInstaller = new IniInstaller(mod, installLog, fileManager, delegate { return OverwriteResult.No; });
|
||||
IPluginManager pluginManager = new DummyPluginManager(pluginsFile, gameMode, mod);
|
||||
IPluginManager pluginManager = new DummyPluginManager(Path.Combine(profilePath, "plugins.txt"), gameMode, mod);
|
||||
IGameSpecificValueInstaller gameSpecificValueInstaller = gameMode.GetGameSpecificValueInstaller(mod, installLog, fileManager, new NexusFileUtil(environmentInfo), delegate { return OverwriteResult.No; });
|
||||
IModFileInstaller fileInstaller = new ModFileInstaller(gameMode.GameModeEnvironmentInfo, mod, installLog, pluginManager, dataFileUtility, fileManager, delegate { return OverwriteResult.No; }, false);
|
||||
InstallerGroup installers = new InstallerGroup(dataFileUtility, fileInstaller, iniIniInstaller, gameSpecificValueInstaller, pluginManager);
|
||||
@@ -200,6 +229,7 @@ namespace Nexus.Client.CLI
|
||||
iniIniInstaller.FinalizeInstall();
|
||||
gameSpecificValueInstaller.FinalizeInstall();
|
||||
mod.EndReadOnlyTransaction();
|
||||
|
||||
Application.Exit();
|
||||
};
|
||||
|
||||
@@ -232,7 +262,14 @@ namespace Nexus.Client.CLI
|
||||
string game = null;
|
||||
string filename = null;
|
||||
string installationPath = null;
|
||||
string pluginsFile = null;
|
||||
string profilePath = null;
|
||||
string gamePath = null;
|
||||
string seVersion = null;
|
||||
List<string> searchPaths = new List<string>();
|
||||
|
||||
|
||||
// Default log verbosity, see Logger.Level
|
||||
int loggerVerbosity = 4; // 0 for none, 9 for all
|
||||
|
||||
// determine action
|
||||
for (int i = 0; i < args.Length; ++i)
|
||||
@@ -241,7 +278,7 @@ namespace Nexus.Client.CLI
|
||||
{
|
||||
if (args.Length - i <= 1)
|
||||
{
|
||||
Console.WriteLine("invalid number of parameters, expected game name");
|
||||
Logger.Error("invalid number of parameters, expected game name");
|
||||
return 1;
|
||||
}
|
||||
++i;
|
||||
@@ -252,11 +289,12 @@ namespace Nexus.Client.CLI
|
||||
{
|
||||
if (args.Length - i <= 2)
|
||||
{
|
||||
Console.WriteLine("invalid number of parameters, expected filename and installation path");
|
||||
Logger.Error("invalid number of parameters, expected filename and installation path");
|
||||
return 1;
|
||||
}
|
||||
filename = args[i + 1];
|
||||
installationPath = args[i + 2];
|
||||
Logger.SetLogDestination(installationPath);
|
||||
i += 2;
|
||||
}
|
||||
|
||||
@@ -264,16 +302,51 @@ namespace Nexus.Client.CLI
|
||||
{
|
||||
if (args.Length - i <= 1)
|
||||
{
|
||||
Console.WriteLine("invalid number of parameters, expected plugins file");
|
||||
Logger.Error("invalid number of parameters, expected plugins file");
|
||||
return 1;
|
||||
}
|
||||
++i;
|
||||
pluginsFile = args[i];
|
||||
profilePath = args[i];
|
||||
}
|
||||
|
||||
if (args[i].ToLower().Equals("/gd") || args[i].ToLower().Equals("-gd"))
|
||||
{
|
||||
if (args.Length - i <= 1)
|
||||
{
|
||||
Logger.Error("invalid number of parameters, expected path name");
|
||||
return 1;
|
||||
}
|
||||
++i;
|
||||
gamePath = args[i];
|
||||
searchPaths.Add(args[i] + "\\data");
|
||||
}
|
||||
|
||||
if (args[i].ToLower().Equals("/d") || args[i].ToLower().Equals("-d"))
|
||||
{
|
||||
if (args.Length - i <= 1)
|
||||
{
|
||||
Logger.Error("invalid number of parameters, expected path name");
|
||||
return 1;
|
||||
}
|
||||
++i;
|
||||
searchPaths.Add(args[i]);
|
||||
}
|
||||
if (args[i].ToLower().Equals("/se") || args[i].ToLower().Equals("-se"))
|
||||
{
|
||||
if (args.Length - i <= 1)
|
||||
{
|
||||
Logger.Error("invalid number of parameters, expected path name");
|
||||
return 1;
|
||||
}
|
||||
seVersion = args[++i];
|
||||
}
|
||||
}
|
||||
|
||||
// Set logger verbosity level
|
||||
Logger.SetVerbosity((Logger.Level)loggerVerbosity);
|
||||
|
||||
string errorString = "";
|
||||
int result = DoInstall(game, filename, installationPath, pluginsFile, ref errorString);
|
||||
int result = DoInstall(game, filename, installationPath, profilePath, gamePath, searchPaths, seVersion, ref errorString);
|
||||
if ((result != 0) && (errorString.Length != 0))
|
||||
{
|
||||
MessageBox.Show(errorString, "Installation Failed: " + result, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
+40
-17
@@ -12,7 +12,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -467,7 +467,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <KeyedSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<KeyedSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.KeyedSettings<string> HelpLinks {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.KeyedSettings<string>)(this["HelpLinks"]));
|
||||
@@ -476,7 +476,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<string> InstallationPaths {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<string>)(this["InstallationPaths"]));
|
||||
@@ -488,7 +488,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<string> ExecutablePaths {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<string>)(this["ExecutablePaths"]));
|
||||
@@ -500,7 +500,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfBoolean />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfBoolean />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<bool> CompletedSetup {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<bool>)(this["CompletedSetup"]));
|
||||
@@ -512,7 +512,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<string> ModFolder {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<string>)(this["ModFolder"]));
|
||||
@@ -524,7 +524,8 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfPerGameModeSettingsOfObject />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfPerGameModeSetting" +
|
||||
"sOfObject />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<Nexus.Client.Settings.PerGameModeSettings<object>> CustomGameModeSettings {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<Nexus.Client.Settings.PerGameModeSettings<object>>)(this["CustomGameModeSettings"]));
|
||||
@@ -536,7 +537,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<string> InstallInfoFolder {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<string>)(this["InstallInfoFolder"]));
|
||||
@@ -548,7 +549,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <WindowPositions />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<WindowPositions />")]
|
||||
public global::Nexus.Client.Settings.WindowPositions WindowPositions {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.WindowPositions)(this["WindowPositions"]));
|
||||
@@ -560,7 +561,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <KeyedSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<KeyedSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.KeyedSettings<string> DockPanelLayouts {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.KeyedSettings<string>)(this["DockPanelLayouts"]));
|
||||
@@ -572,7 +573,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <ColumnWidths />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ColumnWidths />")]
|
||||
public global::Nexus.Client.Settings.ColumnWidths ColumnWidths {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.ColumnWidths)(this["ColumnWidths"]));
|
||||
@@ -584,7 +585,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <SplitterSizes />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<SplitterSizes />")]
|
||||
public global::Nexus.Client.Settings.SplitterSizes SplitterSizes {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.SplitterSizes)(this["SplitterSizes"]));
|
||||
@@ -596,7 +597,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<string> CustomLaunchCommands {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<string>)(this["CustomLaunchCommands"]));
|
||||
@@ -608,7 +609,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<string> CustomLaunchCommandArguments {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<string>)(this["CustomLaunchCommandArguments"]));
|
||||
@@ -620,7 +621,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<string> SelectedLaunchCommands {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<string>)(this["SelectedLaunchCommands"]));
|
||||
@@ -632,7 +633,7 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <KeyedSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<KeyedSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.KeyedSettings<string> RepositoryUsernames {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.KeyedSettings<string>)(this["RepositoryUsernames"]));
|
||||
@@ -644,7 +645,8 @@ namespace Nexus.Client.CLI.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("\r\n <PerGameModeSettingsOfKeyedSettingsOfString />\r\n ")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfKeyedSettingsOfStr" +
|
||||
"ing />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<Nexus.Client.Settings.KeyedSettings<string>> DelayedSettings {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<Nexus.Client.Settings.KeyedSettings<string>>)(this["DelayedSettings"]));
|
||||
@@ -653,5 +655,26 @@ namespace Nexus.Client.CLI.Properties {
|
||||
this["DelayedSettings"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<PerGameModeSettingsOfString />")]
|
||||
public global::Nexus.Client.Settings.PerGameModeSettings<string> ToolFolder {
|
||||
get {
|
||||
return ((global::Nexus.Client.Settings.PerGameModeSettings<string>)(this["ToolFolder"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool ShowStartupMessage {
|
||||
get {
|
||||
return ((bool)(this["ShowStartupMessage"]));
|
||||
}
|
||||
set {
|
||||
this["ShowStartupMessage"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,84 +120,75 @@
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="HelpLinks" Type="Nexus.Client.Settings.KeyedSettings`1[System.String]" Scope="Application">
|
||||
<Value Profile="(Default)">
|
||||
<KeyedSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<KeyedSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="InstallationPaths" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="ExecutablePaths" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="CompletedSetup" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.Boolean]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfBoolean />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfBoolean /></Value>
|
||||
</Setting>
|
||||
<Setting Name="ModFolder" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="CustomGameModeSettings" Type="Nexus.Client.Settings.PerGameModeSettings`1[Nexus.Client.Settings.PerGameModeSettings`1[System.Object]]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfPerGameModeSettingsOfObject />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfPerGameModeSettingsOfObject /></Value>
|
||||
</Setting>
|
||||
<Setting Name="InstallInfoFolder" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="WindowPositions" Type="Nexus.Client.Settings.WindowPositions" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<WindowPositions />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<WindowPositions /></Value>
|
||||
</Setting>
|
||||
<Setting Name="DockPanelLayouts" Type="Nexus.Client.Settings.KeyedSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<KeyedSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<KeyedSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="ColumnWidths" Type="Nexus.Client.Settings.ColumnWidths" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<ColumnWidths />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<ColumnWidths /></Value>
|
||||
</Setting>
|
||||
<Setting Name="SplitterSizes" Type="Nexus.Client.Settings.SplitterSizes" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<SplitterSizes />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SplitterSizes /></Value>
|
||||
</Setting>
|
||||
<Setting Name="CustomLaunchCommands" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="CustomLaunchCommandArguments" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="SelectedLaunchCommands" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="RepositoryUsernames" Type="Nexus.Client.Settings.KeyedSettings`1[System.String]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<KeyedSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<KeyedSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="DelayedSettings" Type="Nexus.Client.Settings.PerGameModeSettings`1[Nexus.Client.Settings.KeyedSettings`1[System.String]]" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
<PerGameModeSettingsOfKeyedSettingsOfString />
|
||||
</Value>
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfKeyedSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="ToolFolder" Type="Nexus.Client.Settings.PerGameModeSettings`1[System.String]" Scope="Application">
|
||||
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<PerGameModeSettingsOfString /></Value>
|
||||
</Setting>
|
||||
<Setting Name="ShowStartupMessage" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@@ -8,7 +8,7 @@
|
||||
<section name="Nexus.Client.CLI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup/><userSettings>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup><userSettings>
|
||||
<Nexus.Client.CLI.Properties.Settings>
|
||||
<setting name="SettingsUpgraded" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -17,7 +17,7 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="RememberedGameMode" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ModCompressionLevel" serializeAs="String">
|
||||
<value>Ultra</value>
|
||||
@@ -53,7 +53,7 @@
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="UserLocation" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="PremiumOnly" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -71,10 +71,10 @@
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="TempPathFolder" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="TraceLogFolder" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ShowExpandedCategories" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -111,79 +111,82 @@
|
||||
</setting>
|
||||
<setting name="InstallationPaths" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfString />
|
||||
<PerGameModeSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="ExecutablePaths" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfString />
|
||||
<PerGameModeSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="CompletedSetup" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfBoolean />
|
||||
<PerGameModeSettingsOfBoolean/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="ModFolder" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfString />
|
||||
<PerGameModeSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="CustomGameModeSettings" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfPerGameModeSettingsOfObject />
|
||||
<PerGameModeSettingsOfPerGameModeSettingsOfObject/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="InstallInfoFolder" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfString />
|
||||
<PerGameModeSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="WindowPositions" serializeAs="Xml">
|
||||
<value>
|
||||
<WindowPositions />
|
||||
<WindowPositions/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="DockPanelLayouts" serializeAs="Xml">
|
||||
<value>
|
||||
<KeyedSettingsOfString />
|
||||
<KeyedSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="ColumnWidths" serializeAs="Xml">
|
||||
<value>
|
||||
<ColumnWidths />
|
||||
<ColumnWidths/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="SplitterSizes" serializeAs="Xml">
|
||||
<value>
|
||||
<SplitterSizes />
|
||||
<SplitterSizes/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="CustomLaunchCommands" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfString />
|
||||
<PerGameModeSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="CustomLaunchCommandArguments" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfString />
|
||||
<PerGameModeSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="SelectedLaunchCommands" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfString />
|
||||
<PerGameModeSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="RepositoryUsernames" serializeAs="Xml">
|
||||
<value>
|
||||
<KeyedSettingsOfString />
|
||||
<KeyedSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="DelayedSettings" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfKeyedSettingsOfString />
|
||||
<PerGameModeSettingsOfKeyedSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="ShowStartupMessage" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</Nexus.Client.CLI.Properties.Settings>
|
||||
</userSettings>
|
||||
<applicationSettings>
|
||||
@@ -193,7 +196,12 @@
|
||||
</setting>
|
||||
<setting name="HelpLinks" serializeAs="Xml">
|
||||
<value>
|
||||
<KeyedSettingsOfString />
|
||||
<KeyedSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="ToolFolder" serializeAs="Xml">
|
||||
<value>
|
||||
<PerGameModeSettingsOfString/>
|
||||
</value>
|
||||
</setting>
|
||||
</Nexus.Client.CLI.Properties.Settings>
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
param (
|
||||
[switch]$debug = $false,
|
||||
[switch]$release = $false
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if ($debug) {
|
||||
$releaseType = "debug"
|
||||
$outputPath = "..\..\outputd"
|
||||
}
|
||||
elseif ($release) {
|
||||
$releaseType = "release"
|
||||
$outputPath = "..\..\output"
|
||||
}
|
||||
else {
|
||||
Write-Host "Usage: publish.ps1 <-debug|-release>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Publishing NCC build."
|
||||
Write-Host "Release type: $releaseType"
|
||||
Write-Host "Output directory: $outputPath"
|
||||
Write-Host ""
|
||||
|
||||
$scriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$NMMPath = "$scriptDirectory\NMM"
|
||||
|
||||
New-Item -ItemType directory -Force -Path "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\ChinhDo.Transactions.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\Commanding.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\GamebryoBase.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\ICSharpCode.TextEditor.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\ModManager.Interface.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\Mods.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\NexusClient.Interface.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\NexusClientCLI.exe" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\NexusClientCLI.exe.config" "$outputPath\NCC"
|
||||
# Copy-Item "$NMMPATH\bin\Release\NexusClientCLI.exe.manifest" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\Scripting.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\SevenZipSharp.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\Transactions.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\UI.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\Util.dll" "$outputPath\NCC"
|
||||
Copy-Item "$NMMPATH\bin\Release\WeifenLuo.WinFormsUI.Docking.dll" "$outputPath\NCC"
|
||||
# stored in repository in binary form
|
||||
Copy-Item "$scriptDirectory\NexusClientCLI\Castle.Core.dll" "$outputPath\NCC"
|
||||
|
||||
New-Item -ItemType directory -Force -Path "$outputPath\NCC\GameModes"
|
||||
Copy-Item "$NMMPATH\bin\Release\GameModes\Fallout3.*" "$outputPath\NCC\GameModes"
|
||||
Copy-Item "$NMMPATH\bin\Release\GameModes\FalloutNV.*" "$outputPath\NCC\GameModes"
|
||||
Copy-Item "$NMMPATH\bin\Release\GameModes\Skyrim.*" "$outputPath\NCC\GameModes"
|
||||
Copy-Item "$NMMPATH\bin\Release\GameModes\Oblivion.*" "$outputPath\NCC\GameModes"
|
||||
Copy-Item "$NMMPATH\bin\Release\GameModes\GamebryoBase.dll" "$outputPath\NCC\GameModes"
|
||||
|
||||
New-Item -ItemType directory -Force -Path "$outputPath\NCC\GameModes\data"
|
||||
# Copy-Item "$NMMPATH\..\bin\Release\BossDummy.dll" "$outputPath\NCC\GameModes\data\boss32.dll"
|
||||
|
||||
New-Item -ItemType directory -Force -Path "$outputPath\NCC\ModFormats"
|
||||
Copy-Item "$NMMPATH\bin\Release\ModFormats\FOMod.dll" "$outputPath\NCC\ModFormats"
|
||||
Copy-Item "$NMMPATH\bin\Release\ModFormats\OMod.dll" "$outputPath\NCC\ModFormats"
|
||||
|
||||
New-Item -ItemType directory -Force -Path "$outputPath\NCC\ScriptTypes"
|
||||
Copy-Item "$NMMPATH\bin\Release\ScriptTypes\Antlr*.dll" "$outputPath\NCC\ScriptTypes"
|
||||
Copy-Item "$NMMPATH\bin\Release\ScriptTypes\CSharpScript.dll" "$outputPath\NCC\ScriptTypes"
|
||||
Copy-Item "$NMMPATH\bin\Release\ScriptTypes\ModScript.dll" "$outputPath\NCC\ScriptTypes"
|
||||
Copy-Item "$NMMPATH\bin\Release\ScriptTypes\XmlScript.dll" "$outputPath\NCC\ScriptTypes"
|
||||
|
||||
New-Item -ItemType directory -Force -Path "$outputPath\NCC\data"
|
||||
Copy-Item "$NMMPATH\bin\Release\data\7z-32bit.dll" "$outputPath\NCC\data"
|
||||
Copy-Item "$NMMPATH\bin\Release\data\7z-64bit.dll" "$outputPath\NCC\data"
|
||||
Reference in New Issue
Block a user