bilelmoussaoui / flatpak-vscode

Integrate Flatpak with VSCode
MIT License
91 stars 13 forks source link

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

Open ThubLives opened 7 months ago

ThubLives commented 7 months ago

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 commented 7 months ago
    {
      "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 commented 7 months ago

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 commented 5 months ago

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