webosose / ares-cli

ares-cli is a command-line interface(CLI) for webOS
Apache License 2.0
38 stars 17 forks source link

Bundle assets into the .ipk #82

Closed subhanahmed047 closed 2 years ago

subhanahmed047 commented 2 years ago

I'm trying to create an ipk file. my appinfo.json looks like this:

{
  "id": "test",
  "version": "1.0.0",
  "vendor": "My Company",
  "type": "web",
  "main": "index.html",
  "title": "Test",
  "icon": "icon.png",
  "largeIcon": "largeIcon.png"
}

In the same folder, I have an index.html which looks like this:

<!DOCTYPE html>
<html>
  <head>
    <title>Test app</title>
  </head>
  <body>
    <video autoplay muted>
      <source
        src="./video.mp4"
        type="video/mp4"
        width="100vw"
        height="100vh"
      />
    </video>
  </body>
</html>

as you can see I have a video.mp4 file sitting next to the index.html.

I realised that creating a package using ares-package ./test creates the .ipk file but it doesn't bundle the video file within the package.

I was wondering if there is a way to bundle assets along with the index.html in an LG package?

ssuminahn commented 2 years ago

@subhanahmed047

I tested with your code and confirmed that the ipk was created successfully and the mp4 file is also included in the ipk. And that ipk was installed and the app was launched fine. Also the video was played fine.

Do you have a video.mp4 file in the destination directory you want to package? There should be an mp4 file in the folder as shown below.

$ tree test test ├── appinfo.json ├── icon.png ├── index.html └── video.mp4 0 directories, 4 files

Please check your code and directory structure once more.