Skip to content

Commit

Permalink
Merge pull request #2298 from AllenInstitute/bugfix/2298-too-old-mies…
Browse files Browse the repository at this point in the history
…-messages-backport

MIES_Include.ipf: Clarify update instructions
  • Loading branch information
t-b authored Nov 19, 2024
2 parents b3b313d + b00bf37 commit d6d193a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions Packages/MIES_Include.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,22 @@

#ifdef TOO_OLD_IGOR

static StrConstant IP_DOCU_UPDATE_URL = "https://alleninstitute.github.io/MIES/installation.html#igor-pro-update-nightly"

Window OpenPanelWithDocumentationLink() : Panel
PauseUpdate; Silent 1 // building window...
NewPanel/K=1/W=(435, 461, 735, 661) as "OpenPanelWithDocumentationLink"
Button button0, pos={38.00, 14.00}, size={223.00, 89.00}, proc=ButtonProc_OpenMiesDocuUpdateNightly, title="Open MIES documentation for\r update instructions"
Button button1, pos={51.00, 133.00}, size={195.00, 29.00}, proc=ButtonProc_DownloadNightly, title="Download Igor Pro nightly build"
NewPanel/K=1/W=(841, 378, 1150, 576) as "OpenPanelWithDocumentationLink"
DrawText 20, 60, "\\JC\\Zr200\\f01 MIES requires a newer \r version of Igor Pro"
Button button0, pos={74.00, 70.00}, size={150.00, 50.00}, proc=ButtonProc_OpenMiesDocuUpdateNightly, title="Open Igor \r update instructions"
Button button1, pos={74.00, 130.00}, size={150.00, 50.00}, proc=ButtonProc_DownloadNightly, title="Download approved \r Igor Pro version"
EndMacro

Function ButtonProc_OpenMiesDocuUpdateNightly(ba) : ButtonControl
STRUCT WMButtonAction &ba

switch(ba.eventCode)
case 2: // mouse up
BrowseURL "https://alleninstitute.github.io/MIES/installation.html#igor-pro-update-nightly"
BrowseURL IP_DOCU_UPDATE_URL
break
endswitch

Expand All @@ -58,7 +61,7 @@ static Function/S GetDownloadLink()

string igorMajorVersion, text, lineWithLink, url, os

igorMajorVersion = StringByKey("IGORVERS", IgorInfo(0))[0]
igorMajorVersion = num2istr(IgorVersion())

#if defined(WINDOWS)
os = "Windows"
Expand Down Expand Up @@ -120,8 +123,8 @@ static Function AfterCompiledHook()
string igorMajorVersion

#if defined(IGOR64)
igorMajorVersion = StringByKey("IGORVERS", IgorInfo(0))[0]
printf "Your Igor Pro %s version is too old to be usable for MIES.\r", igorMajorVersion
igorMajorVersion = num2istr(IgorVersion())
printf "Your Igor Pro %s version is too old to be usable for MIES. Please follow the download instructions at: %s\r", igorMajorVersion, IP_DOCU_UPDATE_URL
Execute "OpenPanelWithDocumentationLink()"
#else
printf "The 32bit version of Igor Pro is not supported anymore.\r"
Expand Down
2 changes: 1 addition & 1 deletion Packages/doc/doxygen-filter-ipf

0 comments on commit d6d193a

Please sign in to comment.