Corona Win32 beta app build issues

Hello,

We have been using Corona Win32 Beta build since its release and has been working great for us.

From Nov 18, we are facing following problems in the generated Win32 app:

  1. When the newly created Win32 app is launched, it is ignoring the “CompanyName” in the path created in the AppData space. i.e. Instead of using .\AppData\Roaming\<CompanyName>\<AppName>\Documents as the documents directory, it is using .\AppData\Roaming\<AppName>\Documents as the documents directory.

  2. It is using the default Corona SDK icon instead of the Icon-win32.ico file

We have followed all the guidelines in https://docs.coronalabs.com/daily/guide/distribution/win32Build/index.html. We are using 2015.2072 build on Windows 7 and 8 PCs.  We have tried latest build also and still see the same issue.

Regards,

Samir Jain

I just re-tested this with daily build #2772.  The company name is definitely working for me.  And I even tried a company name containing spaces, symbols ($%@!&… etc.), and Unicode characters (Japanese, Korean, etc.).  The built EXE always created a subdirectory with that company name under the AppData\Roaming\ directory.

This may sound like a stupid question, but are you sure the EXE you are running is the one you just built?  As in it’s not an old version of your EXE?  You can verify by deleting your last built Win32 app directory (or renaming the folder) and the building it again in the Corona Simulator.  Click the “View in Explorer” button in the dialog that pops-up after the build finishes successfully to go to where your Win32 application has just been built.

Yes we are using the EXE that we build (we delete the Win32 app directory everytime before we build). We tried on build #2072 as well as #2775.  The entire process was working seamlessly before. Only from last 5-6 days we are facing this problem.

One more strange observation that we see: The generated exe file’s “Date modified” as shown in Windows Explorer is an old date (i.e. Aug 27, 2015). This date is same as the date of Corona.App.exe inside C:\Program Files (x86)\Corona Labs\Corona SDK\Resources\AppTemplates\Win32\Templates.zip.    The exe is running our code only and other things look normal - except this directory name issue.

The reason it is giving problem: code update is failing for us. We save app state in the app sandbox area. Previous version of our app is having our state within AppData\Roaming\CompanyName\AppName directory. While this version is looking for AppData\Roaming\AppName directory.

I will try 2772 also today.

>> One more strange observation that we see: The generated exe file’s “Date modified” as shown in Windows Explorer is an old date (i.e. Aug 27, 2015).

Well there’s your problem.  That means you’re definitely *not* using the EXE that just got built.  You’re still running the old one.

The Corona Simulator will automatically delete the destination directory before copying over the newly built Win32 app.  You don’t have to delete the folder yourself.  If the Corona Simulator is unable to delete the old folder, then it’ll display a build error instead.  For example, if you attempt to build to this directory while you’re running your Win32 app in the same directory, you’ll get a build error stating that the files are locked in the directory… which is the correct/expected behavior.

Is your destination directory synchronized with a cloud based service such as DropBox or OneDrive?  If so, then perhaps the synchronization service is the problem and its replacing your new file with an old one.  Try building to a local destination on your C: drive instead.  That’s what I do.

We are using the local C: drive only.  We have tried this on 4 different machines - same issue. 

We deleted the generated Win32 directory before build because we also thought somehow the build is not deleting it or some file sharing issue.

If I do any change to my LUA files, I can see those changes inside the exe generated - so build is using latest lua files and we are using the latest generated exe file :-).     The generated exe is running fine from all perspective except default Corona icon and AppData location. 

Will keep looking.

Try building our sample project “Interface\DesktopWindow” as a Win32 app with your company name, but leave the rest (app name, version, description, etc.) at their defaults.  Does the built EXE get updated correctly?  If so, then enter your app’s other info such as app name, version, description to the app and build it again.  This is to see if anything in those fields is causing an issue.  It shouldn’t (we’ve done several tests), but maybe there is an edge case that we’re not aware of.  Also note that if you right click the EXE, select “Properties” from the popup menu, and then select the “Details” tab, you can see info such as your file’s description, version, and copyright year.  Unfortunately the “Details” tab does not show company name, but it helps to verify the other bits of information.

Dear Joshua,

Thanks for the detailed debugging steps - it was very helpful. We were able to find the root cause:  It was the icon file issue.  I feel the Icon-win32.ico we were using was corrupting the exe file properties.  It looked like a normal icon - generated from PNG file using http://icoconvert.com/.  

We regenerated the icon (this time only for 16x16, 32x32, 48x48) and it is working now.  

Thanks again for the help

Regards,

Samir

Hmm… did your icon used to work before?

I tried building with an invalid “Icon-win32.ico” file.  I agree it would be nice if a warning or error was displayed saying there was something wrong with it.  However, all of my other build window configuration such as company name, copyright year, version, app description, etc. was correctly copied into the built EXE file.  So, I’m not sure how an invalid icon file caused this.

Would you mind send us your old “Icon-win32.ico” file please?  I’d like to see how it’s impacting the build.  Just click on the “Report a Bug” link at the top of this web page and reference this forum thread in you report.  Thanks!

Sure - I have submitted the bug with the icon attached (I feel that icon was either of larger size 96x96 or was corrupted somehow - even though it was displaying correctly).  

I just re-tested this with daily build #2772.  The company name is definitely working for me.  And I even tried a company name containing spaces, symbols ($%@!&… etc.), and Unicode characters (Japanese, Korean, etc.).  The built EXE always created a subdirectory with that company name under the AppData\Roaming\ directory.

This may sound like a stupid question, but are you sure the EXE you are running is the one you just built?  As in it’s not an old version of your EXE?  You can verify by deleting your last built Win32 app directory (or renaming the folder) and the building it again in the Corona Simulator.  Click the “View in Explorer” button in the dialog that pops-up after the build finishes successfully to go to where your Win32 application has just been built.

Yes we are using the EXE that we build (we delete the Win32 app directory everytime before we build). We tried on build #2072 as well as #2775.  The entire process was working seamlessly before. Only from last 5-6 days we are facing this problem.

One more strange observation that we see: The generated exe file’s “Date modified” as shown in Windows Explorer is an old date (i.e. Aug 27, 2015). This date is same as the date of Corona.App.exe inside C:\Program Files (x86)\Corona Labs\Corona SDK\Resources\AppTemplates\Win32\Templates.zip.    The exe is running our code only and other things look normal - except this directory name issue.

The reason it is giving problem: code update is failing for us. We save app state in the app sandbox area. Previous version of our app is having our state within AppData\Roaming\CompanyName\AppName directory. While this version is looking for AppData\Roaming\AppName directory.

I will try 2772 also today.

>> One more strange observation that we see: The generated exe file’s “Date modified” as shown in Windows Explorer is an old date (i.e. Aug 27, 2015).

Well there’s your problem.  That means you’re definitely *not* using the EXE that just got built.  You’re still running the old one.

The Corona Simulator will automatically delete the destination directory before copying over the newly built Win32 app.  You don’t have to delete the folder yourself.  If the Corona Simulator is unable to delete the old folder, then it’ll display a build error instead.  For example, if you attempt to build to this directory while you’re running your Win32 app in the same directory, you’ll get a build error stating that the files are locked in the directory… which is the correct/expected behavior.

Is your destination directory synchronized with a cloud based service such as DropBox or OneDrive?  If so, then perhaps the synchronization service is the problem and its replacing your new file with an old one.  Try building to a local destination on your C: drive instead.  That’s what I do.

We are using the local C: drive only.  We have tried this on 4 different machines - same issue. 

We deleted the generated Win32 directory before build because we also thought somehow the build is not deleting it or some file sharing issue.

If I do any change to my LUA files, I can see those changes inside the exe generated - so build is using latest lua files and we are using the latest generated exe file :-).     The generated exe is running fine from all perspective except default Corona icon and AppData location. 

Will keep looking.

Try building our sample project “Interface\DesktopWindow” as a Win32 app with your company name, but leave the rest (app name, version, description, etc.) at their defaults.  Does the built EXE get updated correctly?  If so, then enter your app’s other info such as app name, version, description to the app and build it again.  This is to see if anything in those fields is causing an issue.  It shouldn’t (we’ve done several tests), but maybe there is an edge case that we’re not aware of.  Also note that if you right click the EXE, select “Properties” from the popup menu, and then select the “Details” tab, you can see info such as your file’s description, version, and copyright year.  Unfortunately the “Details” tab does not show company name, but it helps to verify the other bits of information.

Dear Joshua,

Thanks for the detailed debugging steps - it was very helpful. We were able to find the root cause:  It was the icon file issue.  I feel the Icon-win32.ico we were using was corrupting the exe file properties.  It looked like a normal icon - generated from PNG file using http://icoconvert.com/.  

We regenerated the icon (this time only for 16x16, 32x32, 48x48) and it is working now.  

Thanks again for the help

Regards,

Samir

Hmm… did your icon used to work before?

I tried building with an invalid “Icon-win32.ico” file.  I agree it would be nice if a warning or error was displayed saying there was something wrong with it.  However, all of my other build window configuration such as company name, copyright year, version, app description, etc. was correctly copied into the built EXE file.  So, I’m not sure how an invalid icon file caused this.

Would you mind send us your old “Icon-win32.ico” file please?  I’d like to see how it’s impacting the build.  Just click on the “Report a Bug” link at the top of this web page and reference this forum thread in you report.  Thanks!

Sure - I have submitted the bug with the icon attached (I feel that icon was either of larger size 96x96 or was corrupted somehow - even though it was displaying correctly).