-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathdownloads.php
239 lines (201 loc) · 11.5 KB
/
downloads.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<?php
$currentpage = "downloads.php";
include("header.php");
?>
<script>
function thankyou(e) {
// redirects to the thankyou page, which takes care of the download
dlink = e.target.href;
durl = "thankyou.php?url=" + encodeURIComponent(dlink) + "<?php echo $langattrib; ?>";
e.preventDefault();
window.location = durl;
return false;
}
function updateLatestCategoryFromFeed(xmlUrl, titleId, bodyId, buttonId, imageId) {
var xhr = new XMLHttpRequest();
xhr.open('GET', xmlUrl, true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var parser = new DOMParser();
var xml = parser.parseFromString(xhr.responseText, 'application/xml');
var latestEventsPost = xml.getElementsByTagName('item')[0];
var sectionTitle = document.getElementById(titleId);
var sectionBody = document.getElementById(bodyId);
var learnMoreButton = document.getElementById(buttonId);
var imageElement = document.getElementById(imageId);
if (latestEventsPost) {
sectionTitle.textContent = latestEventsPost.getElementsByTagName('title')[0].textContent;
sectionBody.innerHTML = latestEventsPost.getElementsByTagName('description')[0].textContent;
learnMoreButton.setAttribute('href', latestEventsPost.getElementsByTagName('link')[0].textContent);
var contentEncoded = latestEventsPost.getElementsByTagName('content:encoded')[0]?.textContent || '';
var tempDiv = document.createElement('div');
tempDiv.innerHTML = contentEncoded;
var firstImage = tempDiv.querySelector('img');
var imageUrl = firstImage ? firstImage.src : '';
if (!imageUrl) {
imageUrl = 'images/Development-Updates.avif';
}
if (imageElement) {
imageElement.setAttribute('src', imageUrl);
}
}
}
};
xhr.send();
}
updateLatestCategoryFromFeed(
'proxy-xml.php?url=https://blog.freecad.org/category/releases/feed/',
'releases-title',
'releases-description',
'releases-link',
'releases-image'
);
</script>
<main id="main" class="container-fluid">
<div class="download-notes text-center">
<!-- -------------------------------- -->
<!-- Major+Minor Version of FC Stable -->
<!-- -------------------------------- -->
<h2 class="downloads-notes-title"><?php echo _('Current stable version:'); ?> 1.0.0</h2>
<p><?php echo _('Select your desired platform (note that all downloads are for 64-bit systems):'); ?></p>
</div>
<!-- ------- -->
<!-- Windows -->
<!-- ------- -->
<div class="row mx-auto download-platform">
<div class="col-sm-6 col-lg-4 my-4">
<div class="card text-dark">
<div class="card-body d-block align-items-center text-center px-xl-5 py-xl-4">
<img class="w-100 p-4" src="svg/icon-windows.svg" alt="Windows">
<h3 class="card-title download-platform-name m-0 pb-3">Windows</h3>
<div class="flex-column flex-lg-row">
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/1.0.0/FreeCAD_1.0.0-conda-Windows-x86_64-installer-1.exe">x86_64 installer</a>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/1.0.0/FreeCAD_1.0.0-conda-Windows-x86_64-py311.7z">x86_64 portable (.7z)</a>
</div>
</div>
<div class="card-footer px-xl-5 py-xl-4">
<small class="text-muted">
<?php echo _('Windows 8 is the minimum supported version. For more info on installation, please check out the '); ?>
<a href="<?php echo _('https://wiki.freecad.org/Install_on_Windows'); ?>"><?php echo _('wiki'); ?></a>.
</small>
</div>
</div>
</div>
<!-- ----- -->
<!-- MacOS -->
<!-- ----- -->
<div class="col-sm-6 col-lg-4 my-4">
<div class="card text-dark">
<div class="card-body d-block align-items-center text-center px-xl-5 py-xl-4">
<img class="w-100 p-4" src="svg/icon-apple.svg" alt="Mac">
<h3 class="card-title download-platform-name m-0 pb-3">Mac</h3>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/1.0.0/FreeCAD_1.0.0-conda-macOS-arm64-py311.dmg">Apple Silicon</a>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/1.0.0/FreeCAD_1.0.0-conda-macOS-x86_64-py311.dmg">Intel</a>
</div>
<div class="card-footer px-xl-5 py-xl-4">
<small class="text-muted">
<?php echo _('macOS 10.13 High Sierra is the minimum supported version. For more info on installation, please check out the '); ?>
<a href="<?php echo _('https://wiki.freecad.org/Install_on_Mac'); ?>"><?php echo _('wiki'); ?></a>.
</small>
</div>
</div>
</div>
<!-- -------------- -->
<!-- Linux/AppImage -->
<!-- -------------- -->
<div class="col-sm-6 col-lg-4 my-4">
<div class="card text-dark">
<div class="card-body d-block align-items-center text-center px-xl-5 py-xl-4">
<img class="w-100 p-4" src="svg/icon-linux.svg" alt="Linux">
<h3 class="card-title download-platform-name m-0 pb-3">Linux</h3>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/1.0.0/FreeCAD_1.0.0-conda-Linux-x86_64-py311.AppImage">x86_64 AppImage</a>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/1.0.0/FreeCAD_1.0.0-conda-Linux-aarch64-py311.AppImage">aarch64 AppImage</a>
</div>
<div class="card-footer px-xl-5 py-xl-4">
<small class="text-muted">
<?php echo _('For distro-specific install instructions such as Ubuntu PPA and other ways to install on Linux please check out the '); ?>
<a href="<?php echo _('https://wiki.freecad.org/Install_on_Unix'); ?>"><?php echo _('wiki'); ?></a>.
</small>
</div>
</div>
</div>
</div> <!-- class="row mx-auto download-platform" -->
<!-- ------------- -->
<!-- RELEASE NOTES -->
<!-- ------------- -->
<div class="download-notes text-center">
<p>
<?php echo _("See what has changed since last version in the"); ?>
<a class="badge text-bg-light text-decoration-none" href="<?php echo _('https://wiki.freecad.org/Release_notes_1.0'); ?>"><?php echo _('FreeCAD 1.0 release notes'); ?></a>
</p>
</div>
<!-- ------------- -->
<!-- NEXT VERSION -->
<!-- ------------- -->
<!-- -------------------- -->
<!-- DEVELOPMENT VERSIONS -->
<!-- -------------------- -->
<div class="download-notes text-center">
<h2 class="downloads-notes-title"><?php echo _('Development versions'); ?></h2>
<p>
<?php echo _("FreeCAD's development happens daily!"); ?>
<?php echo _("The FreeCAD community generates weekly builds that are based on <i>bleeding edge</i> FreeCAD code in order for users to test bugfixes/regressions along with new features."); ?>
<?php echo _("We ask that advanced users occasionally run the development builds to assist with testing new code."); ?>
<?php echo _("These builds are not suitable for production use, and care should be taken when using them (back up your files regularly, etc.)."); ?>
<?php echo _("Development builds should be expected to be slower, consume more memory, and be less stable than the official release versions."); ?>
<br/><br/>
<?php echo _('Download here a '); ?><a href="https://github.com/FreeCAD/FreeCAD-AppImage/releases/tag/weekly-builds" class="badge text-bg-light text-decoration-none"><?php echo _('Weekly Build'); ?></a><?php echo _(' for Windows, macOS or Linux. '); ?>
<?php echo _("On Linux"); ?>, <a href="<?php echo _('https://wiki.freecad.org/Snap'); ?>" class="badge text-bg-light text-decoration-none"><?php echo ('Snap'); ?></a>
<?php echo _("and"); ?> <a href="<?php echo _('https://wiki.freecad.org/Flatpak'); ?>" class="badge text-bg-light text-decoration-none"><?php echo ('Flatpak'); ?></a>
<?php echo _("also provide development channels"); ?>.
<br /><br />
</p>
</div>
<!-- ----------------------------- -->
<!-- ADDITIONAL MODULES AND MACROS -->
<!-- ----------------------------- -->
<div class="download-notes text-center">
<h2 class="downloads-notes-title"><?php echo _('Additional modules and macros'); ?></h2>
<p>
<?php echo _('The FreeCAD community provides a wealth of additional modules and macros. They can
now easily be installed directly from within FreeCAD using the '); ?>
<a href="<?php echo _('https://wiki.freecad.org/Std_AddonMgr'); ?>" class="badge text-bg-light text-decoration-none"><?php echo _('Addon manager.'); ?></a>
</p>
</div>
<!-- ----------------------------- -->
<!-- SOURCE CODE -->
<!-- ----------------------------- -->
<div class="download-notes text-center">
<h2 class="downloads-notes-title"><?php echo _('Source code'); ?></h2>
<p>
<?php echo _('The source code of FreeCAD is hosted primarily on '); ?>
<a href="https://github.com/FreeCAD/FreeCAD" class="badge text-bg-light text-decoration-none">GitHub</a>
<?php echo _('and mirrored on '); ?>
<a href="https://gitlab.com/FreeCAD/FreeCAD" class="badge text-bg-light text-decoration-none">GitLab</a>,
<a href="https://codeberg.org/FreeCAD/FreeCAD" class="badge text-bg-light text-decoration-none">Codeberg</a>
<?php echo _('and '); ?>
<a href="https://sourceforge.net/projects/free-cad/" class="badge text-bg-light text-decoration-none">Sourceforge</a>
</p>
</div>
<section class="row section d-flex align-items-center justify-content-around rounded mb-5">
<div class="col-lg-5 rounded model-backround p-2 ">
<div class="placeholder-glow">
<img id="releases-image" class="img-fluid" alt="Release Image" loading="lazy">
</div>
</div>
<div class="col-lg-6 text-light text-center text-lg-start rounded text-backround pb-3">
<h3 id="releases-title" class="section-title mt-3 placeholder-glow">
<span class="placeholder col-6 bg-secondary"></span>
</h3>
<p id="releases-description" class="section-body placeholder-glow">
<span class="placeholder col-12 bg-secondary"></span>
<span class="placeholder col-8 bg-secondary"></span>
<span class="placeholder col-10 bg-secondary"></span>
</p>
<a id="releases-link" href="#" class="btn btn-light rounded-pill mt-3">
<?php echo _('Learn more'); ?>
</a>
</div>
</section>
</main>
<?php include 'footer.php'; ?>