├── LICENSE.txt ├── Trunk ├── viserver.vi ├── file exists.vi ├── lvlauncher.vi ├── tcpserver.vi ├── fix all paths.vi ├── performaction.vi ├── swap slashes.vi ├── attempt path fix.vi ├── diff black box.vi ├── is absolute path.vi ├── merge black box.vi ├── fix symbolic paths.vi ├── not found message.vi ├── constants │ ├── base path.vi │ ├── tcp vi port.vi │ ├── tcpvi name.vi │ ├── error out ctl.vi │ ├── ni directory.vi │ ├── required keys.vi │ ├── viserver name.vi │ ├── arguments help.vi │ ├── lvversion keys.vi │ ├── args control name.vi │ └── minimum arguments.vi ├── executables │ ├── cmdmain.vi │ ├── diffmain.vi │ ├── mergemain.vi │ ├── arguments.ctl │ ├── parse argument.vi │ ├── set exit code.vi │ ├── find labview exe.vi │ ├── is labview running.vi │ ├── launch tcp vi handler.vi │ ├── launch vi server handler.vi │ ├── try to reach vi server.vi │ ├── get desired labview version.vi │ └── launch labview if not running.vi └── vicompare.lvproj ├── Documentation ├── vi compare.png ├── readme.md └── vi compare.xml ├── .gitignore └── README.md /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /Trunk/viserver.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/viserver.vi -------------------------------------------------------------------------------- /Trunk/file exists.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/file exists.vi -------------------------------------------------------------------------------- /Trunk/lvlauncher.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/lvlauncher.vi -------------------------------------------------------------------------------- /Trunk/tcpserver.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/tcpserver.vi -------------------------------------------------------------------------------- /Trunk/fix all paths.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/fix all paths.vi -------------------------------------------------------------------------------- /Trunk/performaction.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/performaction.vi -------------------------------------------------------------------------------- /Trunk/swap slashes.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/swap slashes.vi -------------------------------------------------------------------------------- /Trunk/attempt path fix.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/attempt path fix.vi -------------------------------------------------------------------------------- /Trunk/diff black box.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/diff black box.vi -------------------------------------------------------------------------------- /Trunk/is absolute path.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/is absolute path.vi -------------------------------------------------------------------------------- /Trunk/merge black box.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/merge black box.vi -------------------------------------------------------------------------------- /Trunk/fix symbolic paths.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/fix symbolic paths.vi -------------------------------------------------------------------------------- /Trunk/not found message.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/not found message.vi -------------------------------------------------------------------------------- /Documentation/vi compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Documentation/vi compare.png -------------------------------------------------------------------------------- /Trunk/constants/base path.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/base path.vi -------------------------------------------------------------------------------- /Trunk/constants/tcp vi port.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/tcp vi port.vi -------------------------------------------------------------------------------- /Trunk/constants/tcpvi name.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/tcpvi name.vi -------------------------------------------------------------------------------- /Trunk/executables/cmdmain.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/cmdmain.vi -------------------------------------------------------------------------------- /Trunk/executables/diffmain.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/diffmain.vi -------------------------------------------------------------------------------- /Trunk/executables/mergemain.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/mergemain.vi -------------------------------------------------------------------------------- /Trunk/constants/error out ctl.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/error out ctl.vi -------------------------------------------------------------------------------- /Trunk/constants/ni directory.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/ni directory.vi -------------------------------------------------------------------------------- /Trunk/constants/required keys.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/required keys.vi -------------------------------------------------------------------------------- /Trunk/constants/viserver name.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/viserver name.vi -------------------------------------------------------------------------------- /Trunk/executables/arguments.ctl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/arguments.ctl -------------------------------------------------------------------------------- /Trunk/constants/arguments help.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/arguments help.vi -------------------------------------------------------------------------------- /Trunk/constants/lvversion keys.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/lvversion keys.vi -------------------------------------------------------------------------------- /Trunk/executables/parse argument.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/parse argument.vi -------------------------------------------------------------------------------- /Trunk/executables/set exit code.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/set exit code.vi -------------------------------------------------------------------------------- /Trunk/constants/args control name.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/args control name.vi -------------------------------------------------------------------------------- /Trunk/constants/minimum arguments.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/constants/minimum arguments.vi -------------------------------------------------------------------------------- /Trunk/executables/find labview exe.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/find labview exe.vi -------------------------------------------------------------------------------- /Trunk/executables/is labview running.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/is labview running.vi -------------------------------------------------------------------------------- /Trunk/executables/launch tcp vi handler.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/launch tcp vi handler.vi -------------------------------------------------------------------------------- /Trunk/executables/launch vi server handler.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/launch vi server handler.vi -------------------------------------------------------------------------------- /Trunk/executables/try to reach vi server.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/try to reach vi server.vi -------------------------------------------------------------------------------- /Trunk/executables/get desired labview version.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/get desired labview version.vi -------------------------------------------------------------------------------- /Trunk/executables/launch labview if not running.vi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smithed/vicompare/HEAD/Trunk/executables/launch labview if not running.vi -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Libraries 2 | *.lvlibp 3 | *.llb 4 | 5 | # Shared objects (inc. Windows DLLs) 6 | *.dll 7 | *.so 8 | *.so.* 9 | *.dylib 10 | 11 | # Executables 12 | *.exe 13 | 14 | # Metadata 15 | *.aliases 16 | *.lvlps 17 | 18 | 19 | /builds/**/* 20 | /Builds/**/* -------------------------------------------------------------------------------- /Documentation/readme.md: -------------------------------------------------------------------------------- 1 | This diff and merge tool follows the call chain shown in vi compare.png. The source for this image is vi compare.xml, and can be opened using the website draw.io. 2 | 3 | The general process is as follows: 4 | 5 | 1. SourceTree/Git loads up the vidiff or vimerge executables and passes them the needed parameters. These exes then determine where they are called from (ie pwd or cd). Then they call cmdmain.vi. 6 | 2. Cmdmain is responsible for loading labview if needed, finding out what types of calls will work, and then launching a server inside of the dev environment. 7 | 3. The server (viserver.vi or tcpserver.vi) will then handle the arguments and use them to determine which action to take. 8 | 4. Performaction.vi parses through the arguments and tries to fix all paths provided. Once paths are fixed, it will call the diff and merge black boxes, as needed. Depending on the outcome (ie either errors or if the user did not save their merge), this will return the outcome to the caller. 9 | 5. The server returns the outcome to the exe and exits. 10 | 6. The exe determines if it should quit with a good or bad return code (ie zero or non-zero). This is returned to Git, which uses the return code to determine if the process was successful (for merge; for diff, it doesn't matter). 11 | 7. Sourcetree takes note of what happened and displays it to the user. 12 | 13 | To make changes, you can generally modify anything in the top level of vicompare\Trunk with the exception of the black box methods and tcpserver.vi/viserver.vi. Anything marked blue in the image is fair game. If additional information is needed from the exe, it will take additional effort to propagate changes upstream, but nothing too bad. By keeping within the blue areas you can be pretty sure the whole process will still work, and all you have to be careful about is making sure your new processing steps work. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | vicompare 2 | ================ 3 | ### This repository and any materials provided by NI therein are provided AS IS. NI DISCLAIMS ANY AND ALL LIABILITIES FOR AND MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE, OR NON-INFRINGEMENT OF INTELLECTUAL PROPERTY. NI shall have no liability for any direct, indirect, incidental, punitive, special, or consequential damages for your use of the repository or any materials contained therein. 4 | ================ 5 | 6 | This is a tool used to perform diff and merge on LabVIEW VIs using git. Git is at present difficult to configure and use, and the paths require significant processing to make them work on windows with LabVIEW's diff tool. This attempts to bridge the gap by adding that processing in a LV executable. 7 | 8 | Instructions are to: 9 | 10 | 1. open vicompare.lvproj (Code can be opened in LabVIEW 2013 or later) 11 | 2. Build the executables, diffmain and mergemain 12 | 3. Build the source distribution, actions 13 | 4. Build the installer 14 | 5. Run the installer 15 | 16 | 17 | If you need to add additional processing steps, all actions performed are called by /diffmergetool/action/performaction. First it determines what to do--diff or merge. This string is automatically inserted as an argument by the main exe (diff or merge executables). It then calls the "fix paths" function, which is responsible for performing all operations on the arguments, which are assumed to be paths at this point. Then, diff or merge is called. Diff and merge are black boxes (private methods), but all the necessary items are exposed as parameters. 18 | 19 | 20 | Configuring for sourcetree is as follows: 21 | 22 | - Difftool: Custom 23 | - Path: C:\viscc\vidiff.exe 24 | - Args: \"$LOCAL\" \"$REMOTE\" 25 | 26 | - Mergetool: Custom 27 | - Path: C:\viscc\vimerge.exe 28 | - Args: \"$BASE\" \"$REMOTE\" \"$LOCAL\" \"$MERGED\" 29 | 30 | Additional args: 31 | -lv or -version specifies the labview version to use 32 | You can also use any of the standard lvdiff commands as of this revision. 33 | -------------------------------------------------------------------------------- /Documentation/vi compare.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Trunk/vicompare.lvproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | 201310 5 | 6 | 7 | 100 8 | false 9 | 10000 10 | 0 11 | 9 12 | true 13 | false 14 | true 15 | true 16 | false 17 | 0 18 | My Computer/VI Server 19 | My Computer/VI Server 20 | true 21 | true 22 | false 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | true 123 | 124 | 125 | 126 | 127 | true 128 | {15632119-4AC2-4B0E-AE10-6A7D0C7D12EC} 129 | {4B21EE6C-D809-45C1-9CE1-B8EAADE24C17} 130 | 8002 131 | true 132 | true 133 | {1C97A170-E896-4D64-BCEC-1C469633F8B1} 134 | 1_diffmain 135 | true 136 | true 137 | true 138 | true 139 | ../builds/executables 140 | relativeToCommon 141 | true 142 | {6A1A3BC4-E768-46CA-9BC1-B40E13B618D8} 143 | 41 144 | 1 145 | vidiff.exe 146 | ../builds/executables/vidiff.exe 147 | true 148 | App 149 | Support Directory 150 | ../builds/executables/data 151 | 2 152 | true 153 | {664C3503-407F-410E-8316-CD80D7B2F022} 154 | Container 155 | 0 156 | /My Computer/exe/launcher/cmdmain.vi 157 | VI 158 | true 159 | 0 160 | /My Computer/exe/launcher 161 | Include 162 | Container 163 | 0 164 | /My Computer/exe/diffmain.vi 165 | TopLevel 166 | VI 167 | 4 168 | NISE 169 | 1_diffmain 170 | 1_diffmain 171 | Copyright © 2014 DS 172 | 1_diffmain 173 | {0F18D1F2-C69C-4BEF-9BEC-C590F3FEF679} 174 | vidiff.exe 175 | 176 | 177 | true 178 | {8B289BEC-C6F1-42AF-AE91-680F84AD1A2C} 179 | {07D39AED-8490-4AE9-98E6-631B4784267E} 180 | 8002 181 | true 182 | true 183 | {4E4E32B5-35A6-4617-8CEC-C7A091DD15DB} 184 | 2_mergemain 185 | true 186 | true 187 | true 188 | true 189 | ../builds/executables 190 | relativeToCommon 191 | true 192 | {D192B5B7-9516-4C6D-A7AB-DEF74155B7A9} 193 | 40 194 | 1 195 | vimerge.exe 196 | ../builds/executables/vimerge.exe 197 | true 198 | App 199 | Support Directory 200 | ../builds/executables/data 201 | 2 202 | true 203 | {664C3503-407F-410E-8316-CD80D7B2F022} 204 | Container 205 | 0 206 | /My Computer/exe/launcher/cmdmain.vi 207 | VI 208 | true 209 | 0 210 | /My Computer/exe/launcher 211 | Include 212 | Container 213 | 0 214 | /My Computer/exe/mergemain.vi 215 | TopLevel 216 | VI 217 | 4 218 | DS 219 | lvlauncher 220 | lvlauncher 221 | Copyright © 2014 DS 222 | lvlauncher 223 | {47D2DF4F-2D44-4EBD-9867-67FE3871F75E} 224 | vimerge.exe 225 | 226 | 227 | true 228 | {BEF7666B-82D6-4ACB-9E05-5CDB20F57837} 229 | 3_actions 230 | true 231 | ../builds/actions 232 | relativeToCommon 233 | {9F8CF89D-0309-451C-984B-2F9584944109} 234 | 38 235 | 1 236 | Destination Directory 237 | ../builds/actions 238 | Support Directory 239 | ../builds/actions/data 240 | 2 241 | {FEBDC48A-D241-4856-9746-F194020F5155} 242 | Container 243 | 0 244 | /My Computer/diffmergetool/action/performaction.vi 245 | Include 246 | VI 247 | 0 248 | /My Computer/diffmergetool/servers/viserver.vi 249 | VI 250 | true 251 | 0 252 | /My Computer/diffmergetool 253 | Include 254 | Container 255 | 0 256 | /My Computer/exe/launcher/cmdmain.vi 257 | Exclude 258 | VI 259 | true 260 | 0 261 | /My Computer/exe 262 | Exclude 263 | Container 264 | 6 265 | 266 | 267 | viscc 268 | {C63B6F86-C439-4240-9AAE-EC6A9DDD0A29} 269 | {B240C314-BA66-4A38-9EB4-7F94B297EE40} 270 | userFolder 271 | National Instruments 272 | {3912416A-D2E5-411B-AFEE-B63654D690C0} 273 | {3ED2CAA5-8C1C-406B-957A-4D6AC21B188C} 274 | userFolder 275 | Shared 276 | {3ED2CAA5-8C1C-406B-957A-4D6AC21B188C} 277 | {7476D715-B632-4EE4-9089-BBE0AE477847} 278 | userFolder 279 | viscc 280 | {7476D715-B632-4EE4-9089-BBE0AE477847} 281 | {6BEBA1AC-E5EE-4D19-A24C-73199CD27B9B} 282 | userFolder 283 | 4 284 | DS 285 | true 286 | ../builds/installer 287 | relativeToCommon 288 | 4_installer 289 | {B240C314-BA66-4A38-9EB4-7F94B297EE40} 290 | vi scc tools 291 | 1.0.41 292 | 32-bit 293 | 13018017 294 | DS 295 | http://www.ds.com/ 296 | {23031F3B-0B7B-4549-955B-A1145590B353} 297 | 0 298 | {AE7F98A5-2E6D-4A14-A511-370B1D31C078} 299 | Software 300 | {DDFAFC8B-E728-4AC8-96DE-B920EBB97A86} 301 | 2 302 | 1 303 | {6BEBA1AC-E5EE-4D19-A24C-73199CD27B9B} 304 | {6BEBA1AC-E5EE-4D19-A24C-73199CD27B9B} 305 | performaction.vi 306 | 0 307 | ldm 308 | sourcetools 309 | /My Computer/diffmergetool/action/performaction.vi 310 | 1 311 | 3_actions 312 | /My Computer/Build Specifications/3_actions 313 | SDIST 314 | {B240C314-BA66-4A38-9EB4-7F94B297EE40} 315 | {B240C314-BA66-4A38-9EB4-7F94B297EE40} 316 | vidiff.exe 317 | 0 318 | ldm 319 | sourcetools 320 | 1 321 | {0F18D1F2-C69C-4BEF-9BEC-C590F3FEF679} 322 | 1 323 | 1_diffmain 324 | /My Computer/Build Specifications/1_diffmain 325 | EXE 326 | {B240C314-BA66-4A38-9EB4-7F94B297EE40} 327 | {B240C314-BA66-4A38-9EB4-7F94B297EE40} 328 | vimerge.exe 329 | 0 330 | vimerge 331 | lvlauncher 332 | 1 333 | {47D2DF4F-2D44-4EBD-9867-67FE3871F75E} 334 | 1 335 | 2_mergemain 336 | /My Computer/Build Specifications/2_mergemain 337 | EXE 338 | 3 339 | 340 | 341 | 342 | 343 | --------------------------------------------------------------------------------