version control for macro development
version control for macro development
I am developping quite some tools for our sw pdm and cad.
swp macros, batch files, mainenance of registry files and various TASK scripts.
At the moment I keep copy of every official release on my disk with rel number in the file name and when I make some modifications I copy and rename the latest with a new number and a wip at the end. As the editing proceed I take some backup copying the current file and appending a sequential number as extension (i.e..000 .001 .002 etc)
It is not optimal and I would like to work with something like PDM, but I do not want to put those files Inside our vault or create a new vault as i need to access the production or the test vault from the same machine while loading a macro from a network drive. also our production and test vaults share the same id so i need to use different machines to access them or wipe the local view every time, so I prefer to have them out of PDM if possible.
I read the SVN or git does not work with swp macros and my understanding of swb macros is they are quite limited as I use multiple modules and forms.
Any suggestion?
swp macros, batch files, mainenance of registry files and various TASK scripts.
At the moment I keep copy of every official release on my disk with rel number in the file name and when I make some modifications I copy and rename the latest with a new number and a wip at the end. As the editing proceed I take some backup copying the current file and appending a sequential number as extension (i.e..000 .001 .002 etc)
It is not optimal and I would like to work with something like PDM, but I do not want to put those files Inside our vault or create a new vault as i need to access the production or the test vault from the same machine while loading a macro from a network drive. also our production and test vaults share the same id so i need to use different machines to access them or wipe the local view every time, so I prefer to have them out of PDM if possible.
I read the SVN or git does not work with swp macros and my understanding of swb macros is they are quite limited as I use multiple modules and forms.
Any suggestion?
Re: version control for macro development
Switch to C# or VB.NET. They are far more powerful languages and you can use git with them.
Re: version control for macro development
How easy is that to do? I've seen threads where users haven't been able to get Microsoft VSTA and Solidworks happy.
viewtopic.php?t=3113
viewtopic.php?t=1967
viewtopic.php?t=3113
viewtopic.php?t=1967
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Re: version control for macro development
I've migrated all of my projects to c# using visual studio community for development and github for version control. Github is a game changer when compared to storage of copies on a network drive.
I do have some .swp macros and those are stored in a PDM folder that users cache latest on login. Macros are just not as easy to work with but some cases take less time to create compared to the c# equivalent.
I do have some .swp macros and those are stored in a PDM folder that users cache latest on login. Macros are just not as easy to work with but some cases take less time to create compared to the c# equivalent.
Re: version control for macro development
The .NET suggestions, are you still doing macros or toss macros all together and do stand alones and add-ins?
Edit: Sorry, I just read the second link and see Jim's opinion on that clearly.
Edit: Sorry, I just read the second link and see Jim's opinion on that clearly.
- Frederick_Law
- Posts: 1947
- Joined: Mon Mar 08, 2021 1:09 pm
- Location: Toronto
- x 1638
- x 1470
Re: version control for macro development
Manually copy to GIT with new release or Rev.
Re: version control for macro development
I opted for a self-hosted Gitlab installation.
Also, please be aware that VS Community has a pretty restrictive license. You have to be a very small enterprise to be legally allowed to use it in a commercial setting.
If you are getting really fancy, you can use the CI/CD features of Gitlab (and Github I suspect) to automatically package and publish add-ins and such every time you push a new tag on the main branch.
-
- Posts: 4
- Joined: Thu Mar 25, 2021 8:20 am
- Location: Germany
- x 3
- Contact:
Re: version control for macro development
You can create a git bare repository on your network and clone it to the local computer you are working on. You cannot work with *.swb files, but you can work with *.bas files. To avoid the disadvantage of working with *.bas files, the *.bas files can be postloaded into a *.swp file. Early Bindings can still be used as usual in the *.swp file. So there are no restrictions. I have been using this system for several years now and have not found any drawbacks to it.
https://github.com/erppdm/VBADC?tab=rea ... file#vbadc
https://github.com/erppdm/VBADC?tab=rea ... file#vbadc
Re: version control for macro development
I have not enough experience with both coding and git so I could be wrong, but it seems that versioning systems are messing with file encoding. while for most users here it has no impact, for us working with Japanese OS it could cause a mess.
All my batch files are made as shift jis encoded, I tried to add one to a test repository git and the diff tool in git desktop,(the first ui I found) show garbled text which means encoding problems.
With thise kind of issues just storing binaries, pdm like would be enough probably. is there a way to force git to see all files as binary or does anyone know another tool that could be used?
All my batch files are made as shift jis encoded, I tried to add one to a test repository git and the diff tool in git desktop,(the first ui I found) show garbled text which means encoding problems.
With thise kind of issues just storing binaries, pdm like would be enough probably. is there a way to force git to see all files as binary or does anyone know another tool that could be used?
Re: version control for macro development
Can you upload a sample file? I'd like to see how it behaves.
Also, you don't really need a program with a fancy UI to work with git. Just install git and use the Git bash application which is basically a git aware command prompt.