Page 1 of 1

.PHI FILES TUTORIAL

PostPosted: Thu Jul 14, 2011 3:49 pm
by Ivan
__________________________________________________________________________________________________________

.PHI FILES TUTORIAL
__________________________________________________________________________________________________________

Image
.phi files or Algodoo Installer files are an Algodoo feature available since version 1.7.0.
These files, when opened in Algodoo, get extracted to the Algodoo home directory (Windows: "~/Documents/Algodoo/", Linux: "~/Algodoo/", MacOS: "~/Library/Application Support/Algodoo/").
.phi packages can be useful for sharing translations, scenes, skins, images, etc.

__________________________________________________________________________________________________________

Installing .phi files
__________________________________________________________________________________________________________

If .phi files are already associated to Algodoo, just double-click your .phi file to open it.
Now you should get a dialog box asking: "Install [Filename].phi?". Press OK.
Image

If this is not the case you could right-click the .phi file, choose Open with and find Algodoo (Linux: "~/opt/Algodoo", Windows: "~/Program Files/Algodoo", Mac:"~/Applications/Algodoo").
OR
You could also:
1. Run Algodoo
2. Go to File > Load scene
3. Browse and select the .phi file
OR
1. Run Algodoo.
2. Go to File > Toggle fullscreen (if already not in windowed mode)
3. Drag the .phi file icon and drop it into the Algodoo window.

Thanks to: Someone Else and electronicboy


__________________________________________________________________________________________________________

Creating .phi files
__________________________________________________________________________________________________________

.phi packages are actually, as well as .phz files, masked .zip archives and can be opened in every program that supports normal .zip archives.
Image

You can download an empty .phi file here or see how to create such files in the following tutorial.

__________________________________________________________________________________________________________

ImageWindows

1
Right-click and create a new compressed (zipped) folder. Now you can see a .zip file called "[Filename]". There you can put your files in.

OR Select all the files to be included in the archive. Right-click on one of the files and select Send to > Compressed (zipped) Folder.
Image
OR
Image

2
Go to Control Panel > Folder Options (or use this shortcut). Switch to the View tab and uncheck the "Hide extensions for known file types" checkbox. Press OK.
Image

3
Go to the .zip archive. Now you see the same .zip file with the full name "[Filename].zip". Now just change the ".zip" extension to ".phi".
Image

Alternative method

1
Right-click and create a new .zip file. I recommend not to put any files into it yet.

2
Download and install Notepad++ (or some other editor which preserves the initial encoding).

3
Open the .zip with Notepad++. Go to File > Save As. For Save as type: choose "All types (*,*)". For File name type the desired name ending with the ".phi" extension. Save it.
Image

__________________________________________________________________________________________________________

ImageLinux

1
Select all the files to be included in the archive. Right-click on one of the files and select Compress or Create Archive.
Image

2
For Filename type the desired name and select ".zip". Click on Create.
Image

3
Right-click the .zip archive called "[Filename].zip" and select Properties.
Image

4
Replace the ".zip" extension with ".phi" and click on Close.
Image

Thanks to: electronicboy


__________________________________________________________________________________________________________

ImageMac

1
Select all the files to be included in the archive. Right-click on one of the files and select Compress... or Create Archive....
Image
2
Go to the .zip archive called "[Filename].zip" and replace the ".zip" extension with ".phi".
Image

__________________________________________________________________________________________________________

As it was already mentioned, .phi files get extracted to the Algodoo home directory.
When creating .phi files, note that, if you want the packaged files to be installed into existing folders (i.e. "Scenes", "Skins", "Data/Language", etc.), you have to put them into folders named as the existing folders. So, when being installed, your folders will be merged with the existing folders.
Image

__________________________________________________________________________________________________________

Re: .PHI FILES TUTORIAL

PostPosted: Sun Jul 17, 2011 4:16 am
by Someone Else
:thumbup: Amazing tutorial.

Also, I would include a bit on how to install a .phi package.

1. Open Algodoo.
2. In the Load Scene browser, select the .phi in question.
3. You should get a dialog box asking, "Do you want to install Example.phi?"
3.1. If not, use Windows Explorer or the equivalent program in whatever OS you use to open the package using Algodoo.
4. Click Yes.
5. You should see a dialog box saying that the file has been successfully installed.

Also, when creating a PHI, note that you can place installed files in existing folders.
If the original ZIP includes a folder labeled Scenes, then all files and folders within this Scenes folder will be installed to the Scenes folder in My Documents/Algodoo, or the equivalent folder for your operating system.

Re: .PHI FILES TUTORIAL

PostPosted: Sun Jul 17, 2011 9:16 am
by electronicboy
also, please note that linux uses the meta-file type and not the extension. Meaning the file will open with your favorite archive manager.

To get around this, right click on the file, select the option to open with another program, and choose algodoo (usually located in /opt/Algodoo)

Re: .PHI FILES TUTORIAL

PostPosted: Sun Jul 17, 2011 5:02 pm
by Ivan
Thank you for your replies! :thumbup:
I will add something about installing.

Re: .PHI FILES TUTORIAL

PostPosted: Mon Jul 18, 2011 1:00 am
by Someone Else
This is by far the best tutorial I've seen in a long time.

Again, congratulations and thanks for taking electronicboy's and my own suggestions into account.

Also, I personally think it's easiest to open the PHI via Algodoo, and not have to go through file managers and such. However, I've had better luck going the file manager route.

Re: .PHI FILES TUTORIAL

PostPosted: Sun Jul 24, 2011 9:06 pm
by Rrobba
Great, comprehensive tutorial.