cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Using in a devOps like situation eg TeamCity

PAULR_UK
5-Regular Member

Using in a devOps like situation eg TeamCity

I am using Creo Parametric Release 8.0 and Datecode8.0.0.0

Hello, we have produced a Creo C++ otk plugin - all works fine. But we have a problem with how we deploy. We use TeamCity https://www.jetbrains.com/teamcity/ to run our build pipeline (so we must build all the code and then use the resultant dll for packaging up. We know that we have to use protk_unlock.bat to unlock the dll. The problem is that we have multiple servers to do the Team city builds and teh same one is not used each time. We are assuming that Creo has to be installed on those machines and also the licenses can only be set up on manual install. Is is possible to do unlocking in a less heavyweight way (but still access the license server that allows protk_unlock.exe to run)? I hope this makes some kind of sense? Can give more details if needed. Any suggestions welcome
1 ACCEPTED SOLUTION

Accepted Solutions
FV
17-Peridot
17-Peridot
(To:PAULR_UK)

open protk_unlock.bat file in text editor, look at the last couple lines, there are going to be environmental variable set statement for license servers and the name of the executable file in 'obj' directory. Copy this executable and required dll files in stand-alone directory, set environment variable, run.

HIH. 

View solution in original post

6 REPLIES 6
FV
17-Peridot
17-Peridot
(To:PAULR_UK)

open protk_unlock.bat file in text editor, look at the last couple lines, there are going to be environmental variable set statement for license servers and the name of the executable file in 'obj' directory. Copy this executable and required dll files in stand-alone directory, set environment variable, run.

HIH. 

PAULR_UK
5-Regular Member
(To:FV)

Thanks HIH, I was coming to that conclusion myself after looking at the .bat files, but it is good to have confirmation that that is the approach. 

Paul 

PAULR_UK
5-Regular Member
(To:PAULR_UK)

Hi I have some follow up questions - I maybe answering them myself, but it would be good to get confirmation. The back ground is that we have internal testers and users and some get the dialog indicating that the dll is not unlocked when they start Creo

1) A possible or probable problem is that I complied and run our cut down script which calls protk_unlock.exe at Version 8.0.0.0. Some of our developers are using 8.0.3.0 but for the past month they have not got the unlock error when installing via our Teamcity built installer (which unlocks the dll). But now testers and other non developers have got the problem as we go wider. I have seen on the forum that for each Creo release the corresponding protk_unlock.exe needs to be used. I will check by making builds that match the corresponding protk_unlock.exe 

2) Short of running the protk_unlock.bat (or our equivalent) again, is there a way to verify that an OTK dll has already been unlocked which is independent of protk_unlock.exe? I've looked around Parametric\bin  but nothing stands out. Also running protk_unlock.bat immediately after an unlocking gives a warning "Error: Licenses do not contain a TOOLKIT option code, a requirement for unlocking a TOOLKIT application". The first run mentions that the license is locked for 15 mins which I assume is the cause of that.

3) A more general question and I expect reservations in answering it - what does the unlocking process do to the dll? Also could it appear to be still locked to a person installing the dll, maybe due to an environment setting  or some other missleading reason? This goes with the idea of having an independent verification that a dll has indeed been unlocked. 

Many thanks

FV
17-Peridot
17-Peridot
(To:PAULR_UK)


@PAULR_UK wrote:

Hi I have some follow up questions - I maybe answering them myself, but it would be good to get confirmation. The back ground is that we have internal testers and users and some get the dialog indicating that the dll is not unlocked when they start Creo

1) A possible or probable problem is that I complied and run our cut down script which calls protk_unlock.exe at Version 8.0.0.0. Some of our developers are using 8.0.3.0 but for the past month they have not got the unlock error when installing via our Teamcity built installer (which unlocks the dll). But now testers and other non developers have got the problem as we go wider. I have seen on the forum that for each Creo release the corresponding protk_unlock.exe needs to be used. I will check by making builds that match the corresponding protk_unlock.exe 

2) Short of running the protk_unlock.bat (or our equivalent) again, is there a way to verify that an OTK dll has already been unlocked which is independent of protk_unlock.exe? I've looked around Parametric\bin  but nothing stands out. Also running protk_unlock.bat immediately after an unlocking gives a warning "Error: Licenses do not contain a TOOLKIT option code, a requirement for unlocking a TOOLKIT application". The first run mentions that the license is locked for 15 mins which I assume is the cause of that.

3) A more general question and I expect reservations in answering it - what does the unlocking process do to the dll? Also could it appear to be still locked to a person installing the dll, maybe due to an environment setting  or some other missleading reason? This goes with the idea of having an independent verification that a dll has indeed been unlocked. 

Many thanks


1) is not an issue...

2) compare byte count before and after unlocking - should be different if succeeding...

 

most likely, your 'not-unlocked' problem was caused by running protk_unlock.exe multiple times within 15 minute lockout period. You need to run ptcstatus.bat or lmutil.exe to see if a license is available before running protk_unlock.exe.  protk_unlock.exe accepts multiple arguments (dll files) on a command line - combine... 

HIH.

PAULR_UK
5-Regular Member
(To:FV)

I have a related problem - we are now building both Creo7 and Creo 8 (and will build Creo 9) versions of our add-in. I could use protk_unlock.exe to unlock both dlls as multiple arguments- BUT it seems to me that the version 8 protk_unlock.exe does not unlock Version 7 dll? I presume the same is the other way around. Each protk_unlock.exe is a slightly different size, suggesting there are differences. Can this be confirmed? I assume say version 8.0.0.0 protk_unlock.exe will be able to unlock all version 8 series versions (eg 8.0.3.0, 8.0.6.0 etc) Also is there a way to reduce the 15 minute time lock to say ~ 1 or 2 mins via a configuration? Many thanks

FV
17-Peridot
17-Peridot
(To:PAULR_UK)


@PAULR_UK wrote:

1. I have a related problem - we are now building both Creo7 and Creo 8 (and will build Creo 9) versions of our add-in. I could use protk_unlock.exe to unlock both dlls as multiple arguments- BUT it seems to me that the version 8 protk_unlock.exe does not unlock Version 7 dll? I presume the same is the other way around. Each protk_unlock.exe is a slightly different size, suggesting there are differences. Can this be confirmed? I assume say version 8.0.0.0 protk_unlock.exe will be able to unlock all version 8 series versions (eg 8.0.3.0, 8.0.6.0 etc)

 

2. Also is there a way to reduce the 15 minute time lock to say ~ 1 or 2 mins via a configuration? Many thanks


1 - I did not try Creo 8/Creo 7 combo. Creo 7.0.3.0 unlocks Creo 9.0.2.0 and the unlocked app runs with Creo 9.0.0.0 per my tests. I would check environment variables in your case.

2 - take a look at the license server side and you would find some similarities with license borrowing. google how to deal with stalled borrowed license for flexlm. As usual - keep development related licenses and production related licenses on different servers.

 

HIH.

Top Tags