Merge remote-tracking branch 'origin/1.1.4' into development
This commit is contained in:
commit
9a4b31830c
12 changed files with 91 additions and 34 deletions
|
|
@ -425,5 +425,9 @@
|
|||
<Project>{657DBC6D-C3EA-4398-A3FA-DDB73C14F71B}</Project>
|
||||
<Name>Agg</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="PrinterDriverInstaller\InfInstaller.csproj">
|
||||
<Project>{990a9ad3-b6a4-407b-9dfc-9c722af7c9b9}</Project>
|
||||
<Name>InfInstaller</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -95,6 +95,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CloudServices", "..\CloudSe
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "agg-sharp", "agg-sharp", "{2AB9B589-5C98-4C05-BBEA-F97DAE168EAB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InfInstaller", "PrinterDriverInstaller\InfInstaller.csproj", "{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -627,6 +629,26 @@ Global
|
|||
{6782BF37-8139-4DC6-885E-98D22D1FB258}.Release64|Any CPU.Build.0 = Release|Any CPU
|
||||
{6782BF37-8139-4DC6-885E-98D22D1FB258}.Release64|x64.ActiveCfg = Release|Any CPU
|
||||
{6782BF37-8139-4DC6-885E-98D22D1FB258}.Release64|x86.ActiveCfg = Release|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug|x64.Build.0 = Debug|x64
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug64|Any CPU.ActiveCfg = Debug64|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug64|Any CPU.Build.0 = Debug64|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug64|x64.ActiveCfg = Debug64|x64
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug64|x64.Build.0 = Debug64|x64
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Debug64|x86.ActiveCfg = Debug64|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release|x64.ActiveCfg = Release|x64
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release|x64.Build.0 = Release|x64
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release64|Any CPU.ActiveCfg = Release64|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release64|Any CPU.Build.0 = Release64|Any CPU
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release64|x64.ActiveCfg = Release64|x64
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release64|x64.Build.0 = Release64|x64
|
||||
{990A9AD3-B6A4-407B-9DFC-9C722AF7C9B9}.Release64|x86.ActiveCfg = Release64|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ namespace MatterHackers.MatterControl
|
|||
this.AnchorAll();
|
||||
|
||||
UseOpenGL = true;
|
||||
string version = "1.1";
|
||||
string version = "1.2";
|
||||
|
||||
Title = "MatterControl {0}".FormatWith(version);
|
||||
if (OemSettings.Instance.WindowTitleExtra != null && OemSettings.Instance.WindowTitleExtra.Trim().Length > 0)
|
||||
|
|
|
|||
|
|
@ -2174,7 +2174,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
string resumeGCode = ActiveSliceSettings.Instance.GetActiveValue("resume_gcode");
|
||||
lastIndexAdded = InjectGCode(resumeGCode, lastIndexAdded);
|
||||
|
||||
lastIndexAdded = InjectGCode("G1 F{0}".FormatWith(currentFeedRate), lastIndexAdded);
|
||||
lastIndexAdded = InjectGCode("G0 X{0:0.000} Y{1:0.000} Z{2:0.000} F{3}".FormatWith(currentDestination.x, currentDestination.y, currentDestination.z, currentFeedRate), lastIndexAdded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,10 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
{
|
||||
//Construct buttons
|
||||
installButton = textImageButtonFactory.Generate(LocalizedString.Get("Install Driver"));
|
||||
installButton.Click += new EventHandler(installButton_Click);
|
||||
installButton.Click += (sender, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(installButton_Click);
|
||||
};
|
||||
|
||||
skipButton = textImageButtonFactory.Generate(LocalizedString.Get("Skip"));
|
||||
skipButton.Click += new EventHandler(skipButton_Click);
|
||||
|
|
@ -49,7 +52,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
}
|
||||
}
|
||||
|
||||
void installButton_Click(object sender, EventArgs mouseEvent)
|
||||
void installButton_Click(object state)
|
||||
{
|
||||
bool canContinue = this.OnSave();
|
||||
if (canContinue)
|
||||
|
|
@ -113,32 +116,23 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
{
|
||||
if (Path.GetExtension(fileName).ToUpper() == ".INF")
|
||||
{
|
||||
var driverInstallerProcess = new Process();
|
||||
Process driverInstallerProcess = new Process();
|
||||
// Prepare the process to run
|
||||
// Enter in the command line arguments, everything you would enter after the executable name itself
|
||||
driverInstallerProcess.StartInfo.Arguments = "/a {0}".FormatWith(Path.GetFullPath(fileName));
|
||||
|
||||
driverInstallerProcess.StartInfo.Arguments = Path.GetFullPath(fileName);
|
||||
// Enter the executable to run, including the complete path
|
||||
string printerDriverInstallerExePathAndFileName = Path.Combine(".", "InfInstaller.exe");
|
||||
|
||||
driverInstallerProcess.StartInfo.CreateNoWindow = true;
|
||||
driverInstallerProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
|
||||
string pnpUtilFileName = "PnPUtil.exe";
|
||||
// find the location of pnputil.exe
|
||||
List<string> files = new List<string>(Directory.GetFiles("C:/Windows/winsxs", pnpUtilFileName, SearchOption.AllDirectories));
|
||||
driverInstallerProcess.StartInfo.FileName = Path.GetFullPath(printerDriverInstallerExePathAndFileName);
|
||||
driverInstallerProcess.StartInfo.Verb = "runas";
|
||||
driverInstallerProcess.StartInfo.UseShellExecute = true;
|
||||
|
||||
if(files.Count > 0)
|
||||
{
|
||||
string pathToPnPUtil = files[0];
|
||||
driverInstallerProcess.StartInfo.FileName = Path.Combine(pathToPnPUtil);
|
||||
driverInstallerProcess.StartInfo.Verb = "runas";
|
||||
driverInstallerProcess.StartInfo.UseShellExecute = true;
|
||||
|
||||
driverInstallerProcess.Start();
|
||||
|
||||
driverInstallerProcess.WaitForExit();
|
||||
|
||||
// Retrieve the app's exit code
|
||||
var exitCode = driverInstallerProcess.ExitCode;
|
||||
}
|
||||
driverInstallerProcess.Start();
|
||||
driverInstallerProcess.WaitForExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -397,13 +397,16 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
foreach (string line in lines)
|
||||
{
|
||||
//Ignore commented lines
|
||||
if (!line.StartsWith("#"))
|
||||
if (!line.StartsWith("#") && line.Length > 0)
|
||||
{
|
||||
string[] settingLine = line.Split('=');
|
||||
string keyName = settingLine[0].Trim();
|
||||
string settingDefaultValue = settingLine[1].Trim();
|
||||
if (settingLine.Length == 2)
|
||||
{
|
||||
string keyName = settingLine[0].Trim();
|
||||
string settingDefaultValue = settingLine[1].Trim();
|
||||
|
||||
settingsDict.Add(keyName, settingDefaultValue);
|
||||
settingsDict.Add(keyName, settingDefaultValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,20 +15,47 @@ namespace MatterHackers.InfInstaller
|
|||
{
|
||||
public class InfInstallerApp
|
||||
{
|
||||
[DllImport("Setupapi.dll", EntryPoint = "InstallHinfSection", CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern void InstallHinfSection(
|
||||
[In] IntPtr hwnd,
|
||||
[In] IntPtr ModuleHandle,
|
||||
[In, MarshalAs(UnmanagedType.LPWStr)] string CmdLineBuffer,
|
||||
int nCmdShow);
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
public static extern bool Wow64RevertWow64FsRedirection(IntPtr ptr);
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
public static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr);
|
||||
|
||||
public InfInstallerApp()
|
||||
{
|
||||
//Debugger.Launch();
|
||||
}
|
||||
|
||||
public void InstallInfDriverFile(string pathAndDriverToInstall)
|
||||
{
|
||||
InstallHinfSection(IntPtr.Zero, IntPtr.Zero, pathAndDriverToInstall, 0);
|
||||
Process driverInstallerProcess = new Process();
|
||||
|
||||
driverInstallerProcess.StartInfo.Arguments = "/a {0}".FormatWith(Path.GetFullPath(pathAndDriverToInstall));
|
||||
|
||||
driverInstallerProcess.StartInfo.CreateNoWindow = true;
|
||||
driverInstallerProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
|
||||
string pnpUtilFileName = "PnPUtil.exe";
|
||||
|
||||
string pnPUtilPathAndFileName = Path.Combine("C:/WIndows/winsxs/amd64_microsoft-windows-pnputil_31bf3856ad364e35_6.1.7600.16385_none_5958b438d6388d15", pnpUtilFileName);
|
||||
|
||||
// Disable redirection
|
||||
IntPtr ptr = new IntPtr();
|
||||
bool isWow64FsRedirectionDisabled = Wow64DisableWow64FsRedirection(ref ptr);
|
||||
if (isWow64FsRedirectionDisabled)
|
||||
{
|
||||
pnPUtilPathAndFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), pnpUtilFileName);
|
||||
}
|
||||
|
||||
driverInstallerProcess.StartInfo.FileName = pnPUtilPathAndFileName;
|
||||
driverInstallerProcess.StartInfo.Verb = "runas";
|
||||
driverInstallerProcess.StartInfo.UseShellExecute = true;
|
||||
|
||||
driverInstallerProcess.Start();
|
||||
|
||||
driverInstallerProcess.WaitForExit();
|
||||
|
||||
// Restore redirection
|
||||
Wow64RevertWow64FsRedirection(ptr);
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ gap_fill_speed = 30
|
|||
gcode_arcs = 0
|
||||
gcode_comments = 0
|
||||
gcode_flavor = reprap
|
||||
has_sd_card_reader = 1
|
||||
infill_acceleration = 0
|
||||
infill_every_layers = 1
|
||||
infill_extruder = 1
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ gap_fill_speed = 30
|
|||
gcode_arcs = 0
|
||||
gcode_comments = 0
|
||||
gcode_flavor = reprap
|
||||
has_sd_card_reader = 1
|
||||
infill_acceleration = 0
|
||||
infill_every_layers = 1
|
||||
infill_extruder = 1
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ gcode_comments = 0
|
|||
gcode_flavor = reprap
|
||||
has_fan = 1
|
||||
has_heated_bed = 0
|
||||
has_sd_card_reader = 1
|
||||
infill_acceleration = 0
|
||||
infill_every_layers = 1
|
||||
infill_extruder = 1
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ gap_fill_speed = 30
|
|||
gcode_arcs = 0
|
||||
gcode_comments = 0
|
||||
gcode_flavor = reprap
|
||||
has_sd_card_reader = 1
|
||||
infill_acceleration = 0
|
||||
infill_every_layers = 1
|
||||
infill_extruder = 1
|
||||
|
|
|
|||
|
|
@ -2849,3 +2849,6 @@ Translated:{0} is not available
|
|||
English:Invalid printer response
|
||||
Translated:Invalid printer response
|
||||
|
||||
English:Could not find a selected button.
|
||||
Translated:Could not find a selected button.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue