Have you considered a portable version

This forum is aimed at user contributions, in the form of assets, side projects, code patches and similar.

Moderator: joepal

Have you considered a portable version

Postby Freehunter » Fri Aug 22, 2014 4:28 pm

A quick search didn't turn up anything so I thought I would ask.

Have you thought about making a portable version of Makehuman like the one available for Blender, see http://portableapps.com/apps/graphics_pictures/blender_portable their contact info at: http://portableapps.com/about/contact.

You are almost there now since your program doesn't have to go to a specific directory. The only problem is there seems to be no way around placement of library of files in the default Windows user directories.

I installed and run Makehuman in PortableApps directory structure and it seems to run OK. I just have to keep telling it where to put my files all the time. When my hard drive crashed, I just took my jumpdrive to my laptop and worked there.

I don't know how hard it would be to let the user select where to store Makehuman's libraries and keep that information in ini files. That seems to be what makes it easier to make PortableApps instead of changing the registry.

PortableApps is open source. It works with: Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8 & Windows 8.1and Linux, Unix, BSD, etc via Wine & Mac OS X via CrossOver, Wineskin, WineBottler, PlayOnMac

I know you're facing a 'deadline' on your next release. Just wondered if you were aware of or interested in the possibility.

Thanks,
Wil
Freehunter
 
Posts: 66
Joined: Sat Aug 09, 2014 1:48 pm
Location: Great Lakes

Re: Have you considered a portable version

Postby Manuel » Fri Aug 22, 2014 6:15 pm

Thank you for the suggestion. Do you mean this one http://portableapps.com/ ?
It would be interesting to discuss, in particular to see if portableapps (that appears a very active project) can replace the pyinstaller system that we are using now.
Manuel
 

Re: Have you considered a portable version

Postby Freehunter » Fri Aug 22, 2014 10:42 pm

Manuel,

Yes, PortableApps.com is it.

I'd try to make a launcher but it has been almost thirty years since I did any programming and that was in QuickBasic. Other job responsibilities kept me from moving on to other newer languages, too many things to learn.

The thing about PortableApps is that if a program can standalone it can be added to their directory structure and run from their menu. It gets more difficult if a program uses the registry or has fixed locations for its files.

Programs that have been put into the PortableApps format will automatically install in their structure and be placed in their menu. Their 'platform' will alert to updates to the new version and download and 'install' without damaging configuration or data files. Uninstall is simply deleting the program from PortableApps directory. I think their developers have adapted programs that use the registry but that means adding entries when a program is started and removing them when it is shutdown. Sometimes workareas are copied to hard disk and copied back when program is shutdown.

I pointed out that they already have Blender, there is also another 3D program, K-3D. I believe it supports COLLADA. There is also GIMP. So a person could have a whole suite on a jump or portable hard drive.

Some of the programs on their site were modified by people who liked the PortableApps idea and with permission created installers and launchers. Others were created by the original program developers who like the PortableApps idea and modified their programs to run as PortableApps.

Originally only totally open source programs were accepted as 'official' PortableApps, I think your license would fit. Now they are expanding a bit to include 'free' programs.

I use almost only programs from the PortableApps suite these days. When I find a program that can be 'installed' by expanding a zip, I try it to see if it will work as portable. Some do, some don't.

With your release schedule your developers probably don't have time right now to chase after extra changes. My impression is that PortableApps' developers have been stretched recently keeping up with updates for current programs and the new release of their platform that just came out.

John Haller is the creator of and main developer at PortableApps. He would probably be your best contact if the idea sounds like it has any merit.

You've got a great program. I just wondered if anyone had ever brought up the idea of a 'portable' version. Keep up the great work.

Wil
Freehunter
 
Posts: 66
Joined: Sat Aug 09, 2014 1:48 pm
Location: Great Lakes

Re: Have you considered a portable version

Postby Freehunter » Sat Aug 23, 2014 5:26 pm

Manuel,

I meant to point out the Development section has descriptions of the format to make programs compatible with the PortableApps structure. I see they've now got tools to make the 'installer' and 'launcher' once the program files are formatted to the PortableApps spec.

http://portableapps.com/development

http://portableapps.com/apps/development/portableapps.com_launcher

http://portableapps.com/apps/development/nsis_portable

http://portableapps.com/apps/development/portableapps.com_installer

The attached screencap shows the directory structure on a jumpdrive. The blender directory is expanded so you can see how it is structured as a PortableApp and compare to a regular Windows install.

portableapps-example.jpg



PortableApps only searches one level for executables. That is why I could put Makehuman in PortableApps directory and have it show up in the menu. Normally a launcher at that level executes the actual program and does any necessary housekeeping to open the program and cleanup when it is closed.

I've actually got three versions of Makehuman installed, selectable from the menu. Just had to rename the menu entry to tell them apart. If you went with PortableApps people could try newer version while keeping the old one to make sure they were ready to upgrade.

I don't think you would want to do installers for nightly builds. but if you have adjusted your directory structure to fit PortableApps you could probably just zip it and let people do a little manual unzipping into PortableApps.

The PortableApps installers are basically smart self-extracting archives. They can be unzipped to see the contents. They default to installing within the PortableApps directory structure. That allows them to be easily upgraded. They can also be executed outside of the PortableApps menu and then they offer the option to change the default install location. In that case they cannot be updated through the normal PortableApps menu.

That about exhausts my knowledge of making PortableApps.

Hope it helped you get an idea of the possibilities.

Wil
Freehunter
 
Posts: 66
Joined: Sat Aug 09, 2014 1:48 pm
Location: Great Lakes

Re: Have you considered a portable version

Postby Manuel » Sat Aug 23, 2014 6:25 pm

Thank you FreeHunter,
I'll discuss about this with other programmers.
Manuel
 

Re: Have you considered a portable version

Postby duststorm » Fri Aug 29, 2014 1:31 pm

I am aware of portableapps, I have used it for some time myself.
Yes, that's a good idea. The good news is that it is very easy to create a portable version of MakeHuman, as it does not use things like the registry or meddle in the system files. The only thing you would need to change is one line in lib/getpath.py
You'd have to modify the "getHomePath" method to point to some location on the USB stick, and MakeHuman would be fully portable.

Apart from the fact that MakeHuman stores settings in the Mydocuments (home) folder, it's already fully portable. If not for the home path thing, you could package the windows release zip as a Portable app. But because of this one change to the home path, you'd have to create a new .exe file using pyinstaller. (there is some documentation on http://www.makehuman.org/doc/node/libra ... dures.html but the pyinstaller procedure is not explained. See buildscripts/win32 on the bitbucket source repository for pyinstaller build script).

Yet, there might be a simpler way...
You could try to use the release download of makehuman, but replace the getpath.pyc with a new version. For that you'd have to download and install python and all the dependencies though (described in the documentation above), check out makehuman from source, modify the getpath.py file, run makehuman.py so that getpath.pyc is generated, then replace the getpath.pyc of the release package with the newly generated one, and package it as a portable app.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Have you considered a portable version

Postby duststorm » Fri Aug 29, 2014 1:42 pm

As a matter of fact, the second suggestion, you can do it without installing the dependencies.
You only need python 2.7 installed. Then run the getpath.py file directly. It will create a pyc file without needing all dependencies.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Have you considered a portable version

Postby duststorm » Fri Aug 29, 2014 1:58 pm

That being said, I believe PortableApps already contains the tools to create a launcher wrapper around the makehuman.exe that effectively changes the location of the my documents folder (look in the code of the getpath module to see what registry key it reads on windows). That would be the only thing you would need to do to make it portable.

Have a look at launcher.ini documentation for setting registry key values: http://portableapps.com/manuals/Portabl ... uncher-ini
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Have you considered a portable version

Postby Déesse » Fri Aug 29, 2014 2:32 pm

I used MH as PortableApp before, without any changes!
User avatar
Déesse
 
Posts: 171
Joined: Sat Feb 08, 2014 7:37 pm
Location: Germany

Re: Have you considered a portable version

Postby duststorm » Fri Aug 29, 2014 3:29 pm

Déesse wrote:I used MH as PortableApp before, without any changes!

It depends on what you consider "portable app". MakeHuman is already very portable in itself, that's true. But to be acceptable for portableapps.com it cannot write anything to the local disk. MakeHuman without modifications writes to C:\...\My Documents, so that is not entirely portable. It also means that your settings and saved models are not transported with the USB stick (they remain in the my documents folder on the local disk).

But it is true that MakeHuman does not really need to be modified, if you create a portable launcher using PortableApps development tools.
The only requirement is that you instruct MakeHuman to treat the my documents folder on the USB stick as My Documents folder, and you can probably do this using a simple launcher.ini
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Next

Return to User contributions

Who is online

Users browsing this forum: No registered users and 1 guest