This repository was archived by the owner on Dec 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +39
-26
lines changed Expand file tree Collapse file tree 4 files changed +39
-26
lines changed Original file line number Diff line number Diff line change 1+ using System . Linq ;
2+ using System . Threading . Tasks ;
3+ using Microsoft . AspNetCore . Mvc ;
4+ using OpenTabletDriver . Web . Core . Services ;
5+
6+ #nullable enable
7+
8+ namespace OpenTabletDriver . Web . Controllers
9+ {
10+ public class ReleaseController : Controller
11+ {
12+ private readonly IReleaseService _releaseService ;
13+
14+ public ReleaseController ( IReleaseService releaseService )
15+ {
16+ _releaseService = releaseService ;
17+ }
18+
19+ [ Route ( "{Release}/{Download}/{file}" ) ]
20+ public async Task < IActionResult > Download ( string file )
21+ {
22+ var release = await _releaseService . GetLatestRelease ( ) ;
23+ var assets = await release . GetReleaseAssets ( ) ;
24+ var asset = assets . First ( a => a . FileName == file ) ;
25+ return Redirect ( asset . Url ) ;
26+ }
27+ }
28+ }
Original file line number Diff line number Diff line change 1- @using OpenTabletDriver .Web .Core .Services
2-
3- @inject IReleaseService releaseService
4-
51@{
62 ViewBag .Title = " Linux Installation Guide" ;
7- var release = await releaseService .GetLatestRelease ();
8- var assets = await release .GetReleaseAssets ();
9- var deb = assets .FirstOrDefault (a => a .FileName == " OpenTabletDriver.deb" )! ;
103}
114
125<h3 class =" wiki-nav-item" id =" debian" >
136 Ubuntu / Debian
147</h3 >
158<ol >
169 <li >
17- Download the <a href =" @deb.Url" >latest release</a >
10+ Download the
11+ <a href =" /Release/Download/OpenTabletDriver.deb" >latest release</a >
1812 <small class =" text-muted" >(OpenTabletDriver.deb)</small >
1913 </li >
2014 <li >
7367 <p >
7468 Alternatively, you can install <code >opentabletdriver</code > without an AUR helper.
7569 </p >
76- <li >
70+ <li >
7771 Run the following commands in a terminal to install and enable the OpenTabletDriver service.
7872 <codeblock class =" mt-2" language =" bash" >
7973 # Downloads the pkgbuild from the AUR.
Original file line number Diff line number Diff line change 1- @using OpenTabletDriver .Web .Core .Services
2- @inject IReleaseService releaseService
3-
41@{
52 ViewBag .Title = " macOS Installation Guide" ;
6- var release = await releaseService .GetLatestRelease ();
7- var assets = await release .GetReleaseAssets ();
8- var asset = assets .First (a => a .FileName .Contains (" osx-x64" ));
93}
104
115<h3 class =" wiki-nav-item" id =" app" >
126 App
137</h3 >
148<ol >
159 <li >
16- Download the <a href =" @asset.Url" >latest release</a >
10+ Download the
11+ <a href =" /Release/Download/OpenTabletDriver.osx-x64.tar.gz" >latest release</a >
1712 <small class =" text-muted" >(OpenTabletDriver-osx-x64.tar.gz)</small >
1813 </li >
1914 <li >
2217 <li >
2318 Run the OpenTabletDriver app.
2419 </li >
25- </ol >
20+ </ol >
Original file line number Diff line number Diff line change 1- @using OpenTabletDriver .Web .Core .Services
2-
3- @inject IReleaseService releaseService
4-
51@{
62 ViewBag .Title = " Windows Installation Guide" ;
7- var release = await releaseService .GetLatestRelease ();
8- var assets = await release .GetReleaseAssets ();
9- var winzip = assets .FirstOrDefault (a => a .FileName == " OpenTabletDriver.win-x64.zip" )! ;
103}
114
125<h3 class =" wiki-nav-item" id =" dependencies" >
3932 <ol >
4033 <li >
4134 Download the
42- <a href =" @(winzip.Url) " >latest release</a >
35+ <a href =" /Release/Download/OpenTabletDriver.win-x64.zip " >latest release</a >
4336 <small class =" text-muted" >(OpenTabletDriver-win-x64.zip)</small >
4437 </li >
4538 <li >
7265 requires WinUSB, and if it does, what interface. Check the <a href =" /Tablets" >supported list of tablets here</a >.
7366 </p >
7467 <ol >
75- <li >If your tablet <b >does</b > require WinUSB download it from <a href =" https://github.com/pbatard/libwdi/releases/download/b755/zadig-2.6.exe" >here</a >.</li >
68+ <li >
69+ If your tablet <b >does</b > require WinUSB download it from
70+ <a href =" https://github.com/pbatard/libwdi/releases/download/b755/zadig-2.6.exe" >here</a >.
71+ </li >
7672 <li >Start Zadig.</li >
7773 <li >Go to <code >Options > show all devices</code ></li >
7874 <li >Find your tablet on the device list and the interface.</li >
You can’t perform that action at this time.
0 commit comments