Blender script installer (Mac/Linux tester needed)

I am going to be developing a python script installer for inclusion with Blender. I have already gathered several ideas for how it is to operate, and would like to hear what other users and developers would like to see in such a system. My goal is to produce something that will benefit both the casual user, and the python script power-user.

Overall goals:

  • Make installation and uninstallation as transparent to the user as possible
  • Maintain file integrity
  • Allow for better management and organization

Basic overview:

  • The script will allow users to add scripts, warning them of any conflicts or problems.
  • The script will list installed scripts and allow users to organize and manage them.
  • The script will enable users to safely remove scripts.

Get the latest version here:
http://hhofministries.org/bpyc/viewscript.php?script=4

What I need from willing testers:

  • Users of other operating systems (other than Windows). This version reads and writes to files, and I havenā€™t tested it on anything besides Windows. If I could have someone verify that the option to change a scriptā€™s menu location works on Mac and Linux, I would very much appreciate it.
  • I would also like to open a discussion about how to display and manage duplicate scripts (two or more script files that have the same headers, and, hence, only display once in the menus). Duplicate scripts can arise in several ways, mainly 1) same script but different filename, 2) script gets copied to a subdirectory, and 3) scripts exist in both the user and blender script directories.
  • For a future feature, would anyone like the ability to display a script in more than one menu?

And, as usual, we can discuss bugs, features (current or future), the GUI, and usability.

  • Are the interface elements recognizable/intuitive?
  • Is everything there that needs to be?
  • How am I doing on ā€œergonomicsā€ and useability?
  • I would also be interested in coding suggestions or improvements.

ā€œTechnicalā€ documentation added:
I put most of my ideas in writing here:
Script installer draft document
I tried to include as much detail as possible, but it takes a while to read through. Maybe itā€™s overkill, but if you have time I would like to hear comments on it.
A couple of specific things that came up were:

  • Is it OK to modify script headers locally (on the userā€™s machine) without authorsā€™ permissions?
  • Whatā€™s the best way to see if two files are identical in content? I know md5 would work (and could be easily stored).

Thanks!
Levi

In addition to your idea

I propose you use file extesion blz for zipping the pyscript for distribution.

have file manager viewer and when click the blz file would automatically unzip into the script folder.

Iā€™d did propose the standardization of naming the script please check my earlier post.

jumpy-monkey: Some very good ideas. My first goal is to create a script that will be able to install most of the scripts currently in circulation. This means single .py files, as well as .zip, .tar, .gz, and other types of archives. There may be the possibility of defining specific packaging formats in the future. Also, once that happens, it may very well be possible to integrate an installer directly into Blender using the file manager. However, I believe an installer written in python is the best option right now. (BTW, I couldnā€™t find your ā€œearlier postā€ proposing the ā€œstandardization of naming the script.ā€ Do you have a link?)

Thanks!
Levi

this is something that needs to be hardwired into blender in my opinion.

1 Like

It must have been removed from original eyelsuim forum! anyway here the summary I think proposed the naming of the blender distribution as follow:

blender-version-release-patch eg: blender-242-a-0 where a,b,c ā€¦ = unstable
when the stable is realeased blender-242-0-0,
while blender242a ~ blender-242-0-1! as it only an updated version and so onā€¦
this can be apply to the script , materials, etcā€¦ I have forgotten a lot details if you need further details I will try to dug up somewhere deeeep in my bain. :o :o

The_Warder: Actually, you probably wonā€™t be able to tell the difference. I canā€™t speak for the devs, but I think something like this (and others, like the script configuration editor) may be best suited as a python script both now and in the future. The future for pythonā€™s integration with Blenderā€™s interface is pretty promising. But I do agree, things look and feel a lot better when they are ā€œhardwiredā€ into Blender. For now, though, Iā€™ll be focusing on itā€™s implementation in python, if only as a concept model or prototype.

jumpy_monkey: Hehe, I donā€™t exactly understand what youā€™re trying to achieve. Are you proposing a change in the way Blender itself is named on distribution? Or are you suggesting a method by which scripts and other files distributed for Blender are named? If the former, I doubt the devs will want to change on a mere whim (tradition and history have a lot to say in response), and thatā€™s going a bit off topic. If the latter, a standardized naming of files distributed for Blender is definitely something that can be discussed. It probably wonā€™t be promoted for a while, though, if ever.

Also, I edited my original post to include the following:
ā€œTechnicalā€ documentation added:
I put most of my ideas in writing here:
Script installer draft document
I tried to include as much detail as possible, but it takes a while to read through. Maybe itā€™s overkill, but if you have time I would like to hear comments on it.
A couple of specific things that came up were:

  • Is it OK to modify script headers locally (on the userā€™s machine) without authorsā€™ permissions?
  • Whatā€™s the best way to see if two files are identical in content? I know md5 would work (and could be easily stored).

Let me know what you think.

Thanks!
Levi

A script installer is also one of my wishes.

Maybe a script for Blender 2.42 (=2.4.2) version 3 should be named scriptname-v2.4.2.3 or scriptname-v2.42.3

The next Blender versions will be named 2.43 (2.4.3) and 2.5 (2.5.0)

- Is it OK to modify script headers locally (on the userā€™s machine) without authorsā€™ permissions?
Although it might be allowed I suggest not chaning the scripts unless you mean to update them.

- Whatā€™s the best way to see if two files are identical in content? I know md5 would work (and could be easily stored).
MD5 is a good way to start, but I would do 2 checks to see if they are really the same. As you know different files can have the same MD5 result. Using in combination with other Hash solutions makes it more relayable to compare a file. Else you can even use a diff kind of routine, checking character by character.

Well, I basically just need two things: 1) Tag the script header with an ID so the installer can track the executable .py files (those that appear in the menu), and 2) Modify the ā€˜Menuā€™ section of the header to allow users to select which menu they want the script to appear in. (Meta-Androcto has mentioned that he likes to reorganize his scripts in that manner, and I also would like that capability.) I donā€™t see a big problem with it, and as long as no other authors do either, weā€™re probably OK. Legally, though, I wasnā€™t sure; and Iā€™m not about to try and make this installer script decipher whether the script to be installed is GPLā€™d or not.

Well, hehe, I suppose there is a chance that two different files will produce the same MD5, but itā€™s pretty slim. :slight_smile: Using another hash as well is a good suggestion, though. I need something quick and dirty that produces a result that I can store, preferably without needing to store a copy of the file itself. MD5 gives me that, but I know thereā€™s other options, too.

Levi

this is something that needs to be hardwired into blender in my opinion.

Agreed.

Problem is I have seen so many ideas for python script management/ repositories go by and none became official. It is a good idea that never seems to materialise.

Nonetheless, it is (still) a fantastic ideas and has my full support. Hope you forgive me if I lack the faith that your script will ever see the light of day. By that I mean inclusion in the official release.

Koba

I think naming system is definetely needed in script as well as on the blender and its support materials. Naming system would enable people to find thing quickly so less man hour is use. You know how time is lost in finding information inefficiently?? too much my friend.

As for script naming system we should included the information about what version of blender is compartible to the particular script.

Scriptname-version-stable-patch-blendercompartible version

Eg:

Beast-1-a*-0-V234-V273 where* a,b,c ā€¦ = unstable 0=stable

And it would help if blender use this:
blender-version-release-patch eg: blender-242-a-0 where a,b,c ā€¦ = unstable
when the stable is realeased blender-242-0-0,
while blender242a ~ blender-242-0-1! as it only an updated version and so onā€¦
this can be apply to the script , materials, etcā€¦

Especailly in script there are far too many incompartible version so by putting the information into the name itself user can tell at once whether the script is usable with their app- instantly! without has to read extra information.

Another thing to make scrpit useful is - there should be a single depositry and its mirror for hosting the script. From my own experience of HUNTTING down the dead link of useful script = flustratation!!!

I forgive you. :slight_smile:
Actually, I havenā€™t seen all that many ā€œideas for python script management/ repositories go by.ā€ There have been several failed attempts at organizing script lists, and the only viable ideas for script management/repositories have been SamAdamā€™s and mine. I started where SamAdam left off, and Iā€™m not done yet. Not by a long shot. Also, this installer will not interface with any repositories (at least not initially). Itā€™s almost a completely different concept.

As for inclusion with Blender, Iā€™m actually working on this for inclusion in Blender, not in the hope of including it with Blender. Thereā€™s a difference. Thatā€™s also why Iā€™m making my intentions public. A script that moves and copies files around needs to be reviewed by the developers and community to ensure it doesnā€™t pose any special problems.

Unfortunately, as Iā€™ve discovered, you canā€™t make authors do anything. Naming conventions and stuff are nice, but only if thereā€™s some way to enforce them. Also, the repositories are out there, itā€™s just that no one has taken the time to add scripts to them. Right now, the best place to find scripts is the wiki list Meta-Androcto is putting together.

Levi

Keep up the good work!
The more support reD Fox has for his ideas the more likely/sooner they can become reality.

I think Iā€™ve finally got the fun part done: coding the interface. It encapsulates most (if not all) of the requirements I listed here:
http://mediawiki.blender.org/index.php/User:ReD_Fox/Python_script_installer#For_installed_scripts_.28main_interface.29

Also, it has the necessary function hooks but doesnā€™t do anything yet (it just prints something to the consol). Feel free to mess around with it, it doesnā€™t modify any files.

Get it here:
http://www.hhofministries.org/bpyc/viewscript.php?script=4

What I would like to know:

  • Does it hold up with a lot of scripts? (Meta-Androcto, Iā€™m looking your directionā€¦)
  • Are the interface elements recognizable/intuitive?
  • Is everything there that needs to be?
  • How am I doing on ā€œergonomicsā€ and useability?
  • I would also be interested in coding suggestions or improvements.

Thanks!
Levi

Seems pretty comprehensive.

The checkbox functionality is good though otherwise the interface seems a little cluttered. Normally you have the list and then a single set of buttons that act on the specified selection. Like that you get a single remove button and a single install/update button (and that is all the functionality I would need from this).

If this thing has the ability to install an up-to-date version of all the scripts listed now, then this will be very useful.

Koba

Hi Levi, Appears to be a good start.
It does seem in places a little cramped. Even in full screen.
There needs to be a way to search directories.
ie: option to look for/list scripts from a specific folder on your hard drive.
A clear way to refresh the menu too.
I like that you have made the window scrollable. cool.
The placeholders for tooltips show that these will be done. vg.
Possibly a safe guard pop up that asks for user permission to move/install
scripts. ie: are you sure you want to move? Yes/No for automated tasks.
How many languages? There, not just for your script, needs to be a way or script for people to be able to easily change/edit the gui for language options. Possibly for your script 2 or 3 languages and a customize gui option, by way of a gui placeholder that people can access and change the names of gui tabs. Great if there was a script that could do this for all scriptsā€¦ but I wanderā€¦
Good work so far. A few tweaks and it will be great.
You do need to run this past a few of the official Blender scriptors also to get their opinions also. ( If you havenā€™t already).

Thanks. M.A.

Ah! I think that could work. I figured that for single scripts it would be nice to associate controls directly with that script for the times when the user worked through the list one script at a time. It would eliminate the extra step of selecting the script first. But . . . eliminating the per-script controls will both clean the interface and simplify the GUI code. Are there more people in agreement (to abolish per-script controls)?

Not yet. That brings in a whole other diminsion. One that needs to be carefully hashed out with the developers. Iā€™m not including those controls (an ā€œupdateā€ button, for instance) in my current work because it will probably be 6 months to a year before a suitable system is developed.

Yeah, I need to develop a better way to display columns. I think the biggest hog is the tooltip column. Come to think of it, is it even needed? I could just put a ā€œdummyā€ button that shows the tooltip when the user hovers over it. Also, it would be nice to have a way for users to expand/collapse the columns, but the more I thought about it, the more I disliked the GUI code mess something like that would create. Still looking for ideas there.

Hmm. I donā€™t know about the directory thing. Iā€™m assuming you mean directories that arenā€™t registered in blender. In that case, it would turn this more into a script browser than a script installer/uninstaller. Although that would be nice (especially for your work), I think Iā€™m going to restrict the script display to registered scripts in Blenderā€™s script directories.
I will definitely add a refresh option. Good call!
The safe guards will be included. There are numerous checkpoints that will require user notification/intervention. I held off on incorporating any of them until I was able to hammer out the details for all of them.

Another good call, but multi-language is a bit beyond me (I only speak one). Do any other scripts use multiple languages? If anyone is willing to volunteer to be a translator, I can look into ways of easily expanding the languages supported.

No, I havenā€™t yet, but will soon. I have a few more tweaks to do to the interface (adding help text, filling in tooltips, implementing suggestions, refining hot keys, etc.), and then Iā€™ll be discussing some things with them before starting on the actual install/uninstall procedures.

Thanks for the comments!
Levi

1 Like

Well you asked :slight_smile:

Sure pretty slim, but whats the problem with a little more complicated check that has even a slimmer chance?

Then again, you asked :slight_smile:

Hi Levi,
It is a good script, :wink:
Yes,
I do have easier ways to ā€˜load scriptsā€™ to be honest I prefer to load/test scripts 1 by 1 as I need to test each script if it works in or with the text editor before I test the script menu, before I write a new header.:slight_smile:
He Heā€¦:smiley:
As I have said in the past I have many ā€˜buildsā€™ of Blender on many drives. I can just point any build of Blender to my
ā€œgod modeā€ scripts directory
ā€¦anyway
ā€¦You know
ā€¦where I keep all the best scripts
ā€¦the ones I need PERMISSIONS TO GIVE EVERYONE!!!:eek:
That wasnā€™t aimed at reDFox/Levi,
So everyone knows, it is hard having the most functional version of Blender and not being able to share it.
Donā€™t ask. Itā€™s mine. Make your own!

OK. The scripts that have or utilize duel/interlingual menus are largley from jms,jbp,rw+help, If you wonder who is r.w. try responding to the FANTASTIC new updated version of BMAE,
you knowā€¦
The update that NO-ONE RESPONDED TOā€¦
The one that has 3 DIFFERENT LANGUAGESā€¦
the one that everyone should be ASHAMED of themselves for not giving a second thoughtā€¦Not replying toā€¦not saying THANK YOUā€¦
not even realizing that it is one of the better geometric makers/modifiers aroundā€¦ woopsā€¦not! (to the Woops) not telling all my secrets:p

I am sure Levi if you ask some people they would be happy to help you
with translation, a tool that could help people do this would be great.
I still think that the more languages you can publish a script in the better.
JMS would appear to speak French, yet he bothers to write a button to switch the interface to English.

As for the whole Search Directory thing, why bother with an install script thing anyway. HONESTLY. Does Photoshop and the 1000ā€™s puggins ( I Have ) need that? Bother with that? Does Max, Maya, Cinema 4d, Blender,
to name a few, ever bother with that???
Simple, If the script does not have a self installer, that will only extract files to the plugin folder to make them available, you install manually.
With the majority of programs.

So searching a specific directory would be a good function to have,
that would be a step forward. I once posted that Blender bombed out at 35 export scripts. I didnā€™t bother to report that PS bombed out at 350.

How does the script go with scripts that have dependancies?
Can it install many different files to different directories?

Sorry for the rant.

Friend, but sometimes Devils Advocate.:wink:

Thanks Levi, keep up the good work.

OK, first, Iā€™ve done an update that incorporates many of the things you guys brought up (thanks for the feedback!).
Get it at the same place:
http://hhofministries.org/bpyc/viewscript.php?script=4
(or, if you have the BPyMan, just hit ā€œupdateā€)

I made the following changes:

  • removed per-script move/copy/remove controls
  • shrunk the ā€œTipā€ column
  • added expansion buttons for column fields that were to long to fit (click or wait for tooltip)
  • added a ā€œRefreshā€ button
  • added tooltips

No multi-language yet, but be assured Iā€™m working on plans for including it. Let me know what you all think.

Now, some repliesā€¦

L0GAN: Yeah, I know. :slight_smile: Thanks for the feedback!

Meta-Androcto: First, keep in mind that you arenā€™t the typical user, hehe. An installer wonā€™t exactly help you with the sort of massive script management youā€™re doing. At least not until the second re-code or something. There may be a place for a computer/network wide script manager/browser/installer-all-in-one, but Iā€™m going to just start with what Blender sees and work from there.

Then, as far as your question, why bother with an install script thing anyway?

  1. Users have asked for it (indicating that even if other programs donā€™t supply one, it wouldnā€™t hurt if Blender did).
  2. It is more intuitive. Not everyone wants (or even knows how) to move scripts between directories, track dependencies, re-write headers for menu customization, and whatever other little tweaks one might do with scripts.
  3. Preparation for future functionality. If a standard is to be defined for distributed script packages (enabling authors much more flexibility for distributing scripts with complex file structures, or even multi-script packages), or if online/network repositories are to be supported (for both the acquisition of new scripts and receiving updates to current ones), some type of script installer/uninstaller will be needed. It is perfectly fine to put one in place so that, in addition to its immediate benefits, the future can be easily integrated with the present.

How does the script go with scripts that have dependancies?
If a script is installed with the installer, all of the files installed with that script (including other scripts) will be marked as being dependent on one another. At least, thatā€™s the way it will work until a package format is defined. These dependencies will be tracked and maintained by the installer during all other future actions.

Can it install many different files to different directories?
It depends. Iā€™ll need to go through a lot of the downloads currently being circulated to make sure, but if the script is distributed in an archive, the archive will probably be simply unpacked to the directory of the userā€™s choosing (blender default or user defined), and, perhaps, to a subdirectory within the main script directory (for those, like you, who require extra management and organization). Without a package format defined and followed, though, flexibility will likely be limited to ensure that files are put where they can be found when the script is run.

Thanks again!
Levi

There donā€™t appear to be any further comments on the GUI, so either everyoneā€™s been busy with other things, or itā€™s pretty satisfactory.

Third update:
http://hhofministries.org/bpyc/viewscript.php?script=4
(or, use the BPyMan and hit ā€œUpdateā€)

Although it still doesnā€™t add or remove scripts, this version may actually do something useful. You can now easily move scripts between menu categories. Now all we need is support for custom menus and menu names! As a side note, Iā€™m going to begin calling this a script manager since it really does more than installation/uninstallation.

I made the following changes:

  • you can now move scripts between menus (it modifies the filesā€™ headers)
  • various little UI bugs fixed:
    ā€” alternating dark rows display correctly
    ā€” scroll bar appears correctly when the script is first run, and when the window is resized
    ā€” choosing a new display group no longer crashes the script
    ā€” ā€œLocationā€ column now differentiates between scripts in the user specified scripts dir and blenderā€™s default

So, what I need from willing testers:

  • Users of other operating systems (other than Windows). This version reads and writes to files, and I havenā€™t tested it on anything besides Windows. If I could have someone verify that the option to change a scriptā€™s menu location works on Mac and Linux, I would very much appreciate it.
  • Discussion of bugs, features (current or future), GUI, and usability.
  • I would also like to open a discussion about how to display and manage duplicate scripts (two or more script files that have the same headers, and, hence, only display once in the menus). Duplicate scripts can arise in several ways, mainly 1) same script but different filename, 2) script gets copied to a subdirectory, and 3) scripts exist in both the user and blender script directories.
  • For a future feature, would anyone like the ability to display a script in more than one menu?

Thanks!
Levi