On 12/29/2014 12:00 AM, Tapani Pälli wrote:
> 
> 
> On 12/23/2014 04:25 AM, Chad Versace wrote:
>> On 12/21/2014 08:06 AM, Emil Velikov wrote:
>>> On 17 December 2014 at 13:12, Tapani Pälli <[email protected]> wrote:
>>>> Signed-off-by: Tapani Pälli <[email protected]>
>>>> ---
>>>>   .gitignore              |  2 ++
>>>>   examples/CMakeLists.txt | 30 ++++++++++++++++++++++++++++++
>>>>   examples/gl_basic.c     | 17 +++++++++++++++++
>>>>   examples/index.html     | 39 +++++++++++++++++++++++++++++++++++++++
>>>>   4 files changed, 88 insertions(+)
>>>>   create mode 100644 examples/index.html



>>>> +
>>>> +    # install index.html that loads gl_basic_nacl.nmf
>>>> +    file(INSTALL index.html DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
>>>> +
>>> If the following works, can we use it to be consistent with the rest of 
>>> waffle ?
>>>
>>> install(
>>>      FILES index.html
>>>      DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
>>>      )
>>>
>>
>> The `file(INSTALL ...)` command is new to me, but if I understand the CMake
>> docs correctly, it behaves differently than the `install(FILES ...)` command.
>> The `install` command doesn't install the file until you run `make install`.
>> The `file(INSTALL ...)` command installs the file immediately (but, um,
>> I'm unsure exactly when "immediately" is).
>>
>> If I'm reading the patch right, index.html needs to be in the correct 
>> location
>> during build time, not at install time.
>>
>> NaCl is still really new to me. So I don't know what the best thing to do is
>> with the auxillary json and manifest files. But I am sure that putting a file
>> named 'index.html' into $WAFFLE_BUILD_DIR/bin is the wrong thing to do, 
>> because
>> that precludes the possibility of adding additional NaCl apps to the build
>> system due to filename conflicts.
> 
> The intention was to have gl_basic_nacl.nexe, gl_basic_nacl.nmf and 
> index.html as output of the build in a single directory so that user can pick 
> them up from there. I'm not sure if bin is correct place either. My suspicion 
> is that any user would anyway copy them to where web server is serving it's 
> content, not to /usr/bin or such. Any advice appreciated here, should I 
> create a new output directory?

I think a new output directory makes the most sense. Perhaps like this:

  $WAFFLE_TOP/html/gl_basic_nacl/
    | gl_basic_nacl.nexe
    | gl_basic_nacl.nmf
    | index.html
  $WAFFLE_TOP/html/future_foo_nacl/
    | future_foo_nacl.nexe
    | future_foo_nacl.nmf
    | index.html

Do you see any problems in or improvements to that layout?



>>>> +
>>>> +# 
>>>> ----------------------------------------------------------------------------
>>>>   # Target: gl_basic (executable)
>>>>   # 
>>>> ----------------------------------------------------------------------------
>>>>
>>>> diff --git a/examples/gl_basic.c b/examples/gl_basic.c
>>>> index fb62d52..371e423 100644
>>>> --- a/examples/gl_basic.c
>>>> +++ b/examples/gl_basic.c
>>>> @@ -508,8 +508,16 @@ removeXcodeArgs(int *argc, char **argv)
>>>>
>>>>   #endif // __APPLE__
>>>>
>>>> +#ifdef __native_client__
>>>> +#include "ppapi_simple/ps_main.h"
>>>> +int basic_test_main(int argc, char **argv);
>>>> +PPAPI_SIMPLE_REGISTER_MAIN(basic_test_main)
>>>> +int
>>>> +basic_test_main(int argc, char **argv)
>>>> +#else
>>>>   int
>>>>   main(int argc, char **argv)
>>>> +#endif
>>
>> Bear with my NaCl-ignorant question.
>>
>> Why do you rename main to basic_test_main? They have the same signature.
>> Is it because the NaCl runtime already defines a symbol named main?
> 
> Yes, this is because I use the ppapi_simple to minimize nacl specific 
> changes. It has main() defined.

Ok. Then please add a small comment explaining that inside the #ifdef.


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
waffle mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to