mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Correct errors for non-portable build
This commit is contained in:
@@ -716,13 +716,13 @@ namespace mRemoteNG.App
|
||||
public static string GetDefaultStartupConnectionFileName()
|
||||
{
|
||||
string newPath = App.Info.ConnectionsFileInfo.DefaultConnectionsPath + "\\" + Info.ConnectionsFileInfo.DefaultConnectionsFile;
|
||||
#if !PORTABLE
|
||||
string oldPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData) + "\\" + (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName + "\\" + Info.Connections.DefaultConnectionsFile;
|
||||
#if !PORTABLE
|
||||
string oldPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData) + "\\" + (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName + "\\" + App.Info.ConnectionsFileInfo.DefaultConnectionsFile;
|
||||
if (File.Exists(oldPath))
|
||||
{
|
||||
return oldPath;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return newPath;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,11 +220,11 @@ namespace mRemoteNG.App
|
||||
}
|
||||
private static void LogApplicationData()
|
||||
{
|
||||
#if !PORTABLE
|
||||
Log.InfoFormat("{0} {1} starting.", System.Windows.Forms.Application.ProductName, System.Windows.Forms.Application.ProductVersion);
|
||||
#else
|
||||
#if !PORTABLE
|
||||
Runtime.Log.InfoFormat("{0} {1} starting.", System.Windows.Forms.Application.ProductName, System.Windows.Forms.Application.ProductVersion);
|
||||
#else
|
||||
Runtime.Log.InfoFormat("{0} {1} {2} starting.", System.Windows.Forms.Application.ProductName, System.Windows.Forms.Application.ProductVersion, My.Language.strLabelPortableEdition);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
private static void LogCmdLineArgs()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user