1414 AbortandresumeusingXMapToolnotrecommendedButton matlab.ui.control.Button
1515 CloseXMapToolsButton matlab.ui.control.Button
1616 UpgradenowtothelatestversionLabel matlab.ui.control.Label
17+ OpenhelpwebCheckBox matlab.ui.control.CheckBox
1718 end
1819
1920
@@ -46,14 +47,18 @@ function startupFcn(app, XMapToolsApp)
4647 % along with XMapTools. If not, see https://www.gnu.org/licenses.
4748
4849 app.Update_XMapTools_GUI.Visible = ' off' ;
50+ app.XMapToolsApp = XMapToolsApp ;
4951
5052 movegui(app .Update_XMapTools_GUI ,' center' );
5153
5254 if ispc
53- app.CodeToCopyEditField.Value = ' Windows updates not implemented yet!' ;
55+ app.CodeToCopyEditField.Value = ' iex ((New-Object System.Net.WebClient).DownloadString('' https://xmaptools.ch/update.ps1'' ))' ;
56+ app.CodeToCopyEditField.FontSize = 12 ;
57+ app.InstructionsLabel.FontSize = 14 ;
58+ app.InstructionsLabel.Text = {' Instructions:' ,' - Press the button Close XMapTools -->' ,' - Open a PowerShell as an administrator (right-click on the application)' ,' - Paste the code in the terminal and press return to update' };
5459 else
5560 app.CodeToCopyEditField.Value = ' curl -fsSL https://xmaptools.ch/update.sh | bash' ;
56- app.InstructionsLabel.Text = {' Instructions:' ,' - Press the button Close XMapTools' ,' - open a terminal, and paste the code to update' };
61+ app.InstructionsLabel.Text = {' Instructions:' ,' - Press the button Close XMapTools --> ' ,' - Open a terminal, and paste the code to update' };
5762 end
5863
5964 app.Update_XMapTools_GUI.Visible = ' on' ;
@@ -68,10 +73,12 @@ function CopyCodeButtonPushed(app, event)
6873
6974 % Button pushed function: CloseXMapToolsButton
7075 function CloseXMapToolsButtonPushed(app , event )
71- if ispc
72- web(' https://xmaptools.ch/install-update/#update-windows' )
73- else
74- web(' https://xmaptools.ch/install-update/#update-macos' )
76+ if isequal(app .OpenhelpwebCheckBox .Value ,1 )
77+ if ispc
78+ web(' https://xmaptools.ch/install-update/#update-windows' )
79+ else
80+ web(' https://xmaptools.ch/install-update/#update-macos' )
81+ end
7582 end
7683 delete(app );
7784 end
@@ -105,7 +112,7 @@ function createComponents(app)
105112 % Create GridLayout
106113 app.GridLayout = uigridlayout(app .Update_XMapTools_GUI );
107114 app.GridLayout.ColumnWidth = {' 0.1x' , ' 0.5x' , ' 1x' , ' 1x' , ' 1x' , ' 1x' , ' 1x' , ' 1x' , ' 1x' , ' 1x' , ' 1x' , ' 1x' , ' 1x' , ' 0.5x' , ' 0.1x' };
108- app.GridLayout.RowHeight = {' 0.1x' , ' 1x' , ' 1x' , ' 0.5x' , ' 1x' , ' 1x' , ' 0.5x' , ' 1x' , ' 1x' , ' 1x ' , ' 1x ' , ' 1x' , ' 1x' , ' 0.1x' };
115+ app.GridLayout.RowHeight = {' 0.1x' , ' 1x' , ' 1x' , ' 0.5x' , ' 1x' , ' 1x' , ' 0.5x' , ' 1x' , ' 1x' , ' 0.7x ' , ' 0.5x ' , ' 1x' , ' 0.5x ' , ' 1x' , ' 0.1x' };
109116
110117 % Create Image
111118 app.Image = uiimage(app .GridLayout );
@@ -126,7 +133,7 @@ function createComponents(app)
126133 app.Copyright.HorizontalAlignment = ' center' ;
127134 app.Copyright.VerticalAlignment = ' bottom' ;
128135 app.Copyright.FontAngle = ' italic' ;
129- app.Copyright.Layout.Row = 13 ;
136+ app.Copyright.Layout.Row = 14 ;
130137 app.Copyright.Layout.Column = [2 14 ];
131138 app.Copyright.Text = ' © 2021-2025, University of Lausanne, Institute of Earth Sciences, Pierre Lanari' ;
132139
@@ -168,7 +175,7 @@ function createComponents(app)
168175 app.AbortandresumeusingXMapToolnotrecommendedButton = uibutton(app .GridLayout , ' push' );
169176 app.AbortandresumeusingXMapToolnotrecommendedButton.ButtonPushedFcn = createCallbackFcn(app , @AbortandresumeusingXMapToolnotrecommendedButtonPushed , true );
170177 app.AbortandresumeusingXMapToolnotrecommendedButton.FontSize = 16 ;
171- app.AbortandresumeusingXMapToolnotrecommendedButton.Layout.Row = 11 ;
178+ app.AbortandresumeusingXMapToolnotrecommendedButton.Layout.Row = 12 ;
172179 app.AbortandresumeusingXMapToolnotrecommendedButton.Layout.Column = [3 13 ];
173180 app.AbortandresumeusingXMapToolnotrecommendedButton.Text = ' Abort and resume using XMapTool (not recommended)' ;
174181
@@ -190,6 +197,13 @@ function createComponents(app)
190197 app.UpgradenowtothelatestversionLabel.Layout.Column = [8 14 ];
191198 app.UpgradenowtothelatestversionLabel.Text = ' Upgrade now to the latest version!' ;
192199
200+ % Create OpenhelpwebCheckBox
201+ app.OpenhelpwebCheckBox = uicheckbox(app .GridLayout );
202+ app.OpenhelpwebCheckBox.Text = ' Open help (web)' ;
203+ app.OpenhelpwebCheckBox.Layout.Row = 10 ;
204+ app.OpenhelpwebCheckBox.Layout.Column = [12 14 ];
205+ app.OpenhelpwebCheckBox.Value = true ;
206+
193207 % Show the figure after all components are created
194208 app.Update_XMapTools_GUI.Visible = ' on' ;
195209 end
0 commit comments