Asdocs seems unable to find embedded assets - apache-flex

I'm running asdocs from a .bat file with flex sdk 3.2.0 (I have replaced my long project root folder with PROJECTROOT):
"C:\Program Files (x86)\Adobe\Flex Builder 3\sdks\3.2.0\bin\asdoc" -source-path . "C:\Program Files (x86)\Adobe\Flex Builder 3\sdks\3.2.0" "_PROJECTROOT_\Components\src" "C:\_PROJECTROOT_\assets" -doc-sources .
PAUSE"
Unforunately, I keep getting errors similar to this:
"_PROJECTROOT_\assets\styles.css(344): Error: Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = "close_button.png")'.
downSkin: Embed(source="close_button.png");"
I really don't understand this as "close_button.png" is in the same folder as styles.css. When I build the project from within flexbuilder, it compiles it fine and does not throw any errors.
Does anyone know what I'm doing wrong?

It's not using your folder with the CSS as the root folder when it's working. It's looking for the assets in the folder you are running the commands from.
Try adding the assets folder to your source path.

I had a similar problem, and an answer I found elsewhere indicated to put a slash at the beginning of the asset path. That is, instead of
Embed(source="close_button.png")
rather
Embed(source="/close_button.png")

Related

Changing path in JVM options Launch4j isn't working

for some reason when i use the full path for the sdk lib the application runs..
--module-path="D:\tools\javafx-sdk-18.0.1\lib" --add-modules=javafx.controls,javafx.fxml,javafx.media
but since i want the application to run on other computers, i copied the lib file which contains javafx.media...etc to the application folder and tried to put the path to it as "lib"..
since it's in the same folder of the exe. but it didn't work..
i tried then to put the full path for the lib which is in the application folder and still it didn't work even tho I provided the whole path..
but when I reput the path "D:\tools\javafx-sdk-18.0.1\lib" it works again..
it feels like my application don't love other paths, he only works with this :(
what should i do ?
I've had much success compiling OS-specific, self-contained runnable programs using this JavaPackager library. It takes a lot of the 'grunt work' out of creating distributable programs from Java.
I solved this problem..
first i needed to copy the whole folder of javafx18.0..etc
not only the lib folder...2ndly when writting the path in Launch4j you must write it like this "../yoururl/" to make the path relative to the app folder...
3rdly i copied all my code and files to NetBeans in Maven project and build it using jlink...i created the runnable jar using eclipse and i converted the jar to exe then put it in the output folder of jlink build including the javafx18..etc
and it worked fine now my app works on all computers...thanks to Slaw who commented. i figured jlink by his help.

Magento2: After delete pub/static folder and making deploy, no css files found

I searched the web, but found no answer that would work:
I use Magento 2 custom theme and when I made changes to .less file, I wanted to compile files, so I deleted pub/static folder and made deploy: php bin/magento setup:static-content:deploy.
After that, no css files are found in pub/static/frontend/<Theme>/default/css.
Also, when I use grunt less, I got errors:
>> Destination pub/static/frontend/Magento/blank/en_US/css/styles-m.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/styles-l.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/email.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/email-inline.css not written because no source files were found.
I am in a developer mode.
Does anyone have any solution for this?
Thank you
I had the same issue, when I did grunt refresh I got the same errors.
To resolve this I removed var/di, var/cache, var/generation, var/page_cache and the contents of pub/static folder (be careful not to remove pub/static/.htaccess).
Then I tried: grunt exec:themename
If successful do, grunt clean
If successful do, grunt refresh
And then, setup:static-content:deploy
This worked for me.
You need to retrieve the file .htaccess from the pub/static folder.
I found it here: https://github.com/magento/magento2/blob/develop/pub/static/.htaccess
*Check the version you use of magento

Temp path too long when publishing a web site project

I am trying to publish an ASP.NET web site project using the Publish Web Site tool but get this error:
ASPNETCOMPILER(0,0): Error ASPRUNTIME: The specified path, file name,
or both are too long. The fully qualified file name must be less than
260 characters, and the directory name must be less than 248
characters.
I see that it is trying to copy the files to a very long path in AppData:
Copying all files to temporary location below for package/publish:
C:\Users\imx0\AppData\Local\Temp\1\WebSitePublish\BMW.Web-424993535\obj\Debug\AspnetCompileMerge\Source.
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /BMW.Web -p C:\Users\imx0\AppData\Local\Temp\1\WebSitePublish\BMW.Web-424993535\obj\Debug\AspnetCompileMerge\Source C:\Users\imx0\AppData\Local\Temp\1\WebSitePublish\BMW.Web-424993535\obj\Debug\AspnetCompileMerge\TempBuildDir
I couldn't find anything about this temp directory in my .pubxml publish profile. How can I change the temporary directory that Visual Studio copies the files to?
Add this to your publish profile to modify the temporary directory for package/publish:
<AspnetCompileMergeIntermediateOutputPath>c:\shortPath\</AspnetCompileMergeIntermediateOutputPath>
Go to your web project folder, navigate to Properties\PublishProfiles folder.
open your profile file profile_name.pubxml (not the profile_name.pubxml.user)
copy/past <AspnetCompileMergeIntermediateOutputPath>c:\shortPath\</AspnetCompileMergeIntermediateOutputPath> under the <PropertyGroup> tag
save your file, you would be able to publish your website using this profil
This is sort of an aside answer, but I ran into this problem when trying to MSBuild a solution that depended on nodeJS and gulp. The problem was that the gulp dependency tree became very deep and the aspnet_compiler was trying to copy that tree to a deeper directory, resulting in this error. I tried everything noted in here but nothing worked.
As it so happened, I was building with TFS, so my solution was to run an attrib +h node_modules\* /S /D before msbuild to hide the directory tree and then attrib +h node_modules\* /S /D. That did it for me.
Sure would be nice if the error thrown in this situation by the compiler revealed the path that caused the write to fail...
try adding this
<IntermediateOutputPath>..\Temp</IntermediateOutputPath>
to the default <propertyGroup />
None of the other answers worked for me.
Visual Studio 2013 Community Edition.
I changed the TMP and TEMP environment variable to a short folder name and it worked.
We identified the lengthy files/folders using this solution, then corrected the issue from there:
Run this script at the command prompt: dir /s /b | sort /r /+261 > out.txt it will output all file paths into the out.txt file
Copy the output to an Excel file
In the next column over from what you pasted in add this Excel function: =LEN(A1) where "A1" is the cell, copy this against every file length so you can see how long the paths are
Sort in Excel by the path length
Identify the lengths over the recommended limit
I know this is a bit long-winded but if you have several files that are resulting in this issue you'll be able to see them all.
Even though the content of node_modules was not included in neither version control not in the *.csprojfile itself Deleting the whole node_modules folder did the trick for me.
You can try the selected solution for correcting the long file path issue.
Still if not able to publish due to some other issue, You can try below method.
=> If the 'Solution Configuration' is in 'Debug' mode, please change the same to 'Release' mode and Publish the files.
=> If the Solution Configuration is in Release mode, and if the problem still persists, please try to delete the dll generated earlier in the 'Release' folder of our project and Publish the project once again.
Any of the above method will solve the issue.
For me, using Visual Studio 2019, the only change to the publish profile .pubxml file that worked was:
<WPPAllFilesInSingleFolder>c:\shortPath\</WPPAllFilesInSingleFolder>
I discovered this property at line 484 of Microsoft.Web.Publishing.targets file. Full path was C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\Web.

mxmlc embedding assets

I'm trying complie my project via mxmlc this way:
[prj_folder]\src>mxmlc mymxml.mxml -library-path+=../libs -sp+=..\assets
and i get such errors:
[prj_folder]\src\view\controls\controlname.mxml(7): Error: Problem finding external st
ylesheet: assets/cssname.css
<fx:Style source="assets/cssname.css"/>
[prj_folder]\src\view\constants\Images.as(24):
col: 3: Error: Unable to transcode
assets/ icons/icon1.png.
how to include assets for the compiler?
Flash Builder preprocesses the files.
For a directory structure like this:
projectdir/src/Main.mxml
projectdir/src/views/SomeView.mxml
projectdir/src/assets/MyImage.png
And if SomeView.mxml references assets/MyImage.png, Flash Builder will allow this:
#Embed('assets/MyImage.png')
because it is preprocessed to /assets/MyImage.png by the IDE, but ant/maven + mxmlc won't do that.
#Embed('/assets/MyImage.png')
works for both Flash Builder and mxmlc.
If you are using a relative path like this:
#Embed('../assets/MyImage.png')
try changing it to this, odd as it may seem:
#Embed('/../assets/MyImage.png')
The leading / gets translated to "my src directory", and mxmlc does the remainder of the path calculation from there.
Hope this helps.
This is a directory setup issue; not a compiler error. And you aren't actually embedding assets; just referencing them.
When using Flash Builder, the file "assets/cssname.css" should be relative to the main application file. I believe the same should occur if you're using the command line compiler.
Does your source directory have an assets subdirectory? Is the cssname.css file inside it?

Qmake does not support build directories below the source directory

I have created an application that compiles and runs like a charm on OS-X. I would now like to start getting it to work on Windows. To start, I copied the project to a windows machine and just tried to compile, but got this error:
:: warning: Qmake does not support build directories below the source directory.
Any ideas?
Set the shadow build directory to some folder on the same level of your project directory:
folder/
project/
project-shadow-build-release/
project-shadow-build-debug/
You can do this in the "Projects" view, via the toolbar on the left. To me, this warning was just an annoyance, a project never failed to build because of it.
Don't copy your project.pro.user file when you are copying a project from one machine to another, or from one directory to another. When you open the project, Qt Creator will offer to create a new build directory in the proper place.
Andref gave the correct answer to resolve this warning, but you may want to understand why this requirement exists.
In fact, the build directory must be at the same folder level as the project (i.e. it can't be above or below). The reason why is that the linker is called from the build directory. Hence, any relative paths to library files will be different than what you entered in your project file.
It kinda sucks. I like to put all intermediate files in their own folder. But you simply can't with qmake.
.pro.user are generated files by Qt Creator. They are unrelated to qmake and should not be touched (and not put into a VCS for that matter)
Just remove the files with the pro.user extension , worked for me
I also got this, trying to compile a project created on linux.
Another way to solve it is to change the paths in the .pro.user file (in the directory of your project)
Right Click on a project: Set As Active Project
Click on the Projects button (The one with the spanner image)
Edit build configuration : Debug / Profile / Release / and change the default directories, OR just uncheck the Shadow build check box.
The Build directory path should now change to black, from red

Resources