Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #11160 > unrolled thread
| Started by | "Philippe Bayard (Belgium)" <philbayard@gmail.com> |
|---|---|
| First post | 2017-11-21 07:36 -0800 |
| Last post | 2019-06-04 00:22 -0700 |
| Articles | 19 — 9 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Command line to get latest version and compile an App. "Philippe Bayard (Belgium)" <philbayard@gmail.com> - 2017-11-21 07:36 -0800
Re: Command line to get latest version and compile an App. JohnMartens <martens@tennishulp.info> - 2017-11-21 20:11 +0100
Re: Command line to get latest version and compile an App. "Philippe Bayard (Belgium)" <philbayard@gmail.com> - 2017-11-22 14:26 -0800
Re: Command line to get latest version and compile an App. "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-11-23 06:06 +0100
Re: Command line to get latest version and compile an App. JohnMartens <martens@tennishulp.info> - 2017-11-23 06:55 +0100
Re: Command line to get latest version and compile an App. "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-11-23 07:15 +0100
Re: Command line to get latest version and compile an App. jeanphilippe@igsoft.be - 2017-11-23 05:08 -0800
Re: Command line to get latest version and compile an App. Robert van der Hulst <rjvanderhulst@gmail.com> - 2017-11-23 05:58 -0800
Re: Command line to get latest version and compile an App. jeanphilippe@igsoft.be - 2017-11-23 07:52 -0800
Re: Command line to get latest version and compile an App. Robert van der Hulst <rjvanderhulst@gmail.com> - 2017-11-23 09:27 -0800
Re: Command line to get latest version and compile an App. jeanphilippe@igsoft.be - 2017-11-23 10:20 -0800
Re: Command line to get latest version and compile an App. jeanphilippe@igsoft.be - 2017-11-23 11:32 -0800
Re: Command line to get latest version and compile an App. Jean-Luc Stassen <jls@igsoft.be> - 2017-12-17 03:53 -0800
Re: Command line to get latest version and compile an App. "Philippe Bayard (Belgium)" <philbayard@gmail.com> - 2018-04-06 03:39 -0700
Re: Command line to get latest version and compile an App. "Philippe Bayard (Belgium)" <philbayard@gmail.com> - 2018-04-06 03:57 -0700
Re: Command line to get latest version and compile an App. Stefan Ungemach <stefan.ungemach@bingo-ev.de> - 2021-12-11 04:53 -0800
Re: Command line to get latest version and compile an App. "j...@igsoft.be" <jls@igsoft.be> - 2021-12-12 01:42 -0800
Re: Command line to get latest version and compile an App. "Ronny K. Rodrigues" <ronny@deltasge.com.br> - 2019-05-29 07:47 -0700
Re: Command line to get latest version and compile an App. jeanphilippe@igsoft.be - 2019-06-04 00:22 -0700
| From | "Philippe Bayard (Belgium)" <philbayard@gmail.com> |
|---|---|
| Date | 2017-11-21 07:36 -0800 |
| Subject | Command line to get latest version and compile an App. |
| Message-ID | <a3b99f75-bc8c-46d0-9a5c-797f809c6d8d@googlegroups.com> |
Hi everyone, Is it possible to create a batch file or a script to automatise a deployment? Which means : 1) Get latest module one by one 2) Compile 3) Generate executables And if possible get some log of what happens if something goes wrong. It would be nice in order to integrate it in something like TeamCity. Best regards, Philippe Bayard
[toc] | [next] | [standalone]
| From | JohnMartens <martens@tennishulp.info> |
|---|---|
| Date | 2017-11-21 20:11 +0100 |
| Message-ID | <9d773fea-a8e7-5162-8b8f-3b05918a814c@tennishulp.info> |
| In reply to | #11160 |
I use VO Script to build an exe for every customer https://www.grafxsoft.com/voscript.htm By filling a .PRG file ons can compile customer specific parameters into the EXE file John Op 21-11-2017 om 16:36 schreef Philippe Bayard (Belgium): > Hi everyone, > > Is it possible to create a batch file or a script to automatise a deployment? > > Which means : > > 1) Get latest module one by one > 2) Compile > 3) Generate executables > > And if possible get some log of what happens if something goes wrong. > > It would be nice in order to integrate it in something like TeamCity. > > Best regards, > Philippe Bayard >
[toc] | [prev] | [next] | [standalone]
| From | "Philippe Bayard (Belgium)" <philbayard@gmail.com> |
|---|---|
| Date | 2017-11-22 14:26 -0800 |
| Message-ID | <36379a20-7bd1-46fe-90f8-ce602839f8de@googlegroups.com> |
| In reply to | #11161 |
Thank you John for your answer. What i'm looking for is more like a command line tool for the VO IDE. It's kinda like what VOPP does, but with the "Get Latest" in addition. I think i've read somewhere in the newsgroup that there are some class to manage Adam. But i'm not really sure about it. Le mardi 21 novembre 2017 20:11:52 UTC+1, JohnMartens a écrit : > I use VO Script to build an exe for every customer > https://www.grafxsoft.com/voscript.htm > By filling a .PRG file ons can compile customer specific parameters into > the EXE file > > John > > > Op 21-11-2017 om 16:36 schreef Philippe Bayard (Belgium): > > Hi everyone, > > > > Is it possible to create a batch file or a script to automatise a deployment? > > > > Which means : > > > > 1) Get latest module one by one > > 2) Compile > > 3) Generate executables > > > > And if possible get some log of what happens if something goes wrong. > > > > It would be nice in order to integrate it in something like TeamCity. > > > > Best regards, > > Philippe Bayard > >
[toc] | [prev] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2017-11-23 06:06 +0100 |
| Message-ID | <f7n3aaFn6p8U1@mid.individual.net> |
| In reply to | #11163 |
Hi Philippe, you could look at RepoScript: http://www.bbrowser.com/english/tools/reposcript.htm I have not used it, but I know a few people that use it regularly. Maybe it can do what you need. Wolfgang Philippe Bayard (Belgium) wrote: > Thank you John for your answer. > > What i'm looking for is more like a command line tool for the VO IDE. > It's kinda like what VOPP does, but with the "Get Latest" in addition. > > I think i've read somewhere in the newsgroup that there are some > class to manage Adam. > > But i'm not really sure about it. > > > > Le mardi 21 novembre 2017 20:11:52 UTC+1, JohnMartens a écrit : > > I use VO Script to build an exe for every customer > > https://www.grafxsoft.com/voscript.htm > > By filling a .PRG file ons can compile customer specific parameters > > into the EXE file > > > > John > > > > > > Op 21-11-2017 om 16:36 schreef Philippe Bayard (Belgium): > > > Hi everyone, > > > > > > Is it possible to create a batch file or a script to automatise a > > > deployment? > > > > > > Which means : > > > > > > 1) Get latest module one by one > > > 2) Compile > > > 3) Generate executables > > > > > > And if possible get some log of what happens if something goes > > > wrong. > > > > > > It would be nice in order to integrate it in something like > > > TeamCity. > > > > > > Best regards, > > > Philippe Bayard > > > --
[toc] | [prev] | [next] | [standalone]
| From | JohnMartens <martens@tennishulp.info> |
|---|---|
| Date | 2017-11-23 06:55 +0100 |
| Message-ID | <843fcdb5-a4d6-372d-2ec0-22619e57000f@tennishulp.info> |
| In reply to | #11164 |
I meant RepoScript as well (and not VOScript) ... http://www.votools.com/german/tools/reposcript.htm This scripting tool controls Adam Op 23-11-2017 om 06:06 schreef Wolfgang Riedmann: > Hi Philippe, > > you could look at RepoScript: > > http://www.bbrowser.com/english/tools/reposcript.htm > > I have not used it, but I know a few people that use it regularly. > Maybe it can do what you need. > > Wolfgang > > > > > Philippe Bayard (Belgium) wrote: > >> Thank you John for your answer. >> >> What i'm looking for is more like a command line tool for the VO IDE. >> It's kinda like what VOPP does, but with the "Get Latest" in addition. >> >> I think i've read somewhere in the newsgroup that there are some >> class to manage Adam. >> >> But i'm not really sure about it. >> >> >> >> Le mardi 21 novembre 2017 20:11:52 UTC+1, JohnMartens a écrit : >>> I use VO Script to build an exe for every customer >>> https://www.grafxsoft.com/voscript.htm >>> By filling a .PRG file ons can compile customer specific parameters >>> into the EXE file >>> >>> John >>> >>> >>> Op 21-11-2017 om 16:36 schreef Philippe Bayard (Belgium): >>>> Hi everyone, >>>> >>>> Is it possible to create a batch file or a script to automatise a >>>> deployment? >>>> >>>> Which means : >>>> >>>> 1) Get latest module one by one >>>> 2) Compile >>>> 3) Generate executables >>>> >>>> And if possible get some log of what happens if something goes >>>> wrong. >>>> >>>> It would be nice in order to integrate it in something like >>>> TeamCity. >>>> >>>> Best regards, >>>> Philippe Bayard >>>> > > >
[toc] | [prev] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2017-11-23 07:15 +0100 |
| Message-ID | <f7n7cjFo1a4U1@mid.individual.net> |
| In reply to | #11165 |
Hi John, > I meant RepoScript as well (and not VOScript) ... > > http://www.votools.com/german/tools/reposcript.htm > > This scripting tool controls Adam if RepoScript is not enough: Adam has a documented API so one could build the tools itself - or pay Joachim or Paul to do some custom development. Wolfgang > > > Op 23-11-2017 om 06:06 schreef Wolfgang Riedmann: > > Hi Philippe, > > > > you could look at RepoScript: > > > > http://www.bbrowser.com/english/tools/reposcript.htm > > > > I have not used it, but I know a few people that use it regularly. > > Maybe it can do what you need. > > > > Wolfgang > > > > > > > > > > Philippe Bayard (Belgium) wrote: > > > > > Thank you John for your answer. > > > > > > What i'm looking for is more like a command line tool for the VO > > > IDE. It's kinda like what VOPP does, but with the "Get Latest" > > > in addition. > > > > > > I think i've read somewhere in the newsgroup that there are some > > > class to manage Adam. > > > > > > But i'm not really sure about it. > > > > > > > > > > > > Le mardi 21 novembre 2017 20:11:52 UTC+1, JohnMartens a écrit : > > > > I use VO Script to build an exe for every customer > > > > https://www.grafxsoft.com/voscript.htm > > > > By filling a .PRG file ons can compile customer specific > > > > parameters into the EXE file > > > > > > > > John > > > > > > > > > > > > Op 21-11-2017 om 16:36 schreef Philippe Bayard (Belgium): > > > > > Hi everyone, > > > > > > > > > > Is it possible to create a batch file or a script to > > > > > automatise a deployment? > > > > > > > > > > Which means : > > > > > > > > > > 1) Get latest module one by one > > > > > 2) Compile > > > > > 3) Generate executables > > > > > > > > > > And if possible get some log of what happens if something goes > > > > > wrong. > > > > > > > > > > It would be nice in order to integrate it in something like > > > > > TeamCity. > > > > > > > > > > Best regards, > > > > > Philippe Bayard > > > > > > > > > > > --
[toc] | [prev] | [next] | [standalone]
| From | jeanphilippe@igsoft.be |
|---|---|
| Date | 2017-11-23 05:08 -0800 |
| Message-ID | <3f35e783-3c78-4ba6-8cd3-b02c105345f7@googlegroups.com> |
| In reply to | #11160 |
Thank you that's exactly what i'm looking for. The only thing missing is the possibility to load the latest version from source control (Visual source safe) through the tool. Where can i find the documentation of Adam API ? If i can automatize this task through the API, it could be perfect ! Le mardi 21 novembre 2017 16:36:57 UTC+1, Philippe Bayard (Belgium) a écrit : > Hi everyone, > > Is it possible to create a batch file or a script to automatise a deployment? > > Which means : > > 1) Get latest module one by one > 2) Compile > 3) Generate executables > > And if possible get some log of what happens if something goes wrong. > > It would be nice in order to integrate it in something like TeamCity. > > Best regards, > Philippe Bayard
[toc] | [prev] | [next] | [standalone]
| From | Robert van der Hulst <rjvanderhulst@gmail.com> |
|---|---|
| Date | 2017-11-23 05:58 -0800 |
| Message-ID | <93c06f11-3a2b-4ffa-baf6-b9836a73bfbf@googlegroups.com> |
| In reply to | #11167 |
Philippe, Look in the SDK subfolder of VO 2.8. There is a SDKDEf28.AEF It has the prototypes of all functions that you would need. The SCC module has the functions related to SCC. The SCC functions are not documented, but most names are pretty obvious. - Open a project - Get the AppID of an app - Use VOSCCAppIsUnderSCC() to check if an app is under SCC - Use VOSCCAllGet() to get the latest modules and compiler options Most of the other stuff is documented in vo28sdk.chm in the help folder. If you have questions, feel free to ask. Robert
[toc] | [prev] | [next] | [standalone]
| From | jeanphilippe@igsoft.be |
|---|---|
| Date | 2017-11-23 07:52 -0800 |
| Message-ID | <3fc076d9-9abe-4f2e-845f-12e50829f4c4@googlegroups.com> |
| In reply to | #11169 |
Nice ! Thank you very much for the detailed explanation ! I have now an executable which lists all projects, open them, list apps, and if it is under SCC run a get latest all for this app. The only thing is that it sometimes open a dialog to ask me what to do when there is a conflict. Is there a way to manage this to force "Replace existing"? Thank you very much again ;) Le jeudi 23 novembre 2017 14:58:41 UTC+1, Robert van der Hulst a écrit : > Philippe, > Look in the SDK subfolder of VO 2.8. There is a SDKDEf28.AEF > It has the prototypes of all functions that you would need. > The SCC module has the functions related to SCC. > The SCC functions are not documented, but most names are pretty obvious. > - Open a project > - Get the AppID of an app > - Use VOSCCAppIsUnderSCC() to check if an app is under SCC > - Use VOSCCAllGet() to get the latest modules and compiler options > > Most of the other stuff is documented in vo28sdk.chm in the help folder. > > If you have questions, feel free to ask. > > Robert
[toc] | [prev] | [next] | [standalone]
| From | Robert van der Hulst <rjvanderhulst@gmail.com> |
|---|---|
| Date | 2017-11-23 09:27 -0800 |
| Message-ID | <58d1a937-3235-4582-adbd-7004da9978e4@googlegroups.com> |
| In reply to | #11170 |
JP,
If you delete the files from the SCC folder that belongs to the app before doing a getlatest then you should not get this message.
You can read the local path in the .SCC file that matches the .VOA file for the app.
I do not think there is a public Adam API function that gives you the name of the .VOA or .SCC name for an app
To lookup the file name of the .VOA and .SCC file you could read the the _catalog.vo file. The first 8 bytes of this file are a header. Then for each App there is the following record:
typedef struct _APPDIRENTRY
{
CHAR achName[MAXAPPNAMELEN + 1];
AID aid;
CHAR achFileName[10];
BOOL fSysLib;
} APPDIRENTRY;
MAXAPPNAMELEN = 63
AID = 16 bits unsigned int
BOOL = 32 bits int. 0 = FALSE, any other value = TRUE
Total record = 80 bytes
Robert
[toc] | [prev] | [next] | [standalone]
| From | jeanphilippe@igsoft.be |
|---|---|
| Date | 2017-11-23 10:20 -0800 |
| Message-ID | <4c2f1ae5-5259-4496-9756-47c900b76ff5@googlegroups.com> |
| In reply to | #11171 |
The conflicts is always over the ".MDF" file in the project folder.
I've tried to delete it before doing a get latest and it has been rewrited.
I'm not sure of what this file contains and if deleting it is dangerous or not... ;)
Le jeudi 23 novembre 2017 18:27:40 UTC+1, Robert van der Hulst a écrit :
> JP,
>
> If you delete the files from the SCC folder that belongs to the app before doing a getlatest then you should not get this message.
> You can read the local path in the .SCC file that matches the .VOA file for the app.
>
> I do not think there is a public Adam API function that gives you the name of the .VOA or .SCC name for an app
>
> To lookup the file name of the .VOA and .SCC file you could read the the _catalog.vo file. The first 8 bytes of this file are a header. Then for each App there is the following record:
>
> typedef struct _APPDIRENTRY
> {
> CHAR achName[MAXAPPNAMELEN + 1];
> AID aid;
> CHAR achFileName[10];
> BOOL fSysLib;
> } APPDIRENTRY;
>
>
> MAXAPPNAMELEN = 63
> AID = 16 bits unsigned int
> BOOL = 32 bits int. 0 = FALSE, any other value = TRUE
> Total record = 80 bytes
>
> Robert
[toc] | [prev] | [next] | [standalone]
| From | jeanphilippe@igsoft.be |
|---|---|
| Date | 2017-11-23 11:32 -0800 |
| Message-ID | <e3f3e2c6-b4ae-4dd2-a169-88f3cc3ee103@googlegroups.com> |
| In reply to | #11172 |
Ok, i did have 2 libraries with OLE compontents, so i set up a specific MDF filename in the project properties.
I will try like this.
Le jeudi 23 novembre 2017 19:20:47 UTC+1, jeanph...@igsoft.be a écrit :
> The conflicts is always over the ".MDF" file in the project folder.
> I've tried to delete it before doing a get latest and it has been rewrited.
>
> I'm not sure of what this file contains and if deleting it is dangerous or not... ;)
>
>
> Le jeudi 23 novembre 2017 18:27:40 UTC+1, Robert van der Hulst a écrit :
> > JP,
> >
> > If you delete the files from the SCC folder that belongs to the app before doing a getlatest then you should not get this message.
> > You can read the local path in the .SCC file that matches the .VOA file for the app.
> >
> > I do not think there is a public Adam API function that gives you the name of the .VOA or .SCC name for an app
> >
> > To lookup the file name of the .VOA and .SCC file you could read the the _catalog.vo file. The first 8 bytes of this file are a header. Then for each App there is the following record:
> >
> > typedef struct _APPDIRENTRY
> > {
> > CHAR achName[MAXAPPNAMELEN + 1];
> > AID aid;
> > CHAR achFileName[10];
> > BOOL fSysLib;
> > } APPDIRENTRY;
> >
> >
> > MAXAPPNAMELEN = 63
> > AID = 16 bits unsigned int
> > BOOL = 32 bits int. 0 = FALSE, any other value = TRUE
> > Total record = 80 bytes
> >
> > Robert
[toc] | [prev] | [next] | [standalone]
| From | Jean-Luc Stassen <jls@igsoft.be> |
|---|---|
| Date | 2017-12-17 03:53 -0800 |
| Message-ID | <c9a9dea4-0abe-440e-b70a-96c5c5aded60@googlegroups.com> |
| In reply to | #11174 |
Hello Robert, I'm look to a function to touch all the modules of an app (like touch all in the ide) I don't find it, do you know if it exists ? Jean-Luc
[toc] | [prev] | [next] | [standalone]
| From | "Philippe Bayard (Belgium)" <philbayard@gmail.com> |
|---|---|
| Date | 2018-04-06 03:39 -0700 |
| Message-ID | <20608d6f-bd49-4f91-b0de-f8e5a5a2cad5@googlegroups.com> |
| In reply to | #11244 |
Hi everyone, i'm now able to update from source control, touch, compile, and build my app from an external exe. One more question, is there a way to reindex project from my app like the reindex exe does? And is there a way to attach to an existing instance of adam? Right now, i must close my current IDE to do any action, it would be nice, like VOPP to attach myself to the IDE Thanks in advance, Jean-Philippe
[toc] | [prev] | [next] | [standalone]
| From | "Philippe Bayard (Belgium)" <philbayard@gmail.com> |
|---|---|
| Date | 2018-04-06 03:57 -0700 |
| Message-ID | <2526b43a-9b9e-430b-bbd6-9f1de3dca313@googlegroups.com> |
| In reply to | #11532 |
For the reindex, there was a project:reindex method... got it ;) So there is only my question about attaching to an existing instance of adam. Le vendredi 6 avril 2018 12:39:31 UTC+2, Philippe Bayard (Belgium) a écrit : > Hi everyone, > > i'm now able to update from source control, touch, compile, and build my app from an external exe. > > One more question, is there a way to reindex project from my app like the reindex exe does? > > And is there a way to attach to an existing instance of adam? > Right now, i must close my current IDE to do any action, it would be nice, like VOPP to attach myself to the IDE > > Thanks in advance, > Jean-Philippe
[toc] | [prev] | [next] | [standalone]
| From | Stefan Ungemach <stefan.ungemach@bingo-ev.de> |
|---|---|
| Date | 2021-12-11 04:53 -0800 |
| Message-ID | <2b80bed2-669b-430b-bf80-fa01d59106een@googlegroups.com> |
| In reply to | #11532 |
Philippe Bayard (Belgium) schrieb am Freitag, 6. April 2018 um 12:39:31 UTC+2: > Hi everyone, > > i'm now able to update from source control, touch, compile, and build my app from an external exe. > > One more question, is there a way to reindex project from my app like the reindex exe does? > And is there a way to attach to an existing instance of adam? > Right now, i must close my current IDE to do any action, it would be nice, like VOPP to attach myself to the IDE Hi Jean-Philippe, sorry for the stupid question - but does "external exe" mean you have written something in VO, in RepoScript or in some other way? I want to solve the same problem, plus importing a list of AEFs from source control into an existing project. If possible I try to avoid reinventing the wheel - could you please share your knowledge (maybe even a whole script if that's not too much of a desire) with me? Thanks in advance Stefan
[toc] | [prev] | [next] | [standalone]
| From | "j...@igsoft.be" <jls@igsoft.be> |
|---|---|
| Date | 2021-12-12 01:42 -0800 |
| Message-ID | <e85ae787-445c-497e-91ec-a0c374caa187n@googlegroups.com> |
| In reply to | #13490 |
hello Stefan Jean Philippe is working elsewhere now. But, yes he has build an app in VO that manage the functions of ADAM With this app we can: - get latest version from soucre control of all apps in a vo project - touch all - index - compile - build Jean Luc Le samedi 11 décembre 2021 à 13:53:22 UTC+1, Stefan Ungemach a écrit : > Philippe Bayard (Belgium) schrieb am Freitag, 6. April 2018 um 12:39:31 UTC+2: > > Hi everyone, > > > > i'm now able to update from source control, touch, compile, and build my app from an external exe. > > > > One more question, is there a way to reindex project from my app like the reindex exe does? > > And is there a way to attach to an existing instance of adam? > > Right now, i must close my current IDE to do any action, it would be nice, like VOPP to attach myself to the IDE > Hi Jean-Philippe, > > sorry for the stupid question - but does "external exe" mean you have written something in VO, in RepoScript or in some other way? > > I want to solve the same problem, plus importing a list of AEFs from source control into an existing project. If possible I try to avoid reinventing the wheel - could you please share your knowledge (maybe even a whole script if that's not too much of a desire) with me? > > Thanks in advance > Stefan
[toc] | [prev] | [next] | [standalone]
| From | "Ronny K. Rodrigues" <ronny@deltasge.com.br> |
|---|---|
| Date | 2019-05-29 07:47 -0700 |
| Message-ID | <ef75f773-cfac-49a0-99b6-d5091c630fd7@googlegroups.com> |
| In reply to | #11160 |
Em terça-feira, 21 de novembro de 2017 13:36:57 UTC-2, Philippe Bayard (Belgium) escreveu: > Hi everyone, > > Is it possible to create a batch file or a script to automatise a deployment? > > Which means : > > 1) Get latest module one by one > 2) Compile > 3) Generate executables > > And if possible get some log of what happens if something goes wrong. > > It would be nice in order to integrate it in something like TeamCity. > > Best regards, > Philippe Bayard Hi Philippe, good afternoon. I have the same need as you. I already have a routine using RepoScript to increment version, give a touch and compile the applications to generate and publish a new version. However I am not supported to execute a GetLastVersion in RepoScript. Can you share an example code that you are using for this? I tried to do it, but when I gave prjSelect () I already encountered an error: 40256 and I could not move forward. Thanks in advance. Ronny Kleverson Rodrigues Email: ronnykr@gmail.com Maringá - Paraná - Brazil
[toc] | [prev] | [next] | [standalone]
| From | jeanphilippe@igsoft.be |
|---|---|
| Date | 2019-06-04 00:22 -0700 |
| Message-ID | <d8108efa-ff46-43ca-817a-4930698b8c2a@googlegroups.com> |
| In reply to | #12497 |
Hello Ronny,
sorry for the late answer.
Here the sample of my method GetLatest with my class Adam with PrjSelect and Project to manage it.
Warning that i cannot hide the windows during the get latest via sourceSafe... So to get rid of the warning message for .MDF files, i delete them before getting data (because we don't use it).
oAdam := Adam{}
oAdam:OpenCatalog()
aProjects := oAdam:GetProjects()
IF oProj:ProjectName == self:cProject
IF oProj:SELECT( oProj:ProjectName )
cPath := AllTrim(oProj:GetPath(oProj:ProjectName))
IF !Empty( cPath )
aDir := Directory( cPath+"*.MDF")
for j := 1 to ALen(ADir)
IF At(".MDF", ADir[j][F_NAME]) > 0
FErase( cPath + ADir[j][F_NAME] )
ENDIF
next j
ENDIF
buffer := MemAlloc(100)
oAdam:errorCode := AdamGetFirstApp( @pAID )
DO WHILE oAdam:errorCode == SUCCESS .and. pAID<>0
oAdam:errorCode := AdamGetNextApp( @pAID )
IF oAdam:errorCode == SUCCESS .and. pAID<>0
AppQueryName(pAID,buffer, 100)
VOSCCAppIsUnderSCC(pAID, @lIsUnderSCC)
IF lIsUnderSCC
IF VOSCCAllGet(pAID, false) == SUCCESS
//? "Latest version is loaded!"
ELSE
lRet := false
ENDIF
ENDIF
ENDIF
DoEvents()
ENDDO
MemFree(Buffer)
ELSE
WarningBox{self, "Error", "Project is already open"}:show()
ENDIF
ENDIF
oAdam:CLoseCatalog()
oAdam:CloseAdam()
Class Adam
EXPORT errorCode as DWORD
EXPORT MAX_PROJECT_NAME := 100 as DWORD
EXPORT prjEnum as ptr
//Catalog
DECLARE METHOD OpenCatalog
DECLARE METHOD CLoseCatalog
//Projects
DECLARE METHOD GetProjects
//Adam
DECLARE METHOD CloseAdam
METHOD CloseAdam() as LOGIC PASCAL class Adam
errorCode := AdamExit()
return errorCode == SUCCESS
METHOD CLoseCatalog() as LOGIC PASCAL class Adam
IF PrjCatDestroyEnum(PRJEnum) == SUCCESS
return true
else
return false
endif
METHOD GetProjects() as ARRAY PASCAL CLASS Adam
LOCAL buffer as ptr
LOCAL projectName as STRING
LOCAL projects as ARRAY
IF errorCode == SUCCESS
buffer := MemAlloc(MAX_PROJECT_NAME)
projects := {}
errorCode := PrjGetFirst(prjEnum, buffer, MAX_PROJECT_NAME)
DO WHILE errorCode == SUCCESS .and. PSZLen(psz(_cast, buffer)) > 0
projectName := PSZ2String(psz(_cast, buffer))
AAdd(projects, Project{self, projectName})
errorCode := PrjGetNext(prjEnum, buffer, MAX_PROJECT_NAME)
ENDDO
MemFree(Buffer)
ENDIF
RETURN projects
Method Init() class Adam
LOCAL lNew := false as LOGIC
AdamInit(null_ptr, @lNew)
return self
METHOD OpenCatalog() as LOGIC PASCAL class Adam
LOCAL oPtr as ptr
errorCode := PrjCatCreateEnum(null_ptr, null_ptr, @oPtr)
IF errorCode == SUCCESS
self:prjEnum := oPtr
return true
ELSE
return false
ENDIF
Class Project
PROTECT oAdam as Adam
EXPORT ProjectName as STRING
EXPORT errorCode as DWORD
DECLARE METHOD Open
DECLARE METHOD SELECT
DECLARE METHOD CLOSE
DECLARE METHOD GetPath
DECLARE METHOD Reindex
METHOD Close() as LOGIC PASCAL class Project
errorCode := PrjClose()
IF errorCode == SUCCESS
return true
else
return false
ENDIF
METHOD GetPath(name as STRING) as STRING PASCAL class PROJECT
LOCAL projectPath as STRING
LOCAL buffer as ptr
buffer := MemAlloc(500)
errorCode := PrjQueryDir( String2Psz(name), buffer, 500, null)
IF errorCode == SUCCESS .and. PSZLen(psz(_cast, buffer)) > 0
projectPath := PSZ2String(psz(_cast, buffer))
ENDIF
MemFree(Buffer)
return projectPath
Method Init( oOwner, Project) class Project
self:oAdam := oOWner
self:ProjectName := Project
return self
METHOD Open( cPath as STRING ) as LOGIC PASCAL class Project
errorCode := PrjOpen( String2Psz(cPath))
IF errorCode == SUCCESS
return true
else
return false
ENDIF
METHOD Reindex( name as STRING) as LOGIC PASCAL class Project
errorCode := PrjReindex( String2Psz(name))
IF errorCode == SUCCESS
return true
else
return false
ENDIF
METHOD SELECT( name as STRING) as LOGIC PASCAL class Project
errorCode := PrjSelect( String2Psz(name))
IF errorCode == SUCCESS
return true
else
return false
ENDIF
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web