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
Questions about Bat script. #989
Comments
I guess another question is should I limit the maximum amount of cores/threads for the cpu cores count question? Right now I have the max to be 99 because I doubt anyone would want to run more than 99 jobs on one computer. Another question I have about the cpu count thing is why is there a for /l loop counting from 1 and incrementing by 1 to the core count answer (as far as my batch programming understanding goes, this is what I interpret from it)? |
Probably forgot that y/n was the norm when I added it. No special reason.
There's probably someone with a 128-thread dual Xeon raising their hand somewhere in the world.
I'd assume it's a failsafe for negative/zero numbers/NaN, but that was also done by jb-alvarado, so I can't explain why it was done that way. |
I guess for now, I'll just use this thread for any questions about any syntax or anything weird that I spot in the script. I'll close this for now and reopen when I have one. |
I guess I have another question, a major I one. On line 1372, the variable try32 is set after asking if the person wants to try to get the mingw32 gcc compiler, however the catch below that is used to go back to retrying the installation uses the variable packF, not try32. Idk if this is a typo because after searching through the batch file, try32 is not mentioned again. Shouldn't the packF variable below it be try 32? |
Correct. Same thing with try64. Never catched because this is practically dead code. |
Next major question, should I still include XP support (the x265 option 6)? Because xp does not have a powershell by default. And the latest I can download is 2.0, while the actual latest is 6.1, with the minimum of the script being 3.0 which is available on 7 and on 8 by default. Like should I keep it, or should I hide it ( still an option, just now shown in the list)? |
I'm right trying to test to see if I can run the script, however, I will not be able to test a 64 bit installation due to my 64 bit xp pro iso not working even though I just ripped it from a dell cd. Edit: It doesn't even have pause. |
The script should not be expected to run on anything older than 8.1. The xp option is for the compiled binaries. |
Okay, next, I looked through the bat script and the only time forceQuitBatch is mentioned outside of the question thing is in a if that is commented out. Is it necessary for me to include this? |
Probably not, that was a questionable workaround for a msys issue. |
So, far, I'm stuck on running the update script because it keeps on saying that I'm missing mintty even though it's clearly installed. One thing I do note is that mintty does not show up in pacman -Qqe. My current problem is that even though it runs the compile script, it seemingly does not run it properly when I try to circumvent using mintty even though everything else seems in order. |
Even when I have mintty set as explicit using pacman -D --asexplicit --noconfirm mintty right before running the script, it still says its not installed. |
Although another thing to note is that also happens when running the bat, so I'm looking in the update script right now to see if it somehow sets mintty as dep. |
Also, I'm not exactly sure on how the licenses work since I've never had an interest in reading up on how GPL and LGPL work but can I include 7Zip4Powershell in the script? It's licenced as LGPL 2.1 while this suite is GPL 3.0. I've tried looking up if I can include a LGPL program/script within a GPL program/script but all the answers were just either look at the license or ask a lawyer and there were no clear answers. I'm slightly assuming yes, but idk at this point. |
It's explicitely in the msyspackages list of packages, so it shouldn't be marked as dependency. By itself, it shouldn't ever be a dependency, since it's one terminal emulator, so nothing should ever depend on it. You can include more liberal licensed programs or libraries inside GPL, yes. |
And yes, you can include 7zip4Powershell, as long as you don't have to install anything to get it. other than Powershell itself. |
I guess a status update is that so far, Its running the compile script, although I so many ugly work around by my standard that I will try to see if I can fix them ( mainly related to how powershell writes stuff to text files with the whole debacle of \r\n and \n, its causing the conf files and mirrorlists for pacman to be deleted through the update script). |
So, was successful. I have ffmpeg along with qsv and nvenc with fdk and others. I also have the other binaries. |
So far so good, only problem is that the pac-* files aren't being written properly by powershell and thus the update script is not reading them correctly, even through the ming($bit).sh is installing them properly. The other problem right now is that when circumventing mintty by running bash within powershell, powershell does not handle ascii colors properly and thus it shows |
Update: I got the ├ to work, only problem now is the colors as powershell can't handle direct ascii colors like mintty does. |
Uhh, I think this might be a problem, Leptonica Not exactly sure, mainly looked into this because my compile keeps on failing due to ./autobuild not existing. |
If anything, it seems to be nearly the exact same file except the third line having |
Actually, nevermind. Didn't see the new changes. I wish github would notify me of any updates to the main repo or automatically pulling it in case there is no conflicts. |
There's RSS and and you can also Follow the repository. |
Is there a reason why the packages are downloaded using the Sw switch for pacman and then installed using S for lines 1304, 1356, and 1390? Would it be possible to just condense them to a single S, or is there something else that relies on the packages being downloaded? |
In short: Windows/NTFS being little babies that can't take a bit of IO use from pacman. |
I see, I've never had much of a problem when installing a few packages using pacman, but then again I've never installed the same amount of packages as the script does at one time. |
Should I add in the option to have it automatically add the bin-video,bin-audio folders to path? |
I do know that it will go against the "just delete the suite folder" idea of removing the suite, but I think that at least a notification of the existence of environment path would probably help for people who have little to no experience with console and just wanted to build ffmpeg with fdk with non-free license such as @ #999 |
It's always a better idea to move/copy the compiled binaries to somewhere else, since they need to be replaced/deleted while building, so they can't be in use by something else. |
Okay, I probably will add that instead. |
So I see,
Does that mean that ffmpeg will look for it in the same folder? |
It needs to be on %PATH%, afaik. So it could be same directory or any other directory that's in %PATH%. If it were *nix, it'd use LD_LIBRARY_PATH or something. |
I see, I'll just copy whatever is in the bin* folders along with the exe while keeping and sub folder structure. I'll just add a notification that it's up to the user to either add the end folder to path or set the final folder to a folder that's already in path. |
So according to the doc linked by @schmidthubert, it seems that it's best to just have the dlls with the executables due to the directory with the executables being the first one searched. So I'll just do the copy the subdirectories with the libraries along with the executables. |
I guess also that way, anytime any of the dlls or executables have been updated, the forced copy will replace the old ones in the final directory. |
Which will fail if they're being used, so try to handle that, if possible. In *nix it works because executables don't get locked while being run. |
I'm going to try to use https://stackoverflow.com/questions/24992681/powershell-check-if-a-file-is-locked and https://beamusupscotty.wordpress.com/2012/11/14/use-powershell-to-find-out-which-process-locks-a-file/ to try to make sure that the files are not in use before copy. |
Just curious, what editor do you guys use? |
Sublime ocasionally and mostly VSCode. |
Is the whole, ending the parenthesis one indention in with the same indentation as the things in between, a quirk of JB? Because since some of the things weren't consistent, it's been slightly annoying. (
echo.echo -ne "\033]0;install base system\007"
echo.msysbasesystem="$(cat /etc/pac-base.pk | tr '\n\r' ' ')"
echo.[[ "$(uname)" = *6.1* ]] ^&^& nargs="-n 4"
echo.echo $msysbasesystem ^| xargs $nargs pacman -Sw --noconfirm --ask=20 --needed
echo.echo $msysbasesystem ^| xargs $nargs pacman -S --noconfirm --ask=20 --needed
echo.echo $msysbasesystem ^| xargs $nargs pacman -D --asexplicit
echo.sleep ^3
echo.exit
)>%build%\pacman.sh vs line 1447-1455 (
echo.echo -ne "\033]0;install 32 bit compiler\007"
echo.mingw32compiler="$(cat /etc/pac-mingw.pk | sed 's;.*;mingw-w64-i686-&;g' | tr '\n\r' ' ')"
echo.[[ "$(uname)" = *6.1* ]] ^&^& nargs="-n 4"
echo.echo $mingw32compiler ^| xargs $nargs pacman -Sw --noconfirm --ask=20 --needed
echo.echo $mingw32compiler ^| xargs $nargs pacman -S --noconfirm --ask=20 --needed
echo.sleep ^3
echo.exit
)>%build%\mingw32.sh |
I think the second one's from me/SublimeText. I've always hated both kinds of indentation. |
Should I do a pr with formatting the indentions to one format? (Parenthesis end on the same column as they began on, or the same style as the second one?) |
I don't know what're the guidelines for batch code, choose whichever you want. |
Afaik, there is no guidelines for batch,I'll format it with the end on the same column as the beginning. |
Continuation of the previous line of question, why is it that only cyanrip2 in line 858 and 859 has "yes" and "no" instead of shorted y and n? I do noticed that you check for yes instead of the y in the compile.sh. Nothing really major affected by this, just wondering why.
The text was updated successfully, but these errors were encountered: