airsdk / apm

AIR Package Manager
https://repository.airsdk.dev/
MIT License
60 stars 10 forks source link

aspectRatio and depthAndStencil get removed from description file #90

Closed jimmymjing closed 2 years ago

jimmymjing commented 2 years ago

Hi, I generated the description file but found the aspectRatio was missing from initalWindow section. Is there a way to add it? I need to set it to landscape. Thanks. I'd also need to set depthAndStencil to true, and set autoOrients value.

marchbold commented 2 years ago

Did you set a template for the app descriptor in config/application-descriptor.xml ? If you set this file then the app descriptor is completely regenerated from this file each time, rather than reading the output as the template.

jimmymjing commented 2 years ago

I just created the application-descriptor.xml file, as follows:

<application xmlns="http://ns.adobe.com/air/application/33.1">
    <versionLabel>0.2.0</versionLabel>
    <initialWindow>
        <aspectRatio>landscape</aspectRatio>
        <autoOrients>false</autoOrients>
        <fullScreen>true</fullScreen>
        <depthAndStencil>true</depthAndStencil>
    </initialWindow>    
</application>

But when I tried to generate the final description file, I was getting the error ⣷ Updating app descriptor ApplicationDescriptorGenerationProcess:: tag not found

I'm satisfied with the APM generated description XML file. Only versionLabel, aspectRatio, autoOrients, fullScreen and depthAndStencil are missing.

marchbold commented 2 years ago

Sorry if I wasn't clear, I was saying "don't" use the config/application-descriptor.xml.

If you set depthAndStencil and aspectRatio in your main app xml, they shouldn't be modified.

jimmymjing commented 2 years ago

This is really strange... My original app.xml had depthAndStencil and aspectRatio set, and it did get removed... the original XML also had com.distriqt.Memory in the extensions section which also got removed.

marchbold commented 2 years ago

Hmm, something sounds amiss there. Extensions should never get removed. At a guess there may have been a format issue in your original xml that caused an issue? Do you have access to the original xml, could you send it to me for testing at all?

Is it working now?

jimmymjing commented 2 years ago

Yes. I can send the original xml to you. https://www.dropbox.com/s/4oo0vxiu71mkw5i/aaa-app.xml?dl=0

marchbold commented 2 years ago

Perfect thanks, I'll have a look at it.

marchbold commented 2 years ago

Everything looks okay with it, ran it through apm here and no issues. Format seems okay .

Not sure what could have happened.

How are you running the generate command? Are you specifying the output to this file directly?

eg

apm generate app-descriptor src/aaa-app.xml
jimmymjing commented 2 years ago

yes. That's exactly the command that I executed

jimmymjing commented 2 years ago

I just manually added back the missing things into the description file, and now it works as expected.

marchbold commented 2 years ago

Was there a chance that you had a config/application-descriptor.xml file when you ran it the first time? That's the only thing I can think of that would cause this behaviour.

jimmymjing commented 2 years ago

I'm pretty sure there's no such file. Anyways, something weird happened. I will keep my eyes on it and report it if it happens again.

marchbold commented 2 years ago

Okay great, let me know if you figure out how to replicate it.