Skip to content

Commit 91463f2

Browse files
committed
Final update XMapTools 4.5 beta 1
- Final implementation of the new update system. - Attempt to solve dependency issues on Windows (help not working).
1 parent d7d7ec2 commit 91463f2

7 files changed

Lines changed: 34 additions & 11 deletions

File tree

Program/Dev/help/AddPath_help.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
% attemp to help for the compilation on Windows.
2+
function AppPath_help()
3+
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
% attemp to help for the compilation on Windows.
2+
function AppPath_help_img()
3+
end
907 Bytes
Binary file not shown.

Program/SourceControl/Update_XMapTools_exported.m

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
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

Program/SourceControl/XMapTools_exported.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7216,6 +7216,9 @@ function startupFcn(app, varargin)
72167216
% You should have received a copy of the GNU General Public License
72177217
% along with XMapTools. If not, see https://www.gnu.org/licenses.
72187218

7219+
% Attempt to help compilation on Windows (4.5 beta 1):
7220+
AddPath_help;
7221+
AddPath_help_img;
72197222

72207223
disp(' ')
72217224
%disp(' ')
@@ -7252,7 +7255,7 @@ function startupFcn(app, varargin)
72527255

72537256
app.Options_resolutionLabel.Text = ['Resolution: ',num2str(app.XMapTools_Position.Live(1)),'x',num2str(app.XMapTools_Position.Live(2)),' (',num2str(app.XMapTools_Position.Original(1)),'x',num2str(app.XMapTools_Position.Original(2)),')'];
72547257

7255-
app.XMapTools_VER = 'XMapTools 4.5 beta 1 build 250511';
7258+
app.XMapTools_VER = 'XMapTools 4.5 beta 1 build 250515';
72567259
app.XMapTools_version.Text = app.XMapTools_VER;
72577260
%disp('Version set'),toc
72587261
% Check for Updates ------------------------------------------
@@ -16128,7 +16131,7 @@ function Tool_ExportCompositions_2ButtonPushed(app, event)
1612816131
function UpdateNowButtonPushed(app, event)
1612916132
app.XMapTools_SkipUpdate = 0;
1613016133
waitfor(Update_XMapTools(app));
16131-
if isequal(app.XMapTools_SkipUpdate,1)
16134+
if isequal(app.XMapTools_SkipUpdate,0)
1613216135
delete(app);
1613316136
end
1613416137
end

Program/XMapTools.mlapp

17 Bytes
Binary file not shown.

Program/config_xmaptools.mat

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)