by Didier Bur » Mon Apr 20, 2009 9:11 pm
Hi all, I have to build an automatic installer (setup) for a plugin and was searching for the registry key of the install folder of Google Sketchup. I've browsed the registry with regedit but found nothing. Anyone knows where it is (if it exists) ? Scott, you should know that ! Thanks in advance,
-

Didier Bur
-
- Posts: 1238
- Joined: Wed Nov 14, 2007 10:07 pm
- Location: Nancy, France
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by thomthom » Mon Apr 20, 2009 9:55 pm
Sketchup before version 7 didn't have such a registry key.
But the SU7 key can be found in HKLM\Software\Google\Google Sketchup 7\InstallLocation
-

thomthom
- Global Moderator
-
- Posts: 17673
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by thomthom » Mon Apr 20, 2009 9:56 pm
On my Windows7 64bit it's HKLM\Software\Wow6432Node\Google\Google Sketchup 7\InstallLocation
-

thomthom
- Global Moderator
-
- Posts: 17673
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by thomthom » Mon Apr 20, 2009 10:05 pm
However, for SU6, you might be able to detect the installation path by checking the registry for the .skp file association.
-

thomthom
- Global Moderator
-
- Posts: 17673
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by ScottLininger » Mon Apr 20, 2009 10:24 pm
Hey Didier, I don't know the answer to that off the top of my head. Let me know if you have any trouble with Thom's answer and I'll ask the experts (not me!)  This would be a good addition to the FAQ section of the documentation site. I'll add a note to get this done... Cheers,
- Scott Lininger SketchUp Software Engineer Have you visited the Ruby API Docs?
-

ScottLininger
- SketchUp Team
-
- Posts: 170
- Joined: Tue Oct 21, 2008 11:17 pm
- Location: Boulder, CO
-
by Didier Bur » Tue Apr 21, 2009 9:52 pm
Thanks all, OK for SU7, but my installer must work for SU6 as well. The key for skp file association doesn't give any info on where the soft is installed. And the key HKEY_LOCAL_MACHINE\SOFTWARE\Google\Google SketchUp 6\6.4.112 has an 'undefined value'. I've checkeed other softs (Google Earth, Google Updater, Google Desktop...) and they all have a key named "installdir". Please Scott, would you like to ask the experts, please ? 
-

Didier Bur
-
- Posts: 1238
- Joined: Wed Nov 14, 2007 10:07 pm
- Location: Nancy, France
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by ScottLininger » Tue Apr 21, 2009 11:30 pm
From Steve P., our installer expert:
For SU6:
HKEY_LOCAL_MACHINE\SOFTWARE \Microsoft\Windows\ CurrentVersion\\Uninstall\{98736A65-3C79-49EC-B7E9-A3C77774B0E6}\InstallLocation
For SU7: HKEY_LOCAL_MACHINE\SOFTWARE\Google\Google SketchUp 7\InstallLocation
Cheers,
- Scott Lininger SketchUp Software Engineer Have you visited the Ruby API Docs?
-

ScottLininger
- SketchUp Team
-
- Posts: 170
- Joined: Tue Oct 21, 2008 11:17 pm
- Location: Boulder, CO
-
by Matt666 » Wed Apr 22, 2009 8:10 am
I confirm I have this key for SU6 on my computer.
Last edited by Matt666 on Thu Apr 23, 2009 11:01 am, edited 1 time in total.
-
Matt666
-
- Posts: 829
- Joined: Wed Dec 05, 2007 8:38 am
- Location: 48.1184, -1.675
- Name: Matt
-
by Didier Bur » Wed Apr 22, 2009 10:50 pm
1000 thanks 
-

Didier Bur
-
- Posts: 1238
- Joined: Wed Nov 14, 2007 10:07 pm
- Location: Nancy, France
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by fizgig » Wed Nov 04, 2009 5:27 pm
Does anyone have any tips for making a ruby script installer for windows? I need to be able to copy a directory to the c:\ and then copy a loader script into the plugins folder.
-
fizgig
-
- Posts: 69
- Joined: Tue Jun 23, 2009 5:15 pm
by TIG » Wed Nov 04, 2009 5:30 pm
There are lots of free apps out there to do this for you...
TIG
-

TIG
- Global Moderator
-
- Posts: 14002
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by tomasz » Fri Mar 05, 2010 9:03 pm
Does anyone know how recognize which SU version is installed on MAC? I want to find out a folder where install a plugin to.
-
tomasz
- SU2TH & SU2KT Developer
-
- Posts: 776
- Joined: Fri Nov 16, 2007 8:46 pm
- Location: Poland
- Name: Tomasz
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by Chris Fullmer » Fri Mar 05, 2010 9:07 pm
Which do you want? The SU version number or the path to the plugins folder?
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6699
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by tomasz » Fri Mar 05, 2010 9:57 pm
Chris Fullmer wrote:Which do you want? The SU version number or the path to the plugins folder?
I want to build a dmg installer and want to figure out what versions of SU are installed on a system. So essentially I want both, please. 
-
tomasz
- SU2TH & SU2KT Developer
-
- Posts: 776
- Joined: Fri Nov 16, 2007 8:46 pm
- Location: Poland
- Name: Tomasz
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by Dan Rathbun » Fri Mar 05, 2010 10:25 pm
fizgig wrote:Does anyone have any tips for making a ruby script installer for windows? I need to be able to copy a directory to the c:\ and then copy a loader script into the plugins folder.
Fiz, 99% of users HATE (and don't want,) software installed in the root directory of our boot drives! Plugins should be usually be installed in a subfolder of Plugins. (If it's a stanalone plugin that adds some functionality to Sketchup, such as a tool or report generator.) IF it's an 'behind the scenes' enhancement used by MANY plugins, (which would not appear on a menu,) it might go in a subfolder of another Sketchup folder such as Tools (in order to prevent menu building scripts from putting it on a menu.) BUT in this case, you should ask the user to confirm or specify a different folder (as some users also HATE non-Google scripts down in the Tools folder heirarchy.)
-

Dan Rathbun
- Top SketchUcator
-
- Posts: 4091
- Joined: Tue Oct 06, 2009 3:06 am
- Location: Florida, USA
- Name: Dan Rathbun
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: education
- Level of SketchUp: Advanced
by thomthom » Sat Mar 06, 2010 1:46 am
Ditto that - don't want things installed in my C: root.
-

thomthom
- Global Moderator
-
- Posts: 17673
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by tomasz » Sat Mar 06, 2010 11:39 am
Tomasz wrote:I want to build a dmg installer and want to figure out what versions of SU are installed on a system.
Will checking whether a folder "/Library/Application Support/Google SketchUp 6 (or 7)/SketchUp" exists be enough?
-
tomasz
- SU2TH & SU2KT Developer
-
- Posts: 776
- Joined: Fri Nov 16, 2007 8:46 pm
- Location: Poland
- Name: Tomasz
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by Chris Fullmer » Sun Mar 07, 2010 5:42 am
I don't tihnk so. I think they can change their installation path.
There is a registry type setting that gets put in place for them that keeps track of where they installed their SU. You mgiht need to get Google involved since no one else seems to have this info off the top of their head. Butyou should just be able to check their plist or registry or whatever it is called for the SU directories, and install into whichever you want.
Chris
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6699
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by TIG » Sun Mar 07, 2010 11:49 am
Tomasz wrote:Does anyone know how recognize which SU version is installed on MAC? I want to find out a folder where install a plugin to.
The version is obtained using: Sketchup.version Gets the current version of Sketchup in decimal form. Returns: the decimal form of the version OR Sketchup.version_number Get the current version of Sketchup as a whole number for comparisons. The Plugins path is obtained using: Sketchup.find_support_file The find_support_files method is used to retrieve the relative path and name of a file within the SketchUp installation directory. Forward slashes must be used to delimit between directory names. Arguments: filename Name of the filename you want to find. directory (optional) directory relative to the SketchUp installation directory. Returns: path Example: the entire path if successful. If unsuccessful, the method returns false. help_file=Sketchup.find_support_file("help.html","Plugins/") OR Sketchup.find_support_files The find_support_files method is used to retrieve the relative path and name of all matching files within the SketchUp installation directory. Forward slashes must be used to delimit between directory names. Arguments: filename Name of the filename you want to find. directory (optional) directory relative to the SketchUp installation directory. Returns: array an array of files. If unsuccessful, the method returns false. Example array=Sketchup.find_support_files("filename","directory")
What's making this so complicated ???
TIG
-

TIG
- Global Moderator
-
- Posts: 14002
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by Chris Fullmer » Sun Mar 07, 2010 11:52 am
Its for an installer, not a ruby script I think.
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6699
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by TIG » Sun Mar 07, 2010 11:53 am
Aaahhh... 
TIG
-

TIG
- Global Moderator
-
- Posts: 14002
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by filcole » Sun Mar 07, 2010 12:13 pm
I used WiX ( http://wix.sourceforge.net) to create an MSI installer for Sketchup. It can detect the registry setting HKLM\Software\Google\Google Sketchup 7\InstallLocation and install the plugin in the plugins sub-folder. WiX is a pain in the arse to learn and use, but it's the only open source installer that creates MSIs that I could find.
-
filcole
-
- Posts: 7
- Joined: Sat Nov 28, 2009 3:04 pm
by Jim » Sun Mar 07, 2010 5:01 pm
What is a MSI, how it it different/better than what is made by Inno for example?
Installing Ruby scripts in most cases is simply a matter of copying files to the correct location, and possibly registering an uninstaller. It has always been hard for me to justify creating a half-meg installer (or more) for a plug-in that is a few Kb. (Although a meg is not as big as it used to be.)
Does there exist some sort of .zip installer?
-
Jim
- Global Moderator
-
- Posts: 4126
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: NEOH
- Name: Jim
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Intermediate
-
by tomasz » Sun Mar 07, 2010 6:52 pm
I have already created Win installer using NSIS. It reads SU installation locations from the registry. It has small overhead over compressed data size (34 KB with default options). Thanks TIG for such a comprehensive explanation, but I need it for an installer. I want to let a MAC user chose for which already installed SU version have my plugin added.
-
tomasz
- SU2TH & SU2KT Developer
-
- Posts: 776
- Joined: Fri Nov 16, 2007 8:46 pm
- Location: Poland
- Name: Tomasz
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by Dan Rathbun » Sun Mar 07, 2010 11:51 pm
Jim wrote:Does there exist some sort of .zip installer?
As I recall, WinZip could create self-extracing archives (.exe extension,) with a 'suggested destination folder'. When run, a confirm dialog popus up, allowing the user to override with a browse button, or simply edit the destination path in the edit control box. Still in use today, but I believe is a pay WinZip Pro version that only will do this. Cabinet files (.CAB) are free and native to Windows, I believe at least the extract exe is installed on all Win32 machines; the cab maker (filename slips my mind,) is in the SupportTools package. BTW, MSIs use cab by default I believe.
Last edited by Dan Rathbun on Mon Mar 08, 2010 2:55 am, edited 1 time in total.
-

Dan Rathbun
- Top SketchUcator
-
- Posts: 4091
- Joined: Tue Oct 06, 2009 3:06 am
- Location: Florida, USA
- Name: Dan Rathbun
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: education
- Level of SketchUp: Advanced
by Dan Rathbun » Mon Mar 08, 2010 2:29 am
Jim wrote:What is a MSI, how it it different/better than what is made by Inno for example?
An 'MSI' is a nickname used for Microsoft Installer packages, the acronym for THE Microsoft Installer ( aka the Windows Installer,) and also the file extension of the MS Installer database that is created with the MSI. These databases you will have seen with numbered filenames, are placed in the %SystemRoot%\Installer (hidden) folder. The MSI can also create .MSP files, which are Windows Installer Patch files. Different: I downloaded the MSI SDK a few years ago, and started to learn it, but after a half hour, I gave up. It is extrememly complex (or perhaps it's Microsoft's way of confusing documentation and terminology.) It does not have package wizards like Inno. You have to use setup style scripts, and multiple tools (it's a multistep process.) I looked at some of the install package applications out there such as the Wise Installer and InstallShield, but the price was in outerspace! (like thousands of dollars.) I intend, if I have a complex package, to use Inno. I downloaded a SketchupInstaller.iss template for Inno, that looks so simple, I just am itchin' to try it out. Yes, the Nullsoft NSIS is an alternative.
-

Dan Rathbun
- Top SketchUcator
-
- Posts: 4091
- Joined: Tue Oct 06, 2009 3:06 am
- Location: Florida, USA
- Name: Dan Rathbun
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: education
- Level of SketchUp: Advanced
Return to Developers' Forum
|