3
$\begingroup$

Imagine the following scenario: user A is developing a project with documentation in workbench. She wants to give her (unfinished) work to user B , so that user B can continue work on the project and eventually deploy it on her PC. The 2 users might have different operating systems. What is the best way to accomplish this?

WRI does something similar when it offers sample projects online. We "import" the project into our WB.

So in the above scenario, user B has to "import" the project, in order to make it work in her WB.

What is not too clear to me is what is that user A has to do. One would think that user A has to "export" the project, but there are many different (and unclear to me) options available for exporting a project. So, even assuming that "export" is the right thing to do, what precisely is the correct procedure?

I performed a couple of experiments and it seems to me that the end result of some of these "export" options, generate folders or archives which have a different file structure than the original project folder has. Hence my question.

$\endgroup$

2 Answers 2

4
$\begingroup$

I have done this many times, and to me this seems quite straight-forward.

Export

Select your project folder in the Navigator tab (usually on the left).

Then go to the File menu, then

File -> Export -> General -> Archive file -> Browse 

then in the wizard pop-up window that will appear, choose the folder, and the file name (I use .zip).

Then click "Finish".

You should end up with a .zip archive containing your project with the exact same directory structure as in WB.

Import

Click on any top-level (project) folder in your workspace (in Navigator tab).

Go to meny File. Then,

File -> Import -> General -> Archive file 

Then in the wizard window:

  • Fill the field "From archive file" by browsing to the location of your archive file (should contain archived WB project).
  • Fill the "Into folder" field by typing in the name you want for the project's root folder (normally coincides with the name of the project)
  • Click "Finish"

You should end up with the project imported into your workspace. It should not matter which OS was used for import and export.

$\endgroup$
3
  • $\begingroup$ Thank you @Leonid, very complete answer as usual. Can we make things slightly more complicated? Suppose user A was in a hurry and did not know the exact export procedure. So she simply makes a plain copy of the project folder in the WB Base and hands this to user B. How can user B incorporate this project into her WB and make it work? user A uses Win XP and user B uses Win 7, so they have (slightly) different file paths. It is the documentation and paclet stuff that worries me mostly. cont... $\endgroup$
    – magma
    Apr 8, 2013 at 18:09
  • $\begingroup$ cont...@Leonid. Put it in other words: what is the "magic" behind export and import (versus plain file transfer) and how can one fake it. $\endgroup$
    – magma
    Apr 8, 2013 at 18:09
  • $\begingroup$ @magma In case when you have just a directory structure (copy), you just need to use File -> Import -> General -> Existing projects into workcpace, then browse to your root folder in the wizard form that would open, and press "Finish" - pretty similar to the archive, you just use a different sub-option in General. $\endgroup$ Apr 8, 2013 at 21:40
2
$\begingroup$

Import/Export is the development equivalent of sneaker-net. While exporting and importing the projects works fine, you might want to consider installing some form of source control into your Workbench/Eclipse environment. You then do not need to explicitly "export" anything, just check-in your changes as you save.

Workbench comes with CVS support built-in and an easy way to install Subversion. However you can install any source control system that supports Eclipse, especially if you follow these instructions to install Workbench into Eclipse Kepler.

My main current project is a joint Mathematica/.Net application being developed in Eclipse and whatever my colleagues use for .Net work (I assume Visual Studio), all managed through a Microsoft Team Foundation Server collaboration platform. There is an Eclipse plug-in for TFS. Of course TFS is overkill for most projects, especially if you only have a team of two and you don't plan to work on different bits of it simultaneously. But the underlying point is that, even for small projects, there are more rigorous ways than Import/Export to share development work. Your file hierarchies will always be consistent, too.

$\endgroup$
1
  • $\begingroup$ Thank you @Verbeia . Altough I accepted Leonid's answer, since it was precisely on target with my question, I very much appreciated your answer. I am very intrigued with this CVS technology, since it is clearly more advanced and dynamic. I will therefore post a specific question to allow you and others to better explain how it works within WB $\endgroup$
    – magma
    Apr 11, 2013 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.