Skip to content

Commit

Permalink
Release 1.8
Browse files Browse the repository at this point in the history
- Updated less.js to version 1.3.3
- Added automatic less.js updating
  - Added Node Package Manager
  - Implemented version checking + updating via NPM
  - Added 'automatically check for less.js updates'-setting
  - Added less.js updating to aboutForm
  • Loading branch information
Mark Lagendijk committed Jan 1, 2013
1 parent 40dbf53 commit e5991da
Show file tree
Hide file tree
Showing 1,978 changed files with 143,876 additions and 70 deletions.
8 changes: 7 additions & 1 deletion Installer/WinLess.warsetup
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<WarSetup-Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" projectRunAfterInstall="true" mainTargetApp="ID_bcbdd185_a875_4976_b079_d9cf83e2ad0e" nextUniqueId="1502" projectName="WinLess" projectUuid="eb24e9df-ad8c-4522-977d-776c254f3ab2" projectUpgradeUuid="b795642a-13ec-4b7c-bb13-d8f0311fc42d" projectVersion="1.6.0" projectOrganization="Mark Lagendijk" projectMustBeAdministratorToInstall="false" project64BitTarget="false" projectTargetDirectory="C:\projects\WinLess\installer" projectTargetName="WinLess-1.6.0" projectType="0" projectUserInterface="WixUI_Minimal">
<WarSetup-Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" projectRunAfterInstall="true" mainTargetApp="ID_bcbdd185_a875_4976_b079_d9cf83e2ad0e" nextUniqueId="7185" projectName="WinLess" projectUuid="3561b233-c213-4e07-9548-a35719fdf1f0" projectUpgradeUuid="b795642a-13ec-4b7c-bb13-d8f0311fc42d" projectVersion="1.8.0" projectOrganization="Mark Lagendijk" projectMustBeAdministratorToInstall="false" project64BitTarget="false" projectTargetDirectory="C:\projects\WinLess\installer" projectTargetName="WinLess-1.8.0" projectType="0" projectUserInterface="WixUI_Minimal">
<LicencePaths>
<string>C:\Program Files (x86)\Jgaa's Internet\War Setup\Licenses</string>
</LicencePaths>
Expand All @@ -18,6 +18,12 @@
</componentFiles>
<addToCreateFolder>false</addToCreateFolder>
</components>
<components componentId="ID7184" componentGuid="5b0b9ac9-3912-4bd5-8922-42a4e158c5ff">
<componentFiles fileId="ID_28c25a72_9379_4420_981d_e8c0087a8900" srcName="Ookii.Dialogs.Wpf.dll" srcDirectory="..\WinLess\bin\Release" dstName="Ookii.Dialogs.Wpf.dll" dstPath="" isTrueTypeFont="false" isComModule="false" typelibGuid="" menuName="Ookii.Dialogs.Wpf" shortcutInProgramFilesMenu="false" shortcutOnDesktop="false" shortcutInQuickLaunch="false" shortcutInStartupFolder="false" shortcutWorkingDirectory="" shortcutCommandArguments="" shortcutDescription="">
<service StartWhenInstalled="true" Remove="both" id="ID7183" isService="false" userAccount="" userPassword="" cmdLineArguments="" errorControl="normal" interactive="false" loadOrderGroup="" serviceName="" startMode="auto" vital="true" />
</componentFiles>
<addToCreateFolder>false</addToCreateFolder>
</components>
<defaultInstallMode>3</defaultInstallMode>
<directories dirId="ID1480" srcPath="..\WinLess\bin\Release\node_modules" dstPath="node_modules" patterns=".*" excludePatterns="" recurse="true" preventEmptyDirectories="false" addToPath="false" ideHeaderFiles="false" ideExecutables="false" ideLibrary="false" ideMicrosoftVisualStudio2003="false" ideMicrosoftVisualStudio2005="false">
<pathComponent componentId="ID1479" componentGuid="63432b1f-70e0-444c-86a8-8b4220f89730">
Expand Down
68 changes: 47 additions & 21 deletions WinLess/Forms/aboutForm.Designer.cs

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

32 changes: 30 additions & 2 deletions WinLess/Forms/aboutForm.cs
Expand Up @@ -14,10 +14,10 @@ namespace WinLess
public partial class aboutForm : Form
{
public aboutForm()
{
{
InitializeComponent();
winlessVersionLabel.Text = GetApplicationVersion();
lessjsVersionLabel.Text = LessCompiler.GetVersion();
lessjsVersionLabel.Text = LessCompiler.GetCurrentCompilerVersion().ToString();
}

private string GetApplicationVersion()
Expand All @@ -27,5 +27,33 @@ private string GetApplicationVersion()
// return the ProductVersion without the last '.0'
return version.Substring(0, version.Length - 2);
}

private void aboutForm_Shown(object sender, EventArgs e)
{
//Force paint by calling Application.DoEvents();
Application.DoEvents();

bool lessCompilerUpdateAvailable = LessCompiler.IsCompilerUpdateAvailable();
checkingForUpdatesLabel.Visible = false;

if(lessCompilerUpdateAvailable)
{
if (MessageBox.Show(string.Format("WinLess uses the official LESS compiler, less.js, to compile your LESS files.\n\nA new version of less.js is available. Do you want to update less.js from {0} to {1}?", LessCompiler.GetCurrentCompilerVersion(), LessCompiler.GetAvailableCompilerVersion()), "Update LESS compiler?", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
//Show updatingLabel and force repaint by calling Application.DoEvents();
updatingLabel.Visible = true;
Application.DoEvents();

LessCompiler.UpdateCompiler();

Version newVersion = LessCompiler.GetCurrentCompilerVersion();
lessjsVersionLabel.Text = newVersion.ToString();

updatingLabel.Visible = false;

MessageBox.Show(string.Format("Succesfully updated less.js to version {0}", newVersion), "LESS compiler update");
}
}
}
}
}
19 changes: 18 additions & 1 deletion WinLess/Forms/mainForm.cs
Expand Up @@ -51,13 +51,30 @@ public mainForm()
AddExtension = true,
Filter = "*.css|*.css"
};

CheckForLessUpdates();
}
catch (Exception e)
{
ExceptionHandler.LogException(e);
}
}

private void CheckForLessUpdates()
{
if (Program.Settings.CheckForLessUpdates)
{
if (LessCompiler.IsCompilerUpdateAvailable())
{
if (MessageBox.Show(string.Format("WinLess uses the official LESS compiler, less.js, to compile your LESS files.\n\nA new version of less.js is available. Do you want to update less.js from {0} to {1}?", LessCompiler.GetCurrentCompilerVersion(), LessCompiler.GetAvailableCompilerVersion()), "Update LESS compiler?", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
LessCompiler.UpdateCompiler();
MessageBox.Show(string.Format("Succesfully updated less.js to version {0}", LessCompiler.GetCurrentCompilerVersion()), "LESS compiler update");
}
}
}
}

public void LoadDirectories(CommandArguments args)
{
if (args.ClearDirectories)
Expand Down Expand Up @@ -506,7 +523,7 @@ private void CompileSelectedFiles()
{
if (file.Enabled)
{
LessCompiler.CompileLessFile(file.FullPath, file.OutputPath, file.Minify);
LessCompiler.Compile(file.FullPath, file.OutputPath, file.Minify);
}
}
}
Expand Down
41 changes: 27 additions & 14 deletions WinLess/Forms/settingsForm.Designer.cs

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

0 comments on commit e5991da

Please sign in to comment.