Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set('classlib') into an .exe
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00457219
Message ID:
00457227
Views:
18
We use this approach:

In the Main.Prg or wherever you are calling the Set Classlib from
we check to see if we are in development or if we are in
'EXE' Mode...

Our Default directory is always \Progs so we look for that...

** IF we are in Development
IF ATC('PROGS',SYS(2003))>0
Set Classlib to To C:\The_Folder_of_libs\myLib_where_MyClass_is_stored
Else && We are in Production Mode
Set Classlib to myclasslib
Endif

Another way could also be:

** That way if you move it from the Development machine it wont be found
IF FILE('C:\The_Folder_of_libs\myLib_where_MyClass_is_stored')
Set Classlib to To C:\The_Folder_of_libs\myLib_where_MyClass_is_stored
Else && We are in Production Mode
Set Classlib to myclasslib
Endif


Hope that helps!
Bob





>Hi its hard to me explain this, so i try to explain it in some steps
>
>1 create a pjx
>2 ...create any class (for this example i name it 'myClass' )
>3 include it into the pjx
>4 in the main prg i put some like this:
>Set Classlib To C:\The_Folder_of_libs\myLib_where_MyClass_is_stored
>CreateObject('myClass')
>Read Events
>5 compile all into an exe file
>
>Ok, this works fine since i have my folder and structure intact, but i want to compile one exe and have it to be independent of any folder or file structure, i mean the user can execute it within any location, but the exe give one error when it try to execute the 'set classlib to'... because C:\bla_bla_bla does not exist more.
>What im doing bad?
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform