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

Archive source types don't seem to be extracted before executing build-commands #233

Open
ThubLives opened this issue Feb 29, 2024 · 3 comments

Comments

@ThubLives
Copy link

Using the same manifest with this module entry:

    {
      "name": "audio-data-packs",
      "buildsystem": "simple",
      "sources": [
        {
          "type": "archive",
          "url": "http://prdownloads.sourceforge.net/exult/exult_audio.zip",
          "sha256": "72e10efa8664a645470ceb99f6b749ce99c3d5fd1c8387c63640499cfcdbbc68"
        }
      ],
      "build-commands": [
        "mkdir -p ${FLATPAK_DEST}/share/exult/data/music",
        "cp * ${FLATPAK_DEST}/share/exult/data",
        "cp * ${FLATPAK_DEST}/share/exult/data/music"
      ]
    }

When using flatpak-builder on the command line, it seems to extract and execute the build-commands entries just fine, but using the "Flatpak: Build" command within this vscode extension, the first cp command fails to find any files. The files don't appear to have been extracted into a folder in the .flatpak/flatpak-builder/build/ directory.

Flatpak output:

Stopping at module audio-data-packs
Everything cached, checking out from cache
Pruning cache
>>> flatpak-spawn --host --watch-bus flatpak build --share=network --filesystem=/home/thub/build/info.exult.Exult --filesystem=/home/thub/build/info.exult.Exult/.flatpak/repo --env=PATH=/app/bin:/app/bin:/app/bin:/usr/bin:/home/thub/.var/app/com.visualstudio.code-oss/data/node/bin:/home/thub/.var/app/com.visualstudio.code-oss/data/cargo/bin:/home/thub/.var/app/com.visualstudio.code-oss/data/python/bin:/app/bin:/usr/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig /home/thub/build/info.exult.Exult/.flatpak/repo mkdir -p /app/share/exult/data/music
>>> flatpak-spawn --host --watch-bus flatpak build --share=network --filesystem=/home/thub/build/info.exult.Exult --filesystem=/home/thub/build/info.exult.Exult/.flatpak/repo --env=PATH=/app/bin:/app/bin:/app/bin:/usr/bin:/home/thub/.var/app/com.visualstudio.code-oss/data/node/bin:/home/thub/.var/app/com.visualstudio.code-oss/data/cargo/bin:/home/thub/.var/app/com.visualstudio.code-oss/data/python/bin:/app/bin:/usr/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig /home/thub/build/info.exult.Exult/.flatpak/repo cp * /app/share/exult/data
cp: cannot stat '*': No such file or directory
>>> Error: Child process exited with code 1

Also note that the git source builds and installs fine; the destination paths exist and the mkdir command makes sure of it. Also a file source has a similar cp command and it works fine, though it isn't using a wildcard for the source file.

@SeaDve
Copy link
Collaborator

SeaDve commented Feb 29, 2024

    {
      "name": "audio-data-packs",
      "buildsystem": "simple",
      "sources": [
        {
          "type": "archive",
          "url": "http://prdownloads.sourceforge.net/exult/exult_audio.zip",
          "sha256": "72e10efa8664a645470ceb99f6b749ce99c3d5fd1c8387c63640499cfcdbbc68"
        }
      ],
      "build-commands": [
        "mkdir -p ${FLATPAK_DEST}/share/exult/data/music",
        "cp * ${FLATPAK_DEST}/share/exult/data",
        "cp * ${FLATPAK_DEST}/share/exult/data/music"
      ]
    }

Is this the last manifest entry? Also, can you show the full manifest so we can reproduce it?

@ThubLives
Copy link
Author

ThubLives commented Mar 1, 2024

Yes, this is the last module. See the attached JSON.
Also note that building outside of vscode does result in a launchable, but incomplete app. The "exult.cfg" file is also needed, but you can just create an empty file. I haven't figured out how to get the app to see it yet.

info.exult.Exult.json

@bilelmoussaoui
Copy link
Owner

Yes, this is the last module. See the attached JSON. Also note that building outside of vscode does result in a launchable, but incomplete app. The "exult.cfg" file is also needed, but you can just create an empty file. I haven't figured out how to get the app to see it yet.

info.exult.Exult.json

Usually you should put your app as the last module, that is a requirement for the extension to be able to do anything useful

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