Packaging STATA

ianmb
Contributor

Does anyone have any best practice for this?

I suspect we'll need to package both the STATA/MC and STATA/IC versions.

Thanks for any guidance.

5 REPLIES 5

NowAllTheTime
Contributor III

We just install on a test Mac, and then take the whole Stata folder in Applications > Stata and wrap it up in a package in Composer and send that out, no scripts or other customizations. I believe our site license is wrapped into the app we get from the vendor. The licences are handled by a different department at our org though, so I'm not exactly sure how that gets worked out on their end before they send me a link to the app download to package and stage for deployment. We're deploying v13.1 right now.

mark_mahabir
Valued Contributor

I just packaged Stata/IC v15.1 for our fleet (I'm awaiting codes for v16 from our Software team).

In case it is of wider interest, I was able to disable the automatic checking for updates when the program launches by placing a file called sysprofile.do in the /Applications/Stata folder containing nothing but the following:

    set update_query off
    set update_prompt off

I then dragged the whole /Applications/Stata folder on a test VM into Composer and created a DMG. Unfortunately the above doesn't prevent the user from clicking on Help > Check for updates and I don't think there is a way to permanently disable the menu option.

lynnaj
New Contributor III

I like the suggestion to stifle updates by default so thanks for posting that! I'll be adding that shortly.

mark_mahabir
Valued Contributor

Stata support have confirmed that there is no way to disable the Help > Check for updates option:

There is not a setting in Stata to prevent a client from running the update manually but you can change the permissions of the Stata folder so that their account is not able to write to that folder.

davidhiggs
Contributor III

Couple other tips for those packaging. This information is based on v17.

1. The self update mechanism tries to dump its files into the same folder the Application is installed, which does not have write access. Self updating will fail. The permissions by default are 775 for the application folder. If you change it to allow everyone to write just to that folder, it will fix this issue:

chmod 777 /Applications/Stata

 

2. The licence file is old school and just a .lic file in the same directory as the Application. If you wanted to hide it from being visible, you could run this command to do so and the Application will still be able to use it.

chflags hidden /Applications/Stata/stata.lic