Skip to content

Commit

Permalink
SciTE4AutoHotkey Setup: automatically read version number and year
Browse files Browse the repository at this point in the history
  • Loading branch information
fincs committed Jul 10, 2013
1 parent d6c4242 commit bf221ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions installer/dialog.html
Expand Up @@ -291,7 +291,7 @@ <h1><img src="banner.png" alt="SciTE4AutoHotkey Logo"></h1>

<h4>SciTE and Scintilla (SciTE.exe and SciLexer.dll)</h4>

<p>Copyright 1998-2012 by Neil Hodgson (neilh@scintilla.org)</p>
<p>Copyright 1998-<span id="yearTag1"></span> by Neil Hodgson (neilh@scintilla.org)</p>

<p>All Rights Reserved</p>

Expand All @@ -312,7 +312,7 @@ <h4>SciTE and Scintilla (SciTE.exe and SciLexer.dll)</h4>

<h4>Everything else (toolbar, debugger, setting files, etc.)</h4>

<p>Copyright 2007-2012 by fincs (@ autohotkey.com forum)</p>
<p>Copyright 2007-<span id="yearTag2"></span> by fincs (@ autohotkey.com forum)</p>

<p>This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it and/or
Expand All @@ -338,8 +338,8 @@ <h4>Everything else (toolbar, debugger, setting files, etc.)</h4>
<p>Likewise, the old AutoHotkey_L porting pack is no longer supported, and the official
AutoHotkey installer should be used instead.</p>

<p><a href="ahk://Lnk_CompileAhk">Compile_AHK II</a> is no longer included but it is
still supported. Existing installations will be preserved.</p>
<p><a href="ahk://Lnk_CompileAhk">Compile_AHK II</a> is no longer included nor supported.
Existing installations will however be preserved.</p>

<div style="text-align: center">
<a onclick="switchPage('start')" class="button">Go back</a>
Expand All @@ -357,8 +357,8 @@ <h4>Everything else (toolbar, debugger, setting files, etc.)</h4>
degraded user experience, such as the inability to debug scripts using the
interactive debugger.</p>

<p>Please take into account that the currently installed AutoHotkey version is over three
years old and numerous bugfixes and improvements have been added since then, not to mention
<p>Please take into account that the currently installed AutoHotkey version is over <strong>four
years old</strong> and numerous bugfixes and improvements have been added since then, not to mention
that new scripts posted to the AutoHotkey community are increasingly incompatible with it.</p>

<p>You can always download the latest version of AutoHotkey at <a href="ahk://Lnk_AhkWebsite">
Expand Down
11 changes: 8 additions & 3 deletions installer/setup.ahk
Expand Up @@ -11,7 +11,7 @@ SendMode, Input
SetWorkingDir, %A_ScriptDir%

global uititle := "SciTE4AutoHotkey Setup"
global programVer := "3.0.03"
global programVer ; will be filled in later
global winVer := Util_GetWinVer()
global ahkPath := Util_GetAhkPath()
global intlAhkName := ""
Expand All @@ -32,9 +32,11 @@ if winVer < 5.1
if 1 = /douninstall
goto UninstallMain

FileRead, programVer, %A_ScriptDir%\$DATA\$VER

if FileExist("SciTE.exe")
bUninstall := true
else if !FileExist("$DATA\") || !FileExist("dialog.html") || !FileExist("banner.png")
else if ErrorLevel || !FileExist("$DATA\") || !FileExist("dialog.html") || !FileExist("banner.png")
{
MsgBox, 48, %uititle%, Oops `;p ; Short msg since so rare.
ExitApp
Expand Down Expand Up @@ -82,7 +84,10 @@ InitUI()
wb.Navigate("file://" A_ScriptDir "\dialog.html")
while wb.ReadyState != 4
Sleep, 10
getDocument().getElementById("versionTag").innerText := "version " programVer
doc := getDocument()
doc.getElementById("versionTag").innerText := "version " programVer
doc.getElementById("yearTag1").innerText := A_Year
doc.getElementById("yearTag2").innerText := A_Year
if (A_ScreenDPI != 96)
wb.document.body.style.zoom := A_ScreenDPI/96
}
Expand Down

0 comments on commit bf221ea

Please sign in to comment.