Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation is still painful #38

Closed
aokman opened this issue May 30, 2023 · 7 comments
Closed

Installation is still painful #38

aokman opened this issue May 30, 2023 · 7 comments

Comments

@aokman
Copy link

aokman commented May 30, 2023

I came here from Tex Live, the installation of Tex Live is fairly smooth, you just download a installer, press a button it will all the work for you. But Tex Live is too larg, and it takes too long to installation. So after a few google search I find here. TinyTex it small, I expected that TinyTex will take less time to install, but unfortrunately no. I was stuck at the very beginning. Can you please just hide all the technical details (R? Powershell? or anything else? who care what tech you are using? people just want it get work done.) behind one button?

@yihui
Copy link
Member

yihui commented May 30, 2023

who care what tech you are using?

Sorry, but we must care, because a software package is usually not designed for one person, and people use different technologies. We can't force them all to use one technology.

I appreciate that you point out the instructions may be unclear, and I'd like to know more about your situation. I'm curious why those questions are hard for you to answer (e.g., do you use R or PowerShell).

@aokman
Copy link
Author

aokman commented May 31, 2023

It doesn't matter about technology. Good softwares in real world usually assume that users have zero knowledge about the technology it used in background. Your product requires too many knowledge, users have to read a long readme to learn just on how to install it on their own machine. Although I sometimes used PowerShell(I never touched R), I still failed to install it on my machine after about half hour reading and tweaking (TinyTex was designed to save others' time, right?). Why not just do like what Tex Live does, provide some .bat or shell, and just one button click, all work done?

@aokman
Copy link
Author

aokman commented May 31, 2023

You can assume I'm an idiot on technology. I just what to use it writing some articles. Now before writing, I have to learn many technologies, if I don't, I can not even start writing because I can't install the software.

@yihui
Copy link
Member

yihui commented May 31, 2023

just one button click, all work done

That's exactly what we do. Just one click on the .bat file and all work is done: https://yihui.org/tinytex/#for-other-users

@aokman
Copy link
Author

aokman commented May 31, 2023

Yes, I saw and tried that. But it stucks with following information:

Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS C:\TinyTex> .\install-bin-windows.bat           

C:\TinyTex>where /q powershell   || echo powershell not found   && exit /b 

C:\TinyTex>rem switch to a temp directory, whichever works 

C:\TinyTex>cd /d "C:\Users\li\AppData\Local\Temp" 

C:\Users\li\AppData\Local\Temp>cd /d "C:\Users\li\AppData\Local\Temp" 

C:\Users\li\AppData\Local\Temp>rem in case there is a leftover TinyTeX* dir, delete it 

C:\Users\li\AppData\Local\Temp>for / %G in ("TinyTeX*") do rd /s /q "%~G" 

C:\Users\li\AppData\Local\Temp>if not defined TINYTEX_INSTALLER set TINYTEX_INSTALLER=TinyTeX-1 

C:\Users\li\AppData\Local\Temp>set BUNDLE_EXT=zip 

C:\Users\li\AppData\Local\Temp>if "TinyTeX-1" == "TinyTeX-2" set BUNDLE_EXT=exe 

C:\Users\li\AppData\Local\Temp>if not defined TINYTEX_VERSION (set TINYTEX_URL=https://github.com/rstudio/tinytex-releases/releases/download/daily/TinyTeX-1.zip )  else (set TINYTEX_URL=https://github.com/rstudio/tinytex-releases/releases/download/v/TinyTeX-1-v.zip ) 

C:\Users\li\AppData\Local\Temp>set DOWNLOADED_FILE=install.zip 

C:\Users\li\AppData\Local\Temp>rem download the zip package - method 1 

C:\Users\li\AppData\Local\Temp>echo Download zip file... Method 1 
Download zip file... Method 1

C:\Users\li\AppData\Local\Temp>powershell -Command "& { try {Add-Type -A 'System.Net.Http'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $response = (New-Object System.Net.Http.HttpClient).GetAsync($Env:TINYTEX_URL); $response.Wait(); $outputFileStream = [System.IO.FileStream]::new($Env:DOWNLOADED_FILE, [System.IO.FileMode]::Create, [System.IO.FileAccess]::Write); $response.Result.Content.CopyToAsync($outputFileStream).Wait(); $outputFileStream.Close()} catch {throw $_}}" 
使用“0”个参数调用“Wait”时发生异常:“发生一个或多个错误。”
所在位置 行:1 字符: 202
+ ... Http.HttpClient).GetAsync($Env:TINYTEX_URL); $response.Wait(); $outpu ...
+                                                  ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : AggregateException
 

C:\Users\li\AppData\Local\Temp>if not errorlevel 1 goto unzip

C:\Users\li\AppData\Local\Temp>rem Try another method if the first one failed

C:\Users\li\AppData\Local\Temp>echo Download zip file... Method 2
Download zip file... Method 2

C:\Users\li\AppData\Local\Temp>powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile($Env:TINYTEX_URL, $Env:DOWNLOADED_FILE)"

I don't even know whether it is alive or dead. Any idea?

@aokman
Copy link
Author

aokman commented May 31, 2023

It seems like it's downloading something but failed. Why not drop the .bat in the zip, skip the download step, make it all in one as a single install package. I think it should be more user-friendly.

@cderv
Copy link
Contributor

cderv commented Jun 1, 2023

Just a note that for Windows Users, we maintain some packages options through Windows package manager like Chocolatey and Scoop. https://github.com/rstudio/tinytex-releases#chocolatey

They both offer one liner to install a package and then get the update. We do the work of packaging and maintaining for those tools to work.

Are those package management tool not an option ?

Another side note: Quarto Project (which is the quarto CLI) does offer a simpler installation of TinyTeX also (https://quarto.org/docs/output-formats/pdf-basics.html#prerequisites)

So there are some options to make it easier already, but as you can see we need to maintain several options because everyone wants its tech.

My understanding is that you would like an .exe file windows that will to the unzipping and run the path add command for you.

We have other opened issues by users who want other ways:

We welcome some PR. I believe some tools like InnoSetup could help build an .exe installer for Windows, but this is one more output to maintain.

But it stucks with following information:

Try in powershell 7 maybe if you have it. This could be an issue with supporting several powershell version. I'll try to have a look and reproduce this error.

@aokman aokman closed this as completed Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants