Can someone help me understand the difference between the AssetBundleBuild.addressableNames and AssetBundleBuild.assetNames?
Also can I use BuildPipeline.BuildAssetBundles with AssetBundleBuild[] parameter to build specific asset bundles and not all of them (the overload without this parameter) ?
AssetBundleBuild.assetNames identifies the exact location and name for bundling an asset. (assume buildMap is of type AssetBundleBuild)
buildMap[0].assetNames[0] = "Assets/Textures/stinky_pupper_smol.jpg";
AssetBundleBuild.addressableNames is an optional nickname for loading the asset its array index corresponds to.
buildMap[0].addressableNames[0] = "DogTexture";
That's all done during build time so during runtime you can load that texture like this (assume bundle is of type AssetBundle):
bundle.LoadAsset("DogTexture");
instead of:
bundle.LoadAsset("Assets/Textures/stinky_pupper_smol.jpg");
For your second question, yes. The overload of BuildPipeline.BuildAssetBundles with an AssetBundleBuild[] as an argument will ignore your bundles identified in the editor:
This variant of the function lets you specify the names and contents
of the bundles using a "build map" rather than with the details set in
the editor. The map is simply an array of AssetBundleBuild objects,
each of which contains a bundle name and a list of the names of asset
files to be added to the named bundle.
Related
I'm using the Object Manager in order to add a few products from a csv (based on https://magecomp.com/blog/import-product-data-programmatically-magento-2/ ). So far everything is working and my images are temporarily stored in "var/tempImages/". When I pass that path into:
//$img is my path to "product.jpg", etc.
->setImage($img)
->setSmallImage($img)
->setThumbnail($img)
Images are not loading at all (doubled checked, they're in said path).
Any pointers on what could be missing to correctly map the path to image (or if I'm in something completely different).
Thanks.
How can I get the file name of an image from a SharePoint 2013 Asset Library?
I am trying to write a JQuery/REST snippet to search a subset of images within the library, based on their other column values and display them. I would use FileLeafRef in case of a Document Library, but I couldn't find an equivalent field in Asset Library.
I so far tried the following, neither returns file name:
https:///crm/_api/Web/Lists/GetByTitle('Publication%20List')/items?select=File/Name&expand=File
https:///crm/_api/Web/Lists/GetByTitle('Publication%20List')/items?select=FileLeafRef
There is a typo in your example, in particular $ symbol is missing for $select and $expand query options (more details).
The following rest endpoints demonstrate how to retrieve file name from Assets library:
1) Using FileLeafRef property:
/_api/web/lists/getByTitle('<list title>')/items?$select=FileLeafRef
2) Using File/Name property:
/_api/web/lists/getbytitle('<list title>')/items?$select=File/Name&$expand=File
3) Using Folder/Files property:
/_api/web/getfolderbyserverrelativeurl('<list url>')/files?$select=Name
I believe that yt's still FileLeafRef for an Asset Library. Any chance you could put the relevant code in your question?
Here's the rest endpoint for FileLeafRef:
/_api/web/lists/getByTitle('<list title>')/items?$select=FileLeafRef
Alternatively you could always use the File Name property:
/_api/web/lists/getByTitle('<list title>')/items?$select=File/Name&$expand=File
I would like to map pages such domain/content/myProject/home.html to domain/home.html. /content/myProject/ is not needed. I have the following code:
String newpath = getResourceResolver().map(page.getPath());
this does not change anything. newpath is stay page.getPath()
how to solve this issue?
Answering as this question as it remains unanswered. Here is an example of how the etc mappings should look like:
Trick is you add 2 entries to sling:internalRedirect as / and /content/example/
AEM first tries to resolve resources with first entry '/'. So non page URLs like /etc/designs, /content/dam etc will be addressed by the first entry. If it is unable to resolve using the first one, it uses the second entry to resolve the page.
This is also the adobe recommended way for URL shortening compared to other techniques like apache redirect.
You need to create map in etc.Then Resource Resolver will take care of trimming the path .
CREATING MAPPING DEFINITIONS IN AEM
In a standard installation of AEM you can find the folder:
/etc/map/http
This is the structure used when defining mappings for the HTTP protocol. Other folders (sling:Folder) can be created under /etc/map for any other protocols that you want to map.
Configuring an Internal Redirect to /content
To create the mapping that prefixes any request to http://localhost:4503/ with /content:
Using CRXDE navigate to /etc/map/http.
Create a new node:
Type sling:Mapping
This node type is intended for such mappings, though its use is not mandatory.
Name localhost_any
Click Save All.
Add the following properties to this node:
Name sling:match
Type String
Value localhost.4503/
Name sling:internalRedirect
Type String
Value /content/
Click Save All.
This will handle a request such as:
localhost:4503/geometrixx/en/products.html
as if:
localhost:4503/content/geometrixx/en/products.html
had been requested.
You can refer here for further documentation http://docs.adobe.com/docs/en/cq/5-6-1/deploying/resource_mapping.html
I have a txt file that is holding a string inside, I want to be able to use this string in one of my scripts, so I'm wondering if there is a way to set the content of the file as one of the build properties or parameters which I'll be able to use in my scripts it should be the same as using one of the build environment properties.
For example : ${JOB_NAME} which is holding the the job name, so in the same way I want to access the content of the file which is holding some value inside.
Is it possible?
You can upload a file from your computer to the workspace through the File parameter of the job.
You can use Extended Choice plugin parameter, to read value(s) from a file and display them in a dropdown/radio-button/checkbox for the user to select, dynamically, every time the build is triggered.
You can use EnvInject plugin to read value(s) from a file and inject them into the build as environment variables, so that they can be used by the rest of the build steps/scripts.
Your question is very unclear on what your are trying to do. Pick one of the 3 methods above based on what you need, or clarify your question.
Where can I find information on how to modify these
${EXECUTABLE_NAME}
${PRODUCT_NAME}
These are only displayed in .plist file but where are the actual values.
If we can directly modify what ever we want in .plist why we need these.
I am new that's why I'm having problem understanding these, I also looked into apple information Property list key reference but didn't find these ${} values.
The PRODUCT_NAME is defined in the target's Build Settings in the Packaging section. It has the same name by default as your project.
Edit:
While PRODUCT_NAME is by default the name of the Target (MyDemoApp in this case). The EXECUTABLE_NAME is a concatenation of:
$EXECUTABLE_PREFIX, $PRODUCT_NAME and $EXECUTABLE_SUFFIX.
See the reference of EXECUTABLE_NAME for details.
Update
The new reference can be found here http://help.apple.com/xcode/mac/8.3/#/itcaec37c2a6
EXECUTABLE_NAME
Specifies the name of the binary the target produces.
I think the $ represents the variable productName & executableName as the $ is used in unix. The variables are set in the build setting of the application. So you should not change the product name directly in the plist file. Instead, go to build settings, search for product name and change it.
Xcode ${<variable_name>} syntax
Xcode variable can be defined on different level and the Resolved one is used. You can use Build Settings -> Levels tab to manage it
All variables are listen in Build Settings. Also every setting has it's own declaration
Product Name - PRODUCT_NAME
These setting are saved in buildSettings block of
<project_name>.xcodeproj/project.pbxproj
You can use Search view to find any variable and Help Inspector to find declaration and other useful information
Some of settings are not exposed by Xcode
EXECUTABLE_NAME
But you are able to get or even to override the value using User-Defined Settings
reader_EXECUTABLE_NAME = $(EXECUTABLE_NAME)
EXECUTABLE_NAME = $EXECUTABLE_PREFIX$PRODUCT_NAME$EXECUTABLE_SUFFIX
[SWIFT_MODULE_NAME, PRODUCT_MODULE_NAME, PRODUCT_NAME, EXECUTABLE_NAME]
[TARGET_NAME]
Specifically about how ${PRODUCT_NAME} gets defined in terms of order:
It's originally defaulted to the target's name: $(TARGET_NAME)
You can reset it in 'build settings' by searching for Product Name
Note: If any value was derived off of ${PRODUCTS_NAME} and you change it to some-constant-value then it's no longer going to be a computed value.
e.g. if you change the value of CFBundleName from its default ${PRODUCT_NAME} to something like My cool App then your app's name on the springboard will show up as 'My cool App'. It will no longer show up as 'whatever your target's name is'