ФОРУМ за света на PTC CREO CAD/CAM/CAE софтуерните решения
Здравейте,


office@cadcamcae.bg

www.soft.cadcamcae.bg - Софтуерни решения за машиностроене;

www.forum.cadcamcae.bg - Форум;

www.blog.cadcamcae.bg - Блог;

http://e-shop.cadcamcae.bg - Електронен CAD магазин;

http://www.facebook.com/cad.digest

http://twitter.com/cadcamcae

3D инженерни мишки;

Поздрави

ФОРУМ за света на PTC CREO CAD/CAM/CAE софтуерните решения

ФОРУМ: Част от проекта на списание CAD ДАЙДЖЕСТ - www.cadcamcae.bg;

CAD ДАЙДЖЕСТ . Едно онлайн издание за CAD/CAM/CAE технологии и машиностроене
 

ИндексИндекс  PortalPortal  CalendarCalendar  GalleryGallery  Въпроси/ОтговориВъпроси/Отговори  ТърсенеТърсене  ПотребителиПотребители  Потребителски групиПотребителски групи  Регистрирайте сеРегистрирайте се  ВходВход  
Вход
Потребител:
Парола:
Искам да влизам автоматично с всяко посещение: 
:: Забравих си паролата!
Social bookmarking
Social bookmarking Digg  Social bookmarking Delicious  Social bookmarking Reddit  Social bookmarking Stumbleupon  Social bookmarking Slashdot  Social bookmarking Furl  Social bookmarking Yahoo  Social bookmarking Google  Social bookmarking Blinklist  Social bookmarking Blogmarks  Social bookmarking Technorati  

Bookmark and share the address of ФОРУМ за света на PTC CREO CAD/CAM/CAE софтуерните решения on your social bookmarking website
Новини от twitter.
Latest topics
Търсене
 
 

Display results as :
 
Rechercher Advanced Search
Споделете с приятел.
Споделете форума В,,, с,,,в,,,е,,,т,,,а,,, н,,,а,,, CAD/CAM/CAE/PLM i Вашия форум за социално споделянеBookmark and Share
Навигация.
 Portal
 Индекс
 Потребители
 Профил
 Въпроси/Отговори
 Търсене
Декември 2016
НедПонВтоСряЧетПетСъб
    123
45678910
11121314151617
18192021222324
25262728293031
CalendarCalendar

Share | 
 

 Pro/Toolkit: Simplifying Your protk.dat File with Environment Variables

Предишната тема Следващата тема Go down 
АвторСъобщение
Admin
Admin


Male Брой мнения : 795
Местожителство : София, България
Job/hobbies : CAD/CAM специалист
Reputation : 3
Points : 5300
Registration date : 27.03.2008

ПисанеЗаглавие: Pro/Toolkit: Simplifying Your protk.dat File with Environment Variables   Вто 13 Май - 15:03:57

2008
Pro/Toolkit: Simplifying Your protk.dat File with Environment Variables

If you find yourself editing your protk.dat files because you are changing the location of the application or you are using multiple hardware architectures (i.e. Unix and Windows, Win32 and Win64, etc), STOP! Put down the mouse, and slowly step away from the keyboard.

If you use environment variable creatively, you will need one protk.dat file for all of your installations. That's it, just one. Unix and Windows you ask? YES! 32 bit and 64 bit Windows? YES!

The first thing you need to do is to setup an environment variable for the install folder of your application. Call it what you want, but be consistent. I am going to give examples here about the open source Pro/ENGINEER to BRL CAD converter. I'll use the environment variable PROE2BRL_INSTALL for the install folder.

The resulting protk.dat file looks like this:



name PROE2BRLstartup dllexec_file $PROE2BRL_INSTALL/proe2brl.dlltext_dir $PROE2BRL_INSTALL/textallow_stop TRUEend

I know what you're thinking, you think you'll have to change those paths for Windows machines. WRONG! It's a little known secret that Pro/ENGINEER on Windows can handle unix style pathing and environment variable syntax, and not just in protk.dat files. This includes the config.pro file. It may seem strange to those die-hard Windows guys, but it works.

Now the 64 bit Windows guy in the audience (I'll call him Dustin), shouts out "What if we have 32 bit and 64 bit DLL's?!" Well Dustin, no problem there either because Pro/ENGINEER sets some platform specific environment variables that we can use.

We can separate the 32 bit and 64 bit DLL's into two folders. For Windows, this would be "i486_nt" for 32 bit DLL's and "x86e_win64" for 64 bit DLL's. If we plug in the MC environment variable, Pro/ENGINEER uses the correct DLL based on the current architecture.

The resulting protk.dat file looks like this:


name PROE2BRLstartup dllexec_file $PROE2BRL_INSTALL/$mc/proe2brl.dlltext_dir $PROE2BRL_INSTALL/textallow_stop TRUEend

Now the Unix guys, bored with talk of mere a 32 bit application, rant "On Unix, our DLL's are called shared objects and have a .so extension and ... blah blah blah ...". Again, not a problem. If that's a concern, setup another environment variable, let's call it PROE2BRL_EXEC. On Unix this can be set to "proe2brl.so" and on Windows "proe2brl.dll". (Or, just call it "proe2brl.dll" and skip this step)

The resulting protk.dat file looks like this:


name PROE2BRLstartup dllexec_file $PROE2BRL_INSTALL/$mc/$PROE2BRL_EXECtext_dir $PROE2BRL_INSTALL/textallow_stop TRUEend


In the config.pro, we can use this:


protkdat $PROE2BRL_INSTALL/protk.dat
Върнете се в началото Go down
Вижте профила на потребителя http://cadcamcae-bg.top-forum.net
 
Pro/Toolkit: Simplifying Your protk.dat File with Environment Variables
Предишната тема Следващата тема Върнете се в началото 
Страница 1 от 1

Permissions in this forum:Не Можете да отговаряте на темите
ФОРУМ за света на PTC CREO CAD/CAM/CAE софтуерните решения :: PTC CREO 3.0: СОФТУЕР ЗА МАШИНОСТРОЕНЕ :: CREO 3.0: Моделиер от висок клас (бивш Pro/ENGINEER Wildfire)-
Идете на: