RBuster's Forum Posts

  • > Mon Sep 19, 2016 10:11 pm

    > The problem is that is an offline project ...

    >

    > ...because is the file that will be updated on the server ...

    >

    Sorry about that. I meant: on the folder.

    > CSV files that contains "name" and "path", like the file that I have included in the example.

    >

    > Your Example:

    > Videos.csv (one line..)

    >

    > "path"= \videos\video.mp4

    > & anime is "name"..of what? ..folder?..sub-folder?

    > because it certainly is not the name of the video...

    >

    > you want to show in list anime & Play video.mp4 ??!

    >

    > ..nevermind..

    >

    Yes, "anime" is just a name. I would like to show "anime" in the list and play video.mp4 or anime.mp4 when the user click in this item.

    Here's how to separate CSV data..

    listCSV.capx

    Thanks. I will give it a try.

  • Up

  • Thank you for this solution and for all the explanation,

    The problem is that is an offline project (CD/DVD). In this demonstration that I'm developing to a possible client, the user will can see a video or image preview and play sounds, clicking in the list items. They intend to use a program that capture the folder content and convert it to the CSV files that contains "name" and "path", like the file that I have included in the example. This is the main reason that I insisting in to use a CSV file.

  • Up

  • Thanks It's very nice but the problem is that I need the application reads the CSV because is the file that will be updated on the server. Can I use this solution with the CSV file instead the array?

  • Tha Ajax read CSV file. I don't know how to separate the two columns items, showing the 1st item (name) in the list and when the user click on it, open the video referent to the path (2nd item).

    Simple example: https://www.dropbox.com/s/8t5qru7m7487o ... .capx?dl=0

  • Thanks

    This tutorial is very didactic. Do you know how can I get the "nodes" from my XML? This XML was generated by a program that capture the folder's content and save it in excel format. I can read the file now and include all this data in the list, but I need to isolate a specific content of this XML. (e.g.. "anime" to appear in the list and "\videos\anime.avi" to load and show the video).

    EDITED: Can I use this solution with a CSV file instead a XML? (I think I will need to change XML plugin for another)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for all the suggestions. I have checked it and I think the solution is to use XML plugin with Ajax and use tokenat to populate the list. But something is wrong in my script because the list keeps empty:

    or maybe the problem is my XML file:

    <?xml version="1.0"?>
    <?mso-application progid="Excel.Sheet"?>
    <?fr-application created="FastReport"?>
    <?fr-application homesite="http://www.fast-report.com"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
     xmlns:o="urn:schemas-microsoft-com:office:office"
     xmlns:x="urn:schemas-microsoft-com:office:excel"
     xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
     xmlns:html="http://www.w3.org/TR/REC-html40">
    <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
    <Title></Title>
    <Author></Author>
    <Version>...</Version>
    </DocumentProperties>
    <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
    <ProtectStructure>False</ProtectStructure>
    <ProtectWindows>False</ProtectWindows>
    </ExcelWorkbook>
    <Worksheet ss:Name="ReportPage1">
    <Table ss:ExpandedColumnCount="3" ss:ExpandedRowCount="9" x:FullColumns="1" x:FullRows="1">
    <Column ss:AutoFitWidth="0" ss:Width="94.49"/>
    <Column ss:AutoFitWidth="0" ss:Width="354.33"/>
    <Row ss:Height="13.08">
    <Cell ss:Index="1" >
    <Data ss:Type="String">anime</Data>
    </Cell>
    <Cell ss:Index="2" >
    <Data ss:Type="String">\videos\anime.avi</Data>
    </Cell>
    <Cell ss:Index="3" />
    </Row>
    <Row ss:Height="13.08">
    <Cell ss:Index="1" >
    <Data ss:Type="String">anime</Data>
    </Cell>
    <Cell ss:Index="2" >
    <Data ss:Type="String">\videos\anime.flv</Data>
    </Cell>
    <Cell ss:Index="3" />
    </Row>
    <Row ss:Height="13.08">
    <Cell ss:Index="1" >
    <Data ss:Type="String">green</Data>
    </Cell>
    <Cell ss:Index="2" >
    <Data ss:Type="String">\videos\green.avi</Data>
    </Cell>
    <Cell ss:Index="3" />
    </Row>
    <Row ss:Height="13.08">
    <Cell ss:Index="1" >
    <Data ss:Type="String">green</Data>
    </Cell>
    <Cell ss:Index="2" >
    <Data ss:Type="String">\videos\green.flv</Data>
    </Cell>
    <Cell ss:Index="3" />
    </Row>
    <Row ss:Height="13.08">
    <Cell ss:Index="1" >
    <Data ss:Type="String">Mov</Data>
    </Cell>
    <Cell ss:Index="2" >
    <Data ss:Type="String">\videos\Mov.avi</Data>
    </Cell>
    <Cell ss:Index="3" />
    </Row>
    <Row ss:Height="13.08">
    <Cell ss:Index="1" >
    <Data ss:Type="String">Mov</Data>
    </Cell>
    <Cell ss:Index="2" >
    <Data ss:Type="String">\videos\Mov.flv</Data>
    </Cell>
    <Cell ss:Index="3" />
    </Row>
    <Row ss:Height="13.08">
    <Cell ss:Index="1" >
    <Data ss:Type="String">life</Data>
    </Cell>
    <Cell ss:Index="2" >
    <Data ss:Type="String">\videos\life.avi</Data>
    </Cell>
    <Cell ss:Index="3" />
    </Row>
    <Row ss:Height="13.08">
    <Cell ss:Index="1" >
    <Data ss:Type="String">life</Data>
    </Cell>
    <Cell ss:Index="2" >
    <Data ss:Type="String">\videos\life.flv</Data>
    </Cell>
    <Cell ss:Index="3" />
    </Row>
    </Table>
    <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
    <PageSetup>
    <PageMargins x:Bottom="0.38" x:Left="0.38" x:Right="0.38" x:Top="0.38"/>
    </PageSetup>
    </WorksheetOptions>
    </Worksheet>
    </Workbook>[/code:d72d3346]
  • I intend to create a demonstration that will be used to show and preview graphic/sound files that will stored in distinct folders.

    Is it possible to read a XML file and show different lists (according with the media) that the user can select the item and see or listen a preview? If so, can someone explain to me what I need to do to get it working?

    Anyone knows how can I populate a XML file with the folders content, automatically?

    Thanks in advance.

  • I forgot to write that for both files the .desktop and the program you have to set the permissions:

    sudo chmod 777 'name of file'

    RBuster

    There is a standard path for the .desktop: /usr/share/applications. Where to put the program is up to you, mostly in usr/bin or bin. There are some sort of installer for that, but I think is not easy at all. You could make a debian apt package for example. There are tutorials for that. And there is ZeroInstall for portable apps http://0install.net/.

    I've never done this so I cant really help you.

    I will try the ZeroInstall because it seems more accessible for my limited knowledge. Thank you for all your effort to help me with this issue.

  • Asmodean

    Thank you so much for your time.

    I'm afraid about the paths that I need to define in the .desktop file since the objective of this project is to distribute the game's package in DVD. I would have to include all the options for DVD-ROM drives as well as hard disk drives, because the users can copy the DVD content to their HD.

  • The desktop route is (almost) impossible, because it's different for every linux distribution. It typically works the other way round: Linux distro maintainers will pull open source software from the developer's repositories and integrate them into their mechanism. Your way, distributing commercial software in binary form, is a fringe case. It's not typical.

    There are no commercial programs that work on every distro's desktop, they typically concentrate on one or two and let the users themselves deal with the rest. That's one of the reasons why linux is so small outside the server world.

    I would just let the customer start via terminal and be done with it.

    Thanks for all the explanations. I really know nothing about the Linux.

    As to your second question: I have no idea about the links.

    In the application that you open through the terminal you will find several buttons among them: image1/image2/Sound. When I try to open these assets through the application, nothing happens, but I can do it normally in the windows versions. Do you know why I cannot do the same in the Linux version?

    Taking advantage of your patience, I wonder if you think that is better if I will create a browser version to the Linux users. The problem is that application needs to work in offline mode. In this case, the user will need to access the app online in the first time and use the offline cache in the next times, right?

  • But if I want to execute from the desktop I will need to create an installer or put all the files on the desktop? And about the problem of the links that is not working when I use the terminal to open the application? Did you figure out what's happening?

  • Sorry RBuster I saw your post only now. Does it work now, or do you still need help?

    Thanks for the reply.

    The problem was that I tried to use a 32 bits executable in a 64 bits Linux.

    But I still have problems:

    • I'm using a xml to load images, text and a sound file that I 've imported to the Project Files and that are in the folder's root with the "nw" file. When I click to load one of these assets, nothing happens.
    • I really need that the "nw" file can be executed through the file manager. Now the application opens only through the terminal.

    Thanks in advance.

  • RBuster

    I checked your demo.

    The thing on linux is: shared libraries (something like a .dll on windows) can be executable too, depending on how they are programmed. The file managers try to identify those by various methods and hide the executable options on them.

    The problem is: the way modern executables are compiled those file managers sometimes misinterpret and have false positives. This is typically no problem, because, unlike on windows, people do not browse to a directory with a file manager and execute stuff there. You run your stuff either through your desktop environment (start menu entries or whatever the specific linux distribution offers for its own software), or by terminal.

    The file manager that I have tested (thunar) falls for the nw-executable too and does not offer to execute it. There is probably no way to get this to work reliably, because of the way chromium is required to be built.

    If your customer requires this: drop the customer

    Thanks for the reply.

    So I cannot have an executable file exported from C2 with NW.js working on linux? is it?