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

Where is the package installed finally? #4

Closed
neilyoung opened this issue Apr 19, 2021 · 28 comments
Closed

Where is the package installed finally? #4

neilyoung opened this issue Apr 19, 2021 · 28 comments

Comments

@neilyoung
Copy link

I'm using this setup in conjunction with Github actions on a Windows-2016 VM. From the log it seems, that gstreamer is installed, but I have no clue, where.

This is traced during install:

PATH environment variable does not have %GSTREAMER_1_0_ROOT_MSVC_X86_64%\bin in it. Adding...
2021-04-19T21:36:13.3656614Z   gstreamer may be able to be automatically uninstalled.
2021-04-19T21:36:13.3782494Z Environment Vars (like PATH) have changed. Close/reopen your shell to
2021-04-19T21:36:13.3784672Z  see the changes (or in powershell/cmd.exe just type `refreshenv`).
2021-04-19T21:36:13.5192783Z  The install of gstreamer was successful.
2021-04-19T21:36:13.5197072Z   Software installed as 'msi', install location is likely default.

But while examining the PATH later I can't find any trace of gstreamer.

Any pointer appreciated.

@jmcker
Copy link
Owner

jmcker commented Apr 19, 2021

Are you installing with a different user than when you run gstreamer? The chocolateyInstall.ps1 script currently adds to the user's path since it expands the GSTREAMER_1_0_ROOT_MSVC_X86_64 variable set by the MSI. It won't be set for the non-install user if you have one.

@neilyoung
Copy link
Author

Hi Jack, thanks for the quick answer.

Well, I don't really know honestly. At least I'm not changing the user willingly. My Github workflow looks basically like so:

name: Build Windows

on: 
  push:
    branches:
      - master

jobs:
  build:
    runs-on: windows-2016
  
    steps:
      
      # Install GStreamer
      - name: Install GStreamer
        run: |
          choco install gstreamer

      # Dump log 
      - name: Check path
        shell: powershell
        run: |
          refreshenv;
          echo $env:Path;
          Get-Content -Path C:\ProgramData\chocolatey\logs\chocolatey.log;

The log says:

Chocolatey v0.10.15
Installing the following packages:
gstreamer
By installing you accept licenses for the packages.

Progress: Downloading gstreamer 1.18.4... 11%
Progress: Downloading gstreamer 1.18.4... 34%
Progress: Downloading gstreamer 1.18.4... 58%
Progress: Downloading gstreamer 1.18.4... 81%
Progress: Downloading gstreamer 1.18.4... 100%

gstreamer v1.18.4 [Approved]
gstreamer package files install completed. Performing other installation steps.
Downloading gstreamer 64 bit
  from 'https://gstreamer.freedesktop.org/data/pkg/windows/1.18.4/msvc/gstreamer-1.0-msvc-x86_64-1.18.4.msi'
Progress: 100% - Completed download of C:\Users\runneradmin\AppData\Local\Temp\chocolatey\gstreamer\1.18.4\gstreamer-1.0-msvc-x86_64-1.18.4.msi (104.75 MB).
Download of gstreamer-1.0-msvc-x86_64-1.18.4.msi (104.75 MB) completed.
Hashes match.
Installing gstreamer...
gstreamer has been installed.

PATH environment variable does not have %GSTREAMER_1_0_ROOT_MSVC_X86_64%\bin in it. Adding...
  gstreamer may be able to be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The install of gstreamer was successful.
  Software installed as 'msi', install location is likely default.

Chocolatey installed 1/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

The final "echo $env:Path" gives (no trace of GStreamer or so):

C:\Users\runneradmin\.dotnet\tools;C:\Program Files\MongoDB\Server\4.4\bin;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS\;C:\tools\zstd;C:\Program Files\Mercurial\;C:\hostedtoolcache\windows\stack\2.5.1\x64;C:\tools\ghc-9.0.1\bin;C:\Program Files\dotnet;C:\mysql-5.7.21-winx64\bin;C:\Program Files\R\R-4.0.5\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Rust\.cargo\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\pipx_bin;C:\hostedtoolcache\windows\go\1.15.11\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin;C:\hostedtoolcache\windows\Java_Adopt_jdk\8.0.282-8\x64\bin;C:\aliyun-cli;C:\npm\prefix;C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI;C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\kind;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Chocolatey\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Docker;C:\Program Files\PowerShell\7\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.3\bin;C:\Program Files (x86)\sbt\bin;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;c:\tools\php;C:\Program Files\TortoiseSVN\bin;C:\SeleniumWebDrivers\ChromeDriver\;C:\SeleniumWebDrivers\EdgeDriver\;C:\Program Files\CMake\bin;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Amazon\SessionManagerPlugin\bin\;C:\Program Files\Amazon\AWSSAMCLI\bin\;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps

At least it appears in the choco log, but just as an attempt as it seems:

2021-04-20T05:59:11.4793809Z 2021-04-20 05:58:46,685 3348 [DEBUG] - Running Set-EnvironmentVariable -Name 'Path' -Value 'C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.dotnet\tools;C:\Program Files\MongoDB\Server\4.4\bin;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS\;C:\tools\zstd;C:\Program Files\Mercurial\;C:\hostedtoolcache\windows\stack\2.5.1\x64;C:\tools\ghc-9.0.1\bin;C:\Program Files\dotnet;C:\mysql-5.7.21-winx64\bin;C:\Program Files\R\R-4.0.5\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Rust\.cargo\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\pipx_bin;C:\hostedtoolcache\windows\go\1.15.11\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin;C:\hostedtoolcache\windows\Java_Adopt_jdk\8.0.282-8\x64\bin;C:\aliyun-cli;C:\npm\prefix;C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI;C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\kind;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Chocolatey\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Docker;C:\Program Files\PowerShell\7\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.3\bin;C:\Program Files (x86)\sbt\bin;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;c:\tools\php;C:\Program Files\TortoiseSVN\bin;C:\SeleniumWebDrivers\ChromeDriver\;C:\SeleniumWebDrivers\EdgeDriver\;C:\Program Files\CMake\bin;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Amazon\SessionManagerPlugin\bin\;C:\Program Files\Amazon\AWSSAMCLI\bin\;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\runneradmin\.dotnet\tools;C:\Program Files\MongoDB\Server\4.4\bin;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS\;C:\tools\zstd;C:\Program Files\Mercurial\;C:\hostedtoolcache\windows\stack\2.5.1\x64;C:\tools\ghc-9.0.1\bin;C:\Program Files\dotnet;C:\mysql-5.7.21-winx64\bin;C:\Program Files\R\R-4.0.5\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Rust\.cargo\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\pipx_bin;C:\hostedtoolcache\windows\go\1.15.11\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin;C:\hostedtoolcache\windows\Java_Adopt_jdk\8.0.282-8\x64\bin;C:\aliyun-cli;C:\npm\prefix;C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI;C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\kind;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\Chocolatey\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Docker;C:\Program Files\PowerShell\7\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.3\bin;C:\Program Files (x86)\sbt\bin;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;c:\tools\php;C:\Program Files\TortoiseSVN\bin;C:\SeleniumWebDrivers\ChromeDriver\;C:\SeleniumWebDrivers\EdgeDriver\;C:\Program Files\CMake\bin;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Amazon\SessionManagerPlugin\bin\;C:\Program Files\Amazon\AWSSAMCLI\bin\;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps;%GSTREAMER_1_0_ROOT_MSVC_X86_64%\bin;' -Scope 'User' 

jmcker added a commit that referenced this issue Apr 20, 2021
Add action for troubleshooting #4
jmcker added a commit that referenced this issue Apr 20, 2021
@jmcker
Copy link
Owner

jmcker commented Apr 20, 2021

It looks like this was an issue with refreshenv not doing what it implies unless it's aliased to the helper provided by Chocolatey.

# Setup and use the Chocolatey helpers
Import-Module "${ENV:ChocolateyInstall}\helpers\chocolateyProfile.psm1";
Update-SessionEnvironment;
#refreshenv; # This now also works, but Update-SessionEnvironment might reduce confusion

I initially thought actions also wasn't saving the environment changes between steps, but this commit and this run seem to indicate that it works without the manual saving. If you need it, the bit that I wrote for that is still here. It might be nicer since you can keep the install/path logic contained in a single step and don't need Update-SessionEnvironment later.

The actual path to bin ends up being C:\gstreamer\1.0\msvc_x86_64\bin.

@neilyoung
Copy link
Author

Yes, indeed. That does the trick :) Thank you very much for this hint(s).

Maybe I'm allowed to ask, if you plan to provide the DEV version setup too, maybe by command line switch? Or should I "simply" fork and patch this project? I'm not familiar with choco at all, so I don't know anything about their deployment processes.

@neilyoung
Copy link
Author

@jmcker
Copy link
Owner

jmcker commented Apr 20, 2021

I can have the MinGW and MinGW development packages up some time tonight or tomorrow. It's been on my TODO list anyway.

I believe @Sean-Der pushed gstreamer-devel for the MSVC development files awhile ago. That's sitting at 1.16.2 if that works for you, but I believe it's MSVC and not MinGW.

Would you willing to add me as a maintainer to the package on Chocolatey @Sean-Der? I can automate pushing all the versions while I get MinGW set up.

@neilyoung
Copy link
Author

I believe @Sean-Der pushed gstreamer-devel for the MSVC development files awhile ago. That's sitting at 1.16.2 if that works for you, but I believe it's MSVC and not MinGW.

Yes, it's MSVC.

I can have the MinGW and MinGW development packages up some time tonight or tomorrow. It's been on my TODO list anyway.

That would be absolutely awesome and very much appreciated.

Thanks in advance.

@Sean-Der
Copy link

@jmcker done! did that work?

@neilyoung
Copy link
Author

It might be nicer since you can keep the install/path logic contained in a single step and don't need Update-SessionEnvironment later.

Made the opposite experience right now: Did run gst-launch in a subsequent step. Wasn't found until I added the Update-SessionEnvironment again. Makes sense?

@neilyoung
Copy link
Author

... but there is also a little drawback with this approach (the extra Update-SessionEnvironment): It kills other env settings somehow. At least a successful Java setup does not work any longer, if this is called before. I'm preparing a workflow

@jmcker
Copy link
Owner

jmcker commented Apr 20, 2021

Made the opposite experience right now: Did run gst-launch in a subsequent step. Wasn't found until I added the Update-SessionEnvironment again. Makes sense?

The gst-launch is visible in line 6 and line 269 of step 3 in the earlier run. There's just the single Update-SessionEnvironment after choco install gstreamer in the first step. That seemed to be working.

@neilyoung
Copy link
Author

Yes, I have seen that too, but hmm... Let me create something to demonstrate :)

@neilyoung
Copy link
Author

neilyoung commented Apr 20, 2021

OK, here is the workflow.

name: Test

on: 
  push:
    branches:
      - master


jobs:
  build:
    runs-on: windows-2016
  
    steps:
      
      # Install GStreamer
      - name: Install GStreamer
        run: |
          choco install gstreamer;
          Import-Module "${ENV:ChocolateyInstall}\helpers\chocolateyProfile.psm1";
          Update-SessionEnvironment;

 
      # Install JDK
      - name: Install Open JDK 11
        uses: actions/setup-java@v2
        with:
          distribution: 'adopt' 
          java-version: '11'
      
      - name: Test
        shell: powershell
        run: |    
          #Import-Module "${ENV:ChocolateyInstall}\helpers\chocolateyProfile.psm1";
          #Update-SessionEnvironment;

          Get-ChildItem env:;
          ${ENV:Path}.Split(';');

          java --version;
          gst-launch-1.0 --gst-version;
          echo "${ENV:GSTREAMER_1_0_ROOT_MSVC_X86_64}\bin"
          echo "${ENV:GSTREAMER_DIR}"
          echo "${ENV:JAVA_HOME}"

If I comment Update-SessionEnvironment in the Test run, the Java call passes, but there is no GST entry in env. If I uncomment it again, the env is correct, but the Java call fails. Catch 22 :)

But it can also be, that I'm doing something stupid here.

EDIT:.... there is no GST entry.... and the gstreamer call does not pass.

EDIT 2: Sorry for the hassle...

@neilyoung
Copy link
Author

Maybe my bad: Missing "shell: powershell" in the install GStreamer step... checking

@neilyoung
Copy link
Author

Hmm. No. Even this (no Java) does not work for me. The Java error is OK, but gst is also not there :(


name: Test

on: 
  push:
    branches:
      - master


jobs:
  build:
    runs-on: windows-2016
  
    steps:

      # # Install JDK
      # - name: Install Open JDK 11
      #   uses: actions/setup-java@v2
      #   with:
      #     distribution: 'adopt' 
      #     java-version: '11'

      # Install GStreamer
      - name: Install GStreamer
        shell: powershell
        run: |
          choco install gstreamer;
          Import-Module "${ENV:ChocolateyInstall}\helpers\chocolateyProfile.psm1";
          Update-SessionEnvironment;
      
      - name: Test
        shell: powershell
        run: |    
          #Import-Module "${ENV:ChocolateyInstall}\helpers\chocolateyProfile.psm1";
          #Update-SessionEnvironment;

          Get-ChildItem env:;
          ${ENV:Path}.Split(';');

          java --version;
          gst-launch-1.0 --gst-version;
          echo "${ENV:GSTREAMER_1_0_ROOT_MSVC_X86_64}\bin"
          echo "${ENV:JAVA_HOME}"
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: --version
gst-launch-1.0 : The term 'gst-launch-1.0' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
again.


@jmcker
Copy link
Owner

jmcker commented Apr 20, 2021

I think you're missing the vital line after Update-SessionEnvironment:

# Save PATH for future steps
Write-Output "${ENV:PATH}" | Out-File -FilePath "${ENV:GITHUB_PATH}" -Encoding utf8

# You can also do this manually, but risk that the environment variable name changes
# This has already changed once during the 1.18.0 release
# https://github.com/jmcker/ChocolateyPackages/commit/6dff4a1ae842fbbe43942865a2ad421b00b3abd4
# echo "${ENV:GSTREAMER_1_0_ROOT_MSVC_X86_64}\bin" | Out-File -FilePath "${ENV:GITHUB_PATH}" -Encoding utf8 -Append;

That updates the contents of the file located at ${ENV:GITHUB_PATH}, which Actions restores PATH from before each step. If you set it in the first step immediately after install/Update-SessionEnvironment, I think Actions will take care of restoring PATH with the updated value before each step, including the Test step.

https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path

@neilyoung
Copy link
Author

Oh, sorry. Didn't notice that. Thanks for finding that. Will try tomorrow, but I'm sure it will work. Looking forward for your MINGW package :)

@jmcker
Copy link
Owner

jmcker commented Apr 21, 2021

gstreamer-mingw and gstreamer-mingw-devel are published. They'll take a bit to pass moderation, but you should be able to install by specifying the --version=1.18.4 and possibly the --pre flags.

The devel packages have a dependency on the normal runtime package, so you should only need to install the devel package if you want everything.

@neilyoung
Copy link
Author

Thanks Jack, cool.

To return to the previous issue (the problem with Java), I regret, I can't make that run. This workflow does finally resolve the gst-launch-1.0 call, but the Java call is failing. I'm also missing the GSTREAMER_1_0_ROOT_MSVC_X86_64 in the second run.

name: Test

on: 
  push:
    branches:
      - master


jobs:
  build:
    runs-on: windows-2016
  
    steps:

      # Install JDK
      - name: Install Open JDK 11
        uses: actions/setup-java@v2
        with:
          distribution: 'adopt' 
          java-version: '11'

      # Install GStreamer
      - name: Install GStreamer
        shell: powershell
        run: |
          choco install gstreamer;
          # Setup and use the Chocolatey helpers
          Import-Module "${ENV:ChocolateyInstall}\helpers\chocolateyProfile.psm1";
          Update-SessionEnvironment;
          Get-ChildItem env:;
          ${ENV:Path}.Split(';');
          # Save PATH for future steps
          Write-Output "${ENV:PATH}" | Out-File -FilePath "${ENV:GITHUB_PATH}" -Encoding utf8
      
      - name: Test
        shell: powershell
        run: |    
          Get-ChildItem env:;
          ${ENV:Path}.Split(';');
          
          # Test GStreamer
          gst-launch-1.0 --gst-version;
          echo "${ENV:GSTREAMER_1_0_ROOT_MSVC_X86_64}\bin"

          # Test Java
          echo "${ENV:JAVA_HOME}"
          java --version;

The result in Test is:

GStreamer Core Library version 1.18.4
\bin
C:\hostedtoolcache\windows\Java_Adopt_jdk\11.0.10-9\x64
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: --version

If I drop the entire GStreamer installation and path magic, then Java is accessible in the second step:


name: Test

on: 
  push:
    branches:
      - master


jobs:
  build:
    runs-on: windows-2016
  
    steps:

      # Install JDK
      - name: Install Open JDK 11
        uses: actions/setup-java@v2
        with:
          distribution: 'adopt' 
          java-version: '11'

      
      - name: Test
        shell: powershell
        run: |    
          echo "${ENV:JAVA_HOME}"
          java --version;

Run echo "${ENV:JAVA_HOME}"
  echo "${ENV:JAVA_HOME}"
  java --version;
  shell: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.EXE -command ". '{0}'"
  env:
    JAVA_HOME: C:\hostedtoolcache\windows\Java_Adopt_jdk\11.0.10-9\x64
C:\hostedtoolcache\windows\Java_Adopt_jdk\11.0.10-9\x64
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

@neilyoung
Copy link
Author

The devel packages have a dependency on the normal runtime package, so you should only need to install the devel package if you want everything.

@jmcker Where do you think would the normal runtime be installed to?

@jmcker
Copy link
Owner

jmcker commented Apr 21, 2021

I would assume C:\gstreamer\1.0\mingw_x86_64\bin based on the MSVC installs inside Actions and the installations that I've done locally. The process should be the same as before for adding to PATH.

@neilyoung
Copy link
Author

That's true, the files are there. I can't see, if those are debug or retail versions or if both versions are there. I will check on a real windows system, what the layout of the directories is, if both versions are installed.

Here is how it looks on GA:


    Directory: C:\gstreamer\1.0\mingw_x86_64\bin


Mode                LastWriteTime         Length Name                                                                  
----                -------------         ------ ----                                                                  
-a----        1/18/2021   1:55 PM       93583311 avcodec-58.dll                                                        
-a----        1/18/2021   1:55 PM        1459872 avfilter-7.dll                                                        
-a----        1/18/2021   1:55 PM       33654178 avformat-58.dll                                                       
-a----        1/18/2021   1:55 PM        4249209 avutil-56.dll                                                         
-a----        3/16/2021  10:38 AM           2096 gdbus-codegen                                                         
-a----        3/16/2021  10:38 AM         554138 gdbus.exe                                                             
-a----       10/29/2020   5:34 AM         405842 gdk-pixbuf-csource.exe                                                
-a----       10/29/2020   5:34 AM         441104 gdk-pixbuf-query-loaders.exe                                          
-a----        3/16/2021  10:46 AM         635612 ges-launch-1.0.exe                                                    
-a----        3/16/2021  10:38 AM         410467 gio-querymodules.exe                                                  
-a----        3/16/2021  10:38 AM         506877 glib-compile-resources.exe                                            
-a----        3/16/2021  10:38 AM         556344 glib-compile-schemas.exe                                              
-a----        3/16/2021  10:38 AM          40981 glib-genmarshal                                                       
-a----        3/16/2021  10:38 AM           5548 glib-gettextize                                                       
-a----        3/16/2021  10:38 AM          29213 glib-mkenums                                                          
-a----        3/16/2021  10:38 AM         411268 gresource.exe                                                         
-a----        3/16/2021  10:38 AM         445048 gsettings.exe                                                         
-a----        3/16/2021  10:41 AM         439322 gst-device-monitor-1.0.exe                                            
-a----        3/16/2021  10:41 AM         470244 gst-discoverer-1.0.exe                                                
-a----        3/16/2021  10:40 AM         578349 gst-inspect-1.0.exe                                                   
-a----        3/16/2021  10:40 AM         490165 gst-launch-1.0.exe                                                    
-a----        3/16/2021  10:41 AM         558924 gst-play-1.0.exe                                                      
-a----       10/29/2020   5:49 AM           1303 gst-shell                                                             
-a----        3/16/2021  10:40 AM         419190 gst-typefind-1.0.exe                                                  
-a----        3/16/2021  10:46 AM         458787 gst-validate-1.0.exe                                                  
-a----        3/16/2021  10:46 AM           2071 gst-validate-launcher                                                 
-a----        3/16/2021  10:46 AM         408991 gst-validate-media-check-1.0.exe                                      
-a----        3/16/2021  10:46 AM         405559 gst-validate-rtsp-server-1.0.exe                                      
-a----        3/16/2021  10:46 AM         463050 gst-validate-transcoding-1.0.exe                                      
-a----       10/29/2020   5:42 AM         410034 json-glib-format.exe                                                  
-a----       10/29/2020   5:42 AM         404198 json-glib-validate.exe                                                
-a----       10/29/2020   5:43 AM         619184 liba52-0.dll                                                          
-a----       10/29/2020   5:34 AM        1662133 libass-9.dll                                                          
-a----       10/29/2020   4:54 AM         660205 libbz2.dll                                                            
-a----       10/29/2020   5:44 AM        9719463 libcairo-2.dll                                                        
-a----       10/29/2020   5:44 AM         428611 libcairo-gobject-2.dll                                                
-a----       10/29/2020   5:44 AM        1254875 libcairo-script-interpreter-2.dll                                     
-a----       10/29/2020   5:10 AM         377610 libcharset-1.dll                                                      
-a----       10/29/2020   5:42 AM        1610532 libcroco-0.6-3.dll                                                    
-a----        1/18/2021   1:36 PM       13154318 libcrypto-1_1-x64.dll                                                 
-a----       10/29/2020   5:16 AM         678837 libdca-0.dll                                                          
-a----       10/29/2020   5:43 AM         881999 libdv-4.dll                                                           
-a----       10/29/2020   5:26 AM        1171695 libdvdnav-4.dll                                                       
-a----       10/29/2020   5:14 AM         901682 libdvdread-4.dll                                                      
-a----       10/29/2020   5:12 AM        1162120 libexpat-1.dll                                                        
-a----       10/29/2020   4:54 AM         552276 libffi-7.dll                                                          
-a----       10/29/2020   5:37 AM        2829524 libFLAC-8.dll                                                         
-a----       10/29/2020   5:29 AM        1788157 libfontconfig-1.dll                                                   
-a----       10/29/2020   5:23 AM        4624097 libfreetype-6.dll                                                     
-a----       10/29/2020   5:12 AM         627587 libfribidi-0.dll                                                      
-a----       10/29/2020   4:53 AM        1279744 libgcc_s_seh-1.dll                                                    
-a----       10/29/2020   5:34 AM        2242921 libgdk_pixbuf-2.0-0.dll                                               
-a----        3/16/2021  10:46 AM        5631343 libges-1.0-0.dll                                                      
-a----        3/16/2021  10:38 AM       12447574 libgio-2.0-0.dll                                                      
-a----        3/16/2021  10:38 AM        7281096 libglib-2.0-0.dll                                                     
-a----        3/16/2021  10:38 AM         439261 libgmodule-2.0-0.dll                                                  
-a----        3/16/2021  10:38 AM        2349170 libgobject-2.0-0.dll                                                  
-a----       10/29/2020   5:16 AM        1841106 libgraphene-1.0-0.dll                                                 
-a----        3/16/2021  10:44 AM         730381 libgstadaptivedemux-1.0-0.dll                                         
-a----        3/16/2021  10:41 AM         432147 libgstallocators-1.0-0.dll                                            
-a----        3/16/2021  10:41 AM         678262 libgstapp-1.0-0.dll                                                   
-a----        3/16/2021  10:41 AM        3145751 libgstaudio-1.0-0.dll                                                 
-a----        3/16/2021  10:44 AM         616383 libgstbadaudio-1.0-0.dll                                              
-a----        3/16/2021  10:40 AM        2829015 libgstbase-1.0-0.dll                                                  
-a----        3/16/2021  10:44 AM         500812 libgstbasecamerabinsrc-1.0-0.dll                                      
-a----        3/16/2021  10:40 AM        1057644 libgstcheck-1.0-0.dll                                                 
-a----        3/16/2021  10:44 AM        3051966 libgstcodecparsers-1.0-0.dll                                          
-a----        3/16/2021  10:44 AM         931468 libgstcodecs-1.0-0.dll                                                
-a----        3/16/2021  10:40 AM         807315 libgstcontroller-1.0-0.dll                                            
-a----        3/16/2021  10:41 AM         679431 libgstfft-1.0-0.dll                                                   
-a----        3/16/2021  10:41 AM        3228209 libgstgl-1.0-0.dll                                                    
-a----        3/16/2021  10:44 AM         459300 libgstinsertbin-1.0-0.dll                                             
-a----        3/16/2021  10:44 AM         512194 libgstisoff-1.0-0.dll                                                 
-a----        3/16/2021  10:44 AM        1048630 libgstmpegts-1.0-0.dll                                                
-a----        3/16/2021  10:40 AM         844806 libgstnet-1.0-0.dll                                                   
-a----        3/16/2021  10:41 AM        1507795 libgstpbutils-1.0-0.dll                                               
-a----        3/16/2021  10:44 AM         460809 libgstphotography-1.0-0.dll                                           
-a----        3/16/2021  10:44 AM         926862 libgstplayer-1.0-0.dll                                                
-a----        3/16/2021  10:40 AM        7460278 libgstreamer-1.0-0.dll                                                
-a----        3/16/2021  10:41 AM         578239 libgstriff-1.0-0.dll                                                  
-a----        3/16/2021  10:41 AM        1089709 libgstrtp-1.0-0.dll                                                   
-a----        3/16/2021  10:41 AM        1053517 libgstrtsp-1.0-0.dll                                                  
-a----        3/16/2021  10:45 AM        2623918 libgstrtspserver-1.0-0.dll                                            
-a----        3/16/2021  10:44 AM         397298 libgstsctp-1.0-0.dll                                                  
-a----        3/16/2021  10:41 AM         823191 libgstsdp-1.0-0.dll                                                   
-a----        3/16/2021  10:41 AM        1576172 libgsttag-1.0-0.dll                                                   
-a----        3/16/2021  10:44 AM         515480 libgsttranscoder-1.0-0.dll                                            
-a----        3/16/2021  10:44 AM         489131 libgsturidownloader-1.0-0.dll                                         
-a----        3/16/2021  10:46 AM        2518843 libgstvalidate-1.0-0.dll                                              
-a----        3/16/2021  10:41 AM        4292786 libgstvideo-1.0-0.dll                                                 
-a----        3/16/2021  10:44 AM         620632 libgstwebrtc-1.0-0.dll                                                
-a----        3/16/2021  10:38 AM         373233 libgthread-2.0-0.dll                                                  
-a----       10/29/2020   5:48 AM       38626888 libharfbuzz-0.dll                                                     
-a----       10/29/2020   5:11 AM        1942876 libiconv-2.dll                                                        
-a----       10/29/2020   4:53 AM         383092 libintl-8.dll                                                         
-a----       10/29/2020   5:21 AM        2391906 libjpeg-8.dll                                                         
-a----       10/29/2020   5:42 AM        1268912 libjson-glib-1.0-0.dll                                                
-a----       10/29/2020   5:25 AM         855879 libkate-1.dll                                                         
-a----       10/29/2020   5:20 AM         624439 libmms-0.dll                                                          
-a----       10/29/2020   5:34 AM        1869564 libmp3lame-0.dll                                                      
-a----       10/29/2020   5:36 AM        2073925 libmpg123-0.dll                                                       
-a----       10/29/2020   5:29 AM        2849425 libnice-10.dll                                                        
-a----       10/29/2020   5:09 AM         437737 libogg-0.dll                                                          
-a----       10/29/2020   5:25 AM         388742 liboggkate-1.dll                                                      
-a----       10/29/2020   6:09 AM        1613552 libopencore-amrnb-0.dll                                               
-a----       10/29/2020   6:10 AM         862461 libopencore-amrwb-0.dll                                               
-a----       10/29/2020   5:13 AM        9061194 libopenh264-6.dll                                                     
-a----       10/29/2020   5:12 AM        2651962 libopenjp2.dll                                                        
-a----       10/29/2020   5:09 AM        2849520 libopus-0.dll                                                         
-a----       10/29/2020   5:12 AM        3006366 liborc-0.4-0.dll                                                      
-a----       10/29/2020   5:12 AM         501839 liborc-test-0.4-0.dll                                                 
-a----       10/29/2020   5:49 AM        1831257 libpango-1.0-0.dll                                                    
-a----       10/29/2020   5:49 AM         801994 libpangocairo-1.0-0.dll                                               
-a----       10/29/2020   5:49 AM         903257 libpangoft2-1.0-0.dll                                                 
-a----       10/29/2020   5:49 AM         931010 libpangowin32-1.0-0.dll                                               
-a----       10/29/2020   5:08 AM        9823780 libpixman-1-0.dll                                                     
-a----       10/29/2020   5:08 AM        2141261 libpng16-16.dll                                                       
-a----       10/29/2020   5:08 AM           2411 libpng16-config                                                       
-a----       10/29/2020   5:34 AM         450543 libpsl-5.dll                                                          
-a----        1/18/2021   1:38 PM        2231817 librsvg-2-2.dll                                                       
-a----       10/29/2020   5:29 AM         910808 librtmp-1.dll                                                         
-a----       10/29/2020   5:14 AM         757292 libsbc-1.dll                                                          
-a----       10/29/2020   5:10 AM        1215723 libSoundTouch-1.dll                                                   
-a----       10/29/2020   5:43 AM        4612357 libsoup-2.4-1.dll                                                     
-a----       10/29/2020   5:41 AM        3215032 libspandsp-2.dll                                                      
-a----       10/29/2020   5:32 AM         902555 libspeex-1.dll                                                        
-a----       10/29/2020   5:35 AM        5270372 libsqlite3-0.dll                                                      
-a----       10/29/2020   5:30 AM       14158517 libsrt.dll                                                            
-a----       10/29/2020   5:13 AM        1202436 libsrtp2-1.dll                                                        
-a----        1/18/2021   1:36 PM        4158942 libssl-1_1-x64.dll                                                    
-a----       10/29/2020   4:53 AM       19373548 libstdc++-6.dll                                                       
-a----       10/29/2020   5:40 AM       17019466 libtag.dll                                                            
-a----       10/29/2020   5:26 AM        1814951 libtheora-0.dll                                                       
-a----       10/29/2020   5:26 AM         974939 libtheoradec-1.dll                                                    
-a----       10/29/2020   5:26 AM        1399865 libtheoraenc-1.dll                                                    
-a----       10/29/2020   5:33 AM        3185207 libtiff-5.dll                                                         
-a----       10/29/2020   5:21 AM        2626094 libturbojpeg-0.dll                                                    
-a----       10/29/2020   5:12 AM        3818337 libusrsctp-1.dll                                                      
-a----       10/29/2020   5:25 AM        2074053 libvisual-0.4-0.dll                                                   
-a----       10/29/2020   5:29 AM        1126430 libvo-aacenc-0.dll                                                    
-a----       10/29/2020   5:22 AM        1091643 libvorbis-0.dll                                                       
-a----       10/29/2020   5:22 AM        1181222 libvorbisenc-2.dll                                                    
-a----       10/29/2020   5:22 AM         493204 libvorbisfile-3.dll                                                   
-a----       10/29/2020   5:39 AM        1110688 libwavpack-1.dll                                                      
-a----       10/29/2020   5:13 AM        9760991 libwebrtc_audio_processing-0.dll                                      
-a----       10/29/2020   4:53 AM         551881 libwinpthread-1.dll                                                   
-a----        1/18/2021   1:30 PM       12903115 libx264-157.dll                                                       
-a----       10/29/2020   5:28 AM        7368170 libxml2-2.dll                                                         
-a----       10/29/2020   4:53 AM         695053 libz-1.dll                                                            
-a----       10/29/2020   5:26 AM        2078608 libzbar-0.dll                                                         
-a----       10/29/2020   5:12 AM         426984 orc-bugreport.exe                                                     
-a----       10/29/2020   5:12 AM         472490 orcc.exe                                                              
-a----       10/29/2020   4:53 AM        3427016 pkg-config.exe                                                        
-a----        1/18/2021   1:55 PM         855580 swresample-3.dll                                                      
-a----       10/29/2020   5:28 AM           1946 xml2-config                                                           
-a----       10/29/2020   5:28 AM         664468 xmllint.exe                                                           


@neilyoung
Copy link
Author

neilyoung commented Apr 21, 2021

Hmm. I see no match between the GA version's bin directory and the layout of a devel installation on a Windows system.
In the choco installation I see a mix of lib and bin to bin.
I have attached the tree from both systems.

tree_windows_home.txt

tree_github_actions.txt

The directory layout of both installations is very different. I don't really understand, why.

@neilyoung
Copy link
Author

Your package has been removed for formal reasons. Any plans to reactivate that? It worked very well...

@jmcker
Copy link
Owner

jmcker commented Jun 16, 2021

Yeah it failed to pass review. I need to uninstall the entry that gets added to PATH, but I've been hesitant to do it because I've seen a bunch of other people attempt and end up mangling people's paths. I was hoping Chocolatey would implement it officially, but chocolatey/choco#1663 and chocolatey/choco#310 seem a bit stuck. I should be able to get to it in the next couple days.

@neilyoung
Copy link
Author

Thanks for the confirmation. Since the refusal broke my CI process I worked around by using the MSI install.

FYI like so:


     - name: Install gstreamer (Windows only) via MSI until choco install works again
        if: matrix.os == 'windows-latest'
        shell: powershell
        run: |
          # GStreamer installation via MSI (MinGW version, devel and retail)
          (New-Object System.Net.WebClient).DownloadFile('https://gstreamer.freedesktop.org/data/pkg/windows/1.18.4/mingw/gstreamer-1.0-mingw-x86_64-1.18.4.msi', 'gstreamer-1.0-mingw-x86_64-1.18.4.msi');
          (New-Object System.Net.WebClient).DownloadFile('https://gstreamer.freedesktop.org/data/pkg/windows/1.18.4/mingw/gstreamer-1.0-devel-mingw-x86_64-1.18.4.msi', 'gstreamer-1.0-devel-mingw-x86_64-1.18.4.msi');
          Start-Process msiexec.exe -Wait -Verbose -ArgumentList '/I gstreamer-1.0-mingw-x86_64-1.18.4.msi /qn /passive INSTALLDIR="C:\gstreamer"';
          Start-Process msiexec.exe -Wait -Verbose -ArgumentList '/I gstreamer-1.0-devel-mingw-x86_64-1.18.4.msi /qn /passive INSTALLDIR="C:\gstreamer"';
          
          # Update path
          echo "C:\gstreamer\1.0\mingw_x86_64\bin" >> "${env:GITHUB_PATH}"
          

@jmcker
Copy link
Owner

jmcker commented Aug 5, 2021

I finally got back to this @neilyoung. The new packages are awaiting review now.

I added some better output/logging that should also make it clearer where the package gets installed.

I'm glad the MSI worked! The INSTALLDIR argument seems nice. I might add that at some point.

@neilyoung
Copy link
Author

Cool. Thanks for letting me know

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