[1.2] Scanning for resources
I am having some trouble scanning for the resources in the data folder. Using the Leadwerks version.
I have the default SDK. I am running the command tool. I tried several commands but nothing seems to be picked up by the tool.
Odd thing is it worked a month ago. Now, resources are no longer detected.
Any clues?
I have the default SDK. I am running the command tool. I tried several commands but nothing seems to be picked up by the tool.
Odd thing is it worked a month ago. Now, resources are no longer detected.
Any clues?
Re: Scanning for resources
Hi,
You are using the latest beta where the new architecture for resources has been incorporated. The wrapper for LeadWerks is yet not updated, sorry for that. I am in contact with the developer that helped us in the past with that part and we expect to have it updated very soon.
Meanwhile, the new process is relatively easy. If you execute the command without parameters you will get the help:
At execution time noesisGUI needs to know where the preprocessed resources are located. This can be configured by using the helper class LocalResourceProvider.
LocalResourceProvider inherits from ResourceProvider, a base class with several virtual functions that can be reimplemented to customize how resources are loaded. For example, if you used the -header switch with the BuildTool, you must provide a memory stream this way:
You are using the latest beta where the new architecture for resources has been incorporated. The wrapper for LeadWerks is yet not updated, sorry for that. I am in contact with the developer that helped us in the past with that part and we expect to have it updated very soon.
Meanwhile, the new process is relatively easy. If you execute the command without parameters you will get the help:
Code: Select all
> Resource.BuildTool.exe
------------------------------------------------------------------------------
Build Tool - noesisGUI Importer v0.90
------------------------------------------------------------------------------
Usage:
BuildTool filename [options]
BuildTool directory [options]
Options:
-platform platform
Target platform used to build input resources
-outdir directory
Output folder where imported resources will be copied
-tempdir directory
Temporary folder for intermediate files
-modstamp
Do not run if target file is older than source
-header
Generates a c-header file instead of a binary one
-deps
In this mode only XAML files and their dependencies,
like images and fonts, are processed
-verbose
Increases verbosity
Registered platforms:
DX9
DX11
GL
GLES
iOS
Android
Code: Select all
// Look for resources in "MyData" folder located in the current working directory
Ptr<ResourceProvider> provider = *new LocalResourceProvider("MyData");
NsGetSystem<IResourceSystem>()->AddProvider(provider.GetPtr());
Code: Select all
namespace
{
#include "Button.xaml.h"
}
class MyProvider: public ResourceProvider
{
private:
Ptr<Core::IStream> RequestFile(const NsChar* name)
{
if (String::Compare(name, "Button.xaml", IgnoreCase_True) == 0)
{
return *new MemoryStreamR(Button_xaml, sizeof(Button_xaml));
}
}
};
Re: Scanning for resources
Specifying your own location is a nice improvement.
Are all the options obligated? because I am having some trouble getting the resources build.
Are all the options obligated? because I am having some trouble getting the resources build.
Re: Scanning for resources
Everything is optional. For example, to import a xaml:
should work using the default platform and generating the output in the out directory.
What problems are you getting? Being a beta, is time to improve all the usability problems.
Code: Select all
Resource.Importer Button.xaml
What problems are you getting? Being a beta, is time to improve all the usability problems.
Re: Scanning for resources
Ups... You posted already your scenario.
The problem is that you are using --platform instead of -platform.
I had that error so many times that I wonder if we should support both formats....
The problem is that you are using --platform instead of -platform.
I had that error so many times that I wonder if we should support both formats....
Re: [1.2] Scanning for resources
Thanks,
I think I used 2 stripes because it says so in the docs:
http://www.noesisengine.com/docs/Gui.Core.SDKGuide.html
http://www.noesisengine.com/docs/Resour ... dTool.html
I think I used 2 stripes because it says so in the docs:
http://www.noesisengine.com/docs/Gui.Core.SDKGuide.html
You know how to build .xaml files and generate a cache that can be used at runtime. If not, read the BuildTool document. For these samples we will be using data from the Gui/Tutorials package. It is mandatory that you build those resources for the desired platforms.
> Resource.BuildTool.exe scan Gui/Tutorials --platform DX9
> Resource.BuildTool.exe build Gui/Tutorials --platform DX9
> Resource.BuildTool.exe scan Gui/Tutorials --platform GL
> Resource.BuildTool.exe scan Gui/Tutorials --platform GL
http://www.noesisengine.com/docs/Resour ... dTool.html
Re: [1.2] Scanning for resources
The online documentation is in sync with the latest stable release. You need to use the documentation contained inside the zip for the v1.2 version. There are many things yet not updated there, although the BuildTool document was already reviewed.
Anyway, I think that BuildTool should continue using -- for its switches. Will be changed for the next release.
Thanks!
Anyway, I think that BuildTool should continue using -- for its switches. Will be changed for the next release.
Thanks!
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 2 guests