7 Replies Latest reply on Apr 2, 2010 3:07 PM by Harjeet19

    Sidecar Installation on Mac problem?

    Harjeet19

      We have applied for the redistribution license and have all the necessary files ( .exe and .app for pc and mac respectively) to perform a sidecar installation.

       

      We made a hybrid CD using toast on MAC.

       

      This works great on PC but it has some trouble on mac.

       

      The application requires AIR 1.5.3.

       

      If the user has AIR 1.5.3 already installed and our application installs directly bypassing the AIR runtime installation and it works great. Code signing certificate is there and the application is installed with read/write permission for the Admin(me) and all aspects of application works well.

       

      The problem starts if the user does not have AIR runtime installed. The side car installtion first installs AIR runtime environment and then proceeds to install our application which installs without any error but with read/write access to system and not me. In this case certain parts of the application do not work ( these parts read and write data to SQLite Database on local dissk).

       

      I went a step further and added me with read/write permision manually just because it worked in the previous instance as expalined above. Even this did not work. I restarted the computer still it did not work.

       

      I tried to delete system user so that our app has the same permissions as in the first case, but mac does not allow this user to be deleted.

       

      I beleive that beacuse AIR runtime installs first and needs System permissions, even my application gets installed with these same permissions.

       

      Now if I delete my application by dragging it to trash and reinstalll it then it works fine again ( As now Air runtime is already there).

       

      I again checked the permissions  and they were same as if AIR runtime was already present, which is true now because when I removed the application and reinsatlled it, it keeps the AIR runtime and deletes only my application.

       

       

      If using sidecar insatllation my application somehow installs with read/write permission for (me) and no users as "system" the I think it wll work.

       

      I dont know if this is a bug or if there is a solution around this.

       

      Please Help ASAP as we want to go live with this project next week.

        • 1. Re: Sidecar Installation on Mac problem?
          Juan_G

          Hi Harjeet,

          This is what I encountered in my testing.

           

          In the first scenario, both the runtime and application are being installed. The runtime installation requires the process to elevate, you are asked to enter your credentials. This allows the runtime to be installed successfully, but the application is also installed as part of the elevated process, so the final permissions on the application end up with the owner being "root" and the group "wheel".

           

          In the second scenario, where the runtime is already installed, only the AIR application is being installed from the disc. If the user is an Administrator, the application install process is not elevated, you are not asked to enter your credentials. The final ownership permission on the application is the user who performed the install and the group "staff", at least on the Mac OS X 10.6 system I tried this on.

           

          juan

          • 2. Re: Sidecar Installation on Mac problem?
            Harjeet19 Level 1

            Hi Juan,

             

            Your are correct, but that means using the sidecar installation is not going

            to work for our application as it does not get installed with right

            permissions. Is there another way to make it work?

             

            Best

            Harjeet

            302 838 0146 x 101

            • 3. Re: Sidecar Installation on Mac problem?
              Juan_G Level 1

              Hi Harjeet,

              It sounds like your database resides inside of the application directory. This is discouraged per the docs:

              http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html#applicationDirectory

               

              The work around maybe to have your database created in the application storage directory, which is per user.

               

              juan

               

              Message was edited by: Juan_G: made first sentence clearer.

              • 4. Re: Sidecar Installation on Mac problem?
                Harjeet19 Level 1

                Hi Juan,

                 

                Yes we do have a SQLite database inside of the application directory to

                which we read and write data, but this DB is not created by the application

                by and is installed with the application as included file in AIR application

                which seems as per use.

                 

                How else can we copy this DB to application storage directory as it

                preexists and is not created by the Air application. We query this DB to

                display results and also write to this DB the history of search results.

                 

                Is it any way possible to put the Db file to application storage directory

                while installation?

                 

                Best

                Harjeet

                302 838 0146 x 101

                • 5. Re: Sidecar Installation on Mac problem?
                  Oliver Goldman Adobe Employee

                  You can copy the database file to the application storage directory using the File.copyTo() method. This can't be done during installation, but you can do it during application startup. For example, your logic might check if the database has already been copied and, if not, copy it from the install directory to the application storage directory.

                   

                  In any case, writing to a database inside the application storage directory is definitely not supported.

                   

                  Hope this helps,

                  Oliver

                  • 6. Re: Sidecar Installation on Mac problem?
                    Harjeet19 Level 1

                    Thanks Oliver, We are going to make these chaanges as suggested by you and

                    copy the date to documents folder of the user.

                     

                    Best

                    Harjeet

                    302 838 0146 x 101

                    • 7. Re: Sidecar Installation on Mac problem?
                      Harjeet19 Level 1

                      Thanks Guys it all works fine now. We wrote the DB and other files where

                      read and write happens to the users document folder.