Author Topic: When copying a configuration for a colleague, which files should be skipped?  (Read 2776 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
I want to setup some colleagues to run SE, and I want to have a script for them to run SE, and if this script detects they have not run SE before, to copy my SE configuration to their home directory. This way they can get my latest configuration, I don't need to export it and then instruct them how to import it, they can start running right away.

But I don't want to blindly copy everything. For example, I would rather they don't get my vrestore.slk so they don't have my search history. I think they also don't need my perfile.xml and vslick.sta files.

Are there other files and subdirectories that I should exclude from this copy?

Or, should I just copy certain files from my config (such as the color scheme, theme, all language formatting settings, show spaces/tabs, error parsing, etc)?

What would be the minimum number of files that I would need to copy that has all my configuration settings, but doesn't have more personal stuff like my search history, ftp server list, etc.

Thanks,
Rob

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Or, would there be a way to script "Export Options", and I can only export the desired options - so that I can do this periodically and easily. Then when a new user wants to run SE for the first time, my wrapper script could run another script to import the options before launching SE for the first time?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Given your knowledge of SlickEdit I would recommend copying certain configuration files from your config. Primarily, you need user.cfg.xml.

When I set up a new config for myself, I copy a user.cfg.xml from a server location. I removed the tag files section from my user.cfg.xml on the server and also removed the workspace history data since those file locations could be different. I think I kept everything else. The rest of the config files weren't important for me.

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Did you notice "export groups" in the export dialog.
You could use export_options('-g Team');

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Can export/import/user.cfg.xml file editing be automated?

My plan is to post on an internal wiki instructions to launch my wrapper script that will launch slickedit for the user.

If the user never launched SE before, my wrapper script will check if they have a config file directory already, if they don't, I want to populate a new config file directory for them.

I will not know when a new user will try to launch SE for the first time. Ideally I would want them to use my latest configuration, I'm changing my config all the time. But a pure copy of my configuration would not be ideal because I have many things in there I don't want the user to have (like my search history, list of workspaces, etc).

A compromise that I was thinking of is that I could periodically manually do an export using the GUI, and then launch SE with a blank config dir and then manually import the config I just exported. Then I will have a fresh config directory that my script could copy to the user's directory when they launch my wrapper script for the first time.

But this would require manual work on my end periodically whenever I significantly update my config. I'll need to manually do an export, manually launch SE with empty config dir, manually import to get a default directory a user would copy.

I would much rather have this export/import all automated, so periodically (or with cron job), I could update the baseline directory often without much trouble.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
OK, I see there is the "export_options" macro that Graeme talked about. That could automate the export side.

For the import side, I would need to launch a 2nd SE instance with a fresh config, and then have that SE instance run "import_options" macro to import the config.

Is there a way to launch SE and tell it to execute a macro immediately?  Off to searching the help...

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
So according to the help, I could launch a fresh SE and have it run a macro with "-p cmdline" to do the import. Is -p the right option?