Extension Store v3.0

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 8:09 pm

TIG wrote:Well done.

Here's an updated version of the RB.

What needs doing about the modifier-keys ?
Server-side JS ??


I assume you mean the function keys? One way (which I have tested) is to translate them from the lower case characters to short strings on the Ruby side, as 'p' => 'F1', 'q' => 'F2'. Modifiers ctrl, alt, shift applied to them are coded and work exactly the same as for all other keys, except they still mean the function key. I have some alt-F keys already, and I see they are fine in the dialog.

The alternative would be to create some sort of little icons for them on the javascript side. Your call...that seems like more work to me.

Edit: If you really did mean the modifier keys, they already get nice icons that work fine.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 8:17 pm

A further thought: maybe Context Menu Flyout items should get their own "category" on the dialog? SketchUp encodes them as Edit menu actions because they also appear there when you have a selection, but most users probably think of them as right-click actions.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby Gábor » Fri Mar 08, 2019 10:33 am

Thank you for all the answers to my questions to both of you. Yesterday I had to run away to a private event so sorry that I did not answer immediately.

I've checked the latest .rb what TIG posted and on my PC even the Fn keys are displayed correctly:

SUFunctionKeys.JPG



Is it so on MAC?

What is your opinion? Are there any modifications needed at the Javascript?
0

Gábor 
SketchUcation IT
 

Re: Extension Store v3.0

Postby slbaumgartner » Fri Mar 08, 2019 1:53 pm

Here's a screenshot from my Mac. I added a case statement on the Ruby side to convert the lower-case letters to their F-key equivalents, and with that done the javascript side looks ok to me.

Note to TIG: I haven't tested the pre-2018 (.plist) branch of the code. I'll try to get to that later today.

Screen Shot 2019-03-08 at 7.49.30 AM.png
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby TIG » Fri Mar 08, 2019 1:59 pm

On a MAC what is shown ?

Posts crossed.

Thanks,

So on a MAC it's OK in >=v2018 ?

PS: But what's the "case statement" fix ?
Ruby side [or JS side] ??

PPS: Thanks for looking at the plist older version.
That used to work although it always had the Tools/Eraser typo you've just uncovered !
Not sure how it coped with "F2" etc...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby slbaumgartner » Fri Mar 08, 2019 3:01 pm

TIG wrote:So on a MAC it's OK in >=v2018 ?

PS: But what's the "case statement" fix ?
Ruby side [or JS side] ??


Ruby side at about line 186
Code: Select all
               #key=key.upcase if key=~/^[a-z]$/
                                        # no clue why a-o were skipped or if z does anything
                                        if key =~ /^[p-y]$/
                                          case key
                                          when 'p'
                                            key = 'F1'
                                          when 'q'
                                            key = 'F2'
                                          when 'r'
                                            key = 'F3'
                                          when 's'
                                            key = 'F4'
                                          when 't'
                                            key = 'F5'
                                          when 'u'
                                            key = 'F6'
                                          when 'v'
                                            key = 'F7'
                                          when 'w'
                                            key = 'F8'
                                          when 'x'
                                            key = 'F9'
                                          when 'y'
                                            key = 'F10'
                                          # F11 and F12 are not available for shortcuts.
                                          end
                                        end
               ###


TIG wrote:PPS: Thanks for looking at the plist older version.
That used to work although it always had the Tools/Eraser typo you've just uncovered !
Not sure how it coped with "F2" etc...


I'll get to that in a bit...stay tuned.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby slbaumgartner » Fri Mar 08, 2019 5:48 pm

In the shortcuts.plist file they used strange 3-byte codes for function keys. I haven't found any official reference for these, just hacked them out of a sample shortcuts.plist. The attached version of the file will do the F1 etc. substitutions for function keys back to SketchUp 2014 (it uses the Ruby 2.0 String.codepoints method). I put in a version test so I think it should be same as before on earlier versions, but I don't have any available to test...
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby TIG » Fri Mar 08, 2019 7:18 pm

Thanks for the hard work...

I'll include it in a new SketchUcationTools.RBZ etc and pass it to Gábor for publishing in v3.1.8...
1
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby Gábor » Mon Mar 11, 2019 11:48 am

Thank you.

The latest version have been published here: https://sketchucation.com/pluginstore?pln=SketchUcationTools
0

Gábor 
SketchUcation IT
 

Re: Extension Store v3.0

Postby Spenserharp21 » Fri Mar 15, 2019 4:55 pm

Installing the Extension Store into Sketchup is causing the entire program to lock up. Any suggestions?
0

Spenserharp21 
 

Re: Extension Store v3.0

Postby eseb63 » Wed May 29, 2019 9:55 pm

Hello,

I discover Sketchup (Make 2016 due to windows 7 32 bits, with pro trial) and his extensions, and the skechucation one (3.1.8) seems very handy to manage them... when it works :)

I saw that my accented Windows user name could be a problem, but i have also issues when running Sketchup as administrator (which user name is not accented). I saw other users had the sames issues but i didn't see they had fixed them.

When using extension store with accented user name, no info and donate buttons ; the plugin folder seems not recognized (File.exist?(SCF::FOLDER) returns false)

With admin user name, the buttons are visible and launch IE 11, the default internet browser ; but they fail both installing an extension (unzip error : could not unzip archive) ; i have no message in the Ruby console.

I checked and modified IE settings as i read in this thread, repaired the install as admin : nothing worked

So i uninstalled Sketchup, cleaned the remaining registry entries and folders, deleted the firewall rules to make a new install from scratch as administrator. I launched Sketchup as administrator and allowed him again when the firewall asked me.

I hoped it would work better but would you believe it? it's worse. :(

For the window's accented user, no change (although File.exist?(SCF::FOLDER) returns true this time) ; for the admin user, the info and donate buttons have disappeared ; the unzip error remains for both.

I really don't understand why it's worse after a clean install.

So, i need help and thank you in advance...
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Thu May 30, 2019 6:39 pm

Do not install SketchUp as the system administrator - it will create unpredictable permission problems...

There is only one correct way to install / repair any complex app like SketchUp...

Here it is...

Log in to Windows as your normal user-account - if that account has some admin-powers it's OK.
Ensure that SketchUp is closed.
Find the relevant SketchUp installer's exe file - probably in your Downloads folder ?
Select its icon and right-click > context-menu > "Run as administrator"
When prompted choose "Repair" [for a brand new installation choose "Install"].
When it completes restart SketchUp and see if it's any better...

Installing in any other way will give unpredictable results - often relating to folder/file/settings permissions...
Never install as the system-administrator.
Never set the installed SketchUp.exe app's Properties > Compatibility to 'always run as admin' - this will cause other permission problems - like drag-n-drop etc...

Having accented characters in your Windows user-name is a long-known problem.
Can you make a new and c/c the files/folders over ??
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby eseb63 » Thu May 30, 2019 8:42 pm

TIG, thanks for your quick reply

i want to clarify : i created two user accounts years ago :
  • one is accented and don't have admin rights (i never had problems with him before using Sketchup) : i always log to Windows with it.
  • the second has admin rights (not accented) : i use it when asked by Windows or to "run as administrator" a setup for example.

when i said i reinstalled Sketchup as administrator, i simply meaned that i logged to Windows with my normal user account (accented) and ran the setup as administrator (right-click) : what i said was a bit confusing i apologize, and my english is not perfect...

so i think i made the last install as i should and repair as you say should not be necessary ?
(i made the repair as you say afer the first install and it changed nothing).

same thing when i said i launched Sketchup as administrator : logged to Windows with normal user account, right click (run as administrator).

i installed the SkechUcation extension for the two user accounts (launched Sketchup normally, and then "run as administrator")


i don't have a lot of free space to create a new profile ; I thought as an alternative i might launch Sketchup with right click "run as administrator" to use the non accented path : any risk to have permission problems as you said for the 'always run as admin' property?
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Thu May 30, 2019 9:12 pm

Always running the SketchUp.exe file as admin has some subtle effects.
For example, "drag-n-drop" for image-files etc won't work, because SketchUp is then running at an elevated permission-level compared to Windows-Explorer.

But if you can live with that slight limitation, and you can't easily make an unaccented user-account, then that might be the way to go...

Incidentally, can you give us your problematical accented account-name, and your 'locale' [ i.e. Region - from your email-address it might be France? But normally French user-names are encrypted OK ! ], and then also your Window's system-encoding...***
If might help us try and make a better version...
We have already introduced various traps to ensure accented names are correctly interpreted into UTF-8 encoded strings - but obviously not 100% perfectly...

***To get your Windows system-encoding, please do the following...
Using the PC's Windows menu Run cmd.exe, and type into it the following 4 characters + return.
chcp
Copy its returned value to us...
It should be something like [but almost certainly not exactly]: Active code page: 850 - which is what it is in my case == OEM Multilingual Latin 1; Western European (DOS)
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby eseb63 » Thu May 30, 2019 9:33 pm

yes, i am french, and my accented user name is rené

indeed the page code is 850


Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tous droits réservés.

C:\Users\rené>chcp
Page de codes active : 850

C:\Users\rené


but when i run Sketchup with admin rights (user account adminRF), it doesn't work better and there is no accent problem ?
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Thu May 30, 2019 9:48 pm

Very strange !
I'll get our Gábor to look into it too...
I'm not sure it's a string-encoding problem.
Perhaps something else ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby eseb63 » Thu May 30, 2019 10:11 pm

but the question is : which one?

what can explain that install button is visible, and the two others not ?
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Thu May 30, 2019 10:24 pm

eseb63 wrote:but the question is : which one?

what can explain that install button is visible, and the two others not ?
Please explain this more clearly...
Do you mean the ExtensionStore³ dialog ?
Have you tried resizing it horizontally so that the display expands into the wider dialog's space ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby eseb63 » Fri May 31, 2019 8:24 am

Yes i meaned for the extension store dialog, but you were right it's ok after resizing : i didn't think to do that as the left button didn't appear too. Maybe the default size might be a bit larger to avoid this confusing situation ?

so, with this problem fixed, it remains "only" (for the extension store) the install problem with the unzip message error "could not unzip archive", when launching Sketchup with my normal accented user account ,or with "run as administrator".

(after the new install, File.exist?(SCF:FOLDER) returns true for both).
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Fri May 31, 2019 1:59 pm

Can you try the following test...
While logged into Windows as your usual non-admin user...
Login in and manually download an extension from the SketchUcation PluginStore [through this website].
e.g. this one - https://sketchucation.com/pluginstore?pln=PurgeAll
Save it onto your Desktop.
You should get a file named PurgeAll_v3.0.rbz
In SketchUp open the Ruby Console and type path=' then paste the path to your Desktop and add / and the RBZ name and a final '.
e.g. for me its
path='C:\Users\USERNAME\Desktop\PurgeAll_v3.0.rbz'
Now type this command in the Ruby Console, plus <enter> to execute it.
Sketchup.install_from_archive(path)

What happens?
You should then get a warning dialog about installing RBZs - answer 'Yes'.
Then it should return 'true', and the RBZ is installed...

If it is NOT 'true' then in the Ruby Console copy/paste these separately in turn + <enter>:
SCF::PLUGINS

File.exist?(SCF::PLUGINS)

File.writable?(SCF::PLUGINS)


You should get:
C:/Users/USERNAME/AppData/Roaming/SketchUp/SketchUp 201N/SketchUp/Plugins

true

true


Report if they are not all 'true'.
Also consider this in NOT true... find
C:/Users/USERNAME/AppData/Roaming/SketchUp
and right-click > context-menu > Properties > Security > Edit... and ensure that the folder has 'FULL control' permissions set for ALL of the listed entries - let the permissions trickle down to all subfolders and files if necessary...
While you are at it do the same for: C:\Users\USERNAME\AppData\Local\SketchUp folder...

ALSO:
Please try the following, while logged in as your normal non-admin user.
Open SketchUp.
In the Ruby Console copy/paste these separately in turn + <enter>:
SCF::TEMPDIR

File.exist?(SCF::TEMPDIR)

File.writable?(SCF::TEMPDIR)


You should get:
C:/Users/USERNAME/AppData/Local/Temp/SCF

true

true


If this last test does not return 'true', then open that Temp folder, report what's in the SCF subfolder [if anything], and then delete the SCF subfolder.
When SketchUp, and the SketchUcation Toolset next restart [running as your normal non-admin user] it should make a new ../Temp/SCF subfolder, with updated full permissions. Note that this is where the AutoInstall's auto-downloaded RBZ files are placed [temporarily], before they are installed into your user's SketchUp Plugins folder, then auto-deleted...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby eseb63 » Fri May 31, 2019 7:32 pm

i followed your instructions:
- the install of your "Purge All" extension succeeded(returned true), without warning, and i could use it for a test.
- exist? and readable? commands return true for SCF::PLUGINS (
C:/Users/rené/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins)
- all entries have full permissions for Sketchup subfolder(appdata\roaming)
- but i don't have a Sketchup subfolder in appdata\local (only SCF and "SCF Licences") ?
- exist? and readable? commands return true for SCF::TEMPDIR (C:/Users/REN~1/AppData/Local/Temp/SCF)
- all entries have full permissions for subfolder SCF in local\temp (it contained only a log file) ; i deleted it and launched Sketchup again : the unzip error remains
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Fri May 31, 2019 10:09 pm

Thanks.
Note how the user name is rené in the PLUGINS path, but as the DOS equivalent REN~1 in the TEMPDIR path.
BUT both are returning 'true' !
A mystery.

There should be a SketchUp subfolder in ../AppData/Local/ - it's where SketchUp stores preferences etc varying for each version >=2018... BUT your SketchUp version is shown as v2016 - so that's why it's not there !

I've c/c Gábor into this to see if he has any ideas...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby eseb63 » Sat Jun 01, 2019 9:44 am

yes i noticed the dos notation...

i saw in the log file in SCF temp folder that the verbose mode was disable.

the log file after Sketchup opening:
2019-06-01 10:15:12 +0200=GOT_OPEN_URI=true
2019-06-01 10:15:13 +0200=GOT_RUBYZIP=true
2019-06-01 10:15:21 +0200=SCFapi-enabled?true
2019-06-01 10:15:21 +0200=SCFapi-verbose?false

after extension store opening:
2019-06-01 10:16:56 +0200=PluginStore-Run

When i try to install a plugin via the extension store, the log file give no additional information. would it give more with the verbose mode? how to enable it ?

i noticed also when trying to install the Purge All extension via the extension store that an empty PurgeAll_3.0.rbz file was created in the SCF temp folder ; i made a copy before clicking OK on the unzip error dialog : its size is 0, and it contains nothing.
0
Last edited by eseb63 on Sat Jun 01, 2019 2:30 pm, edited 1 time in total.

eseb63 
 

Re: Extension Store v3.0

Postby Gábor » Sat Jun 01, 2019 10:54 am

eseb63 wrote:.... it's size is 0, and it contains nothing.

Could you enter the following URL into your IE's URL line?
http://plugin.sketchucation.com/pluginrepo/rbz/SketchUcationTools.rbz
What happens? Will it download the whole .rbz?
0

Gábor 
SketchUcation IT
 

Re: Extension Store v3.0

Postby eseb63 » Sat Jun 01, 2019 11:46 am

yes the whole rbz file is well downloaded in the downloads folder
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Sat Jun 01, 2019 7:38 pm

This is a mystery indeed...
Can you double-check your normal-user's [rené ?] ../Temp/SCF folder for its permissions...
Here are mine - all set FULL...
Can you do a screenshot of yours?
Capture.PNG
Capture1.PNG

PS: The SCFapi verbose mode is intended to put everything into the Ruby Console as well as into the log.
It is bugged and I've never fixed it !
So I'd just ignore that option - the log is all you get !
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby eseb63 » Sat Jun 01, 2019 9:03 pm

as you can see, i have also full permissions on this folder
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Sun Jun 02, 2019 12:00 pm

Do all of the 4 entries on that list have 'FULL' [contrôle total] permissions ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby eseb63 » Sun Jun 02, 2019 4:38 pm

i made a mistake yesterday : my snapshot was for a bad path (C:\Users\rené\AppData\Local\SCF)
here is the good one (C:\Users\rené\AppData\Local\Temp\SCF)


all entries have full control for the too SCF folders, so it doesn't seem to be a permission problem ?
in addition, when trying autoinstall, the rbz files are created in the temp SCF folder : it wouldn't the case if i didn't have the good permissions : am i wrong ?
but the problem is they are empty : might it be a downloading problem ?
i tried to disable the firewall but the result don't change; any idea about this empty file problem?
0

eseb63 
 

Re: Extension Store v3.0

Postby TIG » Sun Jun 02, 2019 5:43 pm

We await Gábor's ideas on this... :?
Seems to me that if the RBZ file downloads into the ../Temp/SCF subfolder, then its contents should be added.
Sketchup.install_from_archive(path)
Should work on the path BUT the earlier code is downloading the chosen RBZ [from SCF] into the ../Temp/SCF folder.

I'm thinking that something in the process is failing because of your user name [I know!] which is encoded in the string from the AutoInstall command's URL...
e.g.
Code: Select all
http://plugin.sketchucation.com/pluginserv_N_N_N.php?hwid=SOME_PC:14&c=oOolNQP1FDH1X0J7dftqxedaJlRHJ7kAZdyx6OzLeFMBPiI5N3xLhaz3MPKtY8s8ks6pK4E1IdCkLXolam0GM8JXYZ&v=v1.0&z=TIG-banana.rbz

The server's current PHP version is "N_N_N" - e.g. 3.0.1
The ?hwid= is the user's Hardware [PC] ID
The &c= is the SCF-member's unique encoded UID
The &v= is the RBZ's current version
The &z= is the RBZ's file name

So I guess the UID is getting messed with - perhaps because of the UID's encoding, and perhaps your 'hwid= device' name [unlikely].
Can you copy/paste your details from the following file:
C:\Users\rené\AppData\Local\SCF\cookie.dat
and
C:\Users\rené\AppData\Local\SCF\device.dat
[something like "WULKnh80tbVyAP5KFxx1"]

The UID should start with your user-name the & and the rest is your SCF uid...
Perhaps its encoding is failing with the "rené" name - either at the Ruby end or the Server end ???
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Developers' Forum

Who is online

Users browsing this forum: Vladimir1974 and 7 guests

Visit our sponsors: