Skip to content

Commit b64f9d2

Browse files
authored
Merge pull request #160 from sillsdev/improve-post-build-steps
Made post-build steps work if ParatextInstallDir does not have trailing backslash
2 parents b70087d + 4ba95ba commit b64f9d2

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Transcelerator™ helps Bible translation teams translate comprehension checking
55
## How do I get set up to develop Transcelerator as a Paratext plugin?
66

77
* To get set up to use and build Transcelerator, you will need to download [Paratext](https://paratext.org/).
8-
* There are some post-build commands that will attempt to copy the plugin files to a (potentially) useful location if you are building using the "Debug - Copy to Paratext" or "Release - Copy to Paratext" configurations. Depending on your individual needs, you might want to tweak the details, but if you do, please don't include your tweaks in a pull request. When building the "Release - Copy to Paratext" configuration for the first time, it will attempt to set up the necessary directory structure by copying files into the default install location(s) for Paratext. You need to be running Visual Studio as an administrator, or the robocopy command(s) will fail.
8+
* There are some post-build commands that will attempt to copy the plugin files to a (potentially) useful location if you are building using the "Debug - Copy to Paratext" or "Release - Copy to Paratext" configurations. Generally, you can get these to do what you want by setting the ParatextInstallDir environment variable to point to the folder where you have Paratext installed or, if you are a Paratext developer, to the folder where Paratext (debug) files are output. Depending on your individual needs, you might want to tweak the details, but if you do, please don't include your tweaks in a pull request. When building the "Release - Copy to Paratext" configuration for the first time, it will attempt to set up the necessary directory structure by copying files into the default install location(s) for Paratext. You need to be running Visual Studio as an administrator, or the robocopy command(s) will fail.
99
* To learn to use Transcelerator, see the [wiki](https://github.com/sillsdev/Transcelerator/wiki) and the [Tutorial](https://software.sil.org/transcelerator/features/tutorial/) page on the Transcelerator website.
1010
* Unit tests depend on [NUnit](https://nunit.org/). I recommend using [Jet Brains Resharper](https://www.jetbrains.com/resharper/), which has built-in test running capabilities.
1111
* The [Paratext Demo Plugins](https://github.com/ubsicap/paratext_demo_plugins) repository has more advanced information about the Paratext plugin architecture, which will explain more about how to build a plugin like Transcelerator.

Transcelerator.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<s:Boolean x:Key="/Default/UserDictionary/Words/=scrref/@EntryIndexedValue">True</s:Boolean>
3737
<s:Boolean x:Key="/Default/UserDictionary/Words/=startref/@EntryIndexedValue">True</s:Boolean>
3838
<s:Boolean x:Key="/Default/UserDictionary/Words/=Stemmer/@EntryIndexedValue">True</s:Boolean>
39+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Transcelerator/@EntryIndexedValue">True</s:Boolean>
3940
<s:Boolean x:Key="/Default/UserDictionary/Words/=Transcelerator_0027s/@EntryIndexedValue">True</s:Boolean>
4041
<s:Boolean x:Key="/Default/UserDictionary/Words/=TXL_0027s/@EntryIndexedValue">True</s:Boolean>
4142
<s:Boolean x:Key="/Default/UserDictionary/Words/=uninflected/@EntryIndexedValue">True</s:Boolean>

Transcelerator/Transcelerator.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -622,18 +622,18 @@ IF NOT "$(ConfigurationName)" == "Debug - Copy To Paratext" goto release
622622
IF "%25ParatextInstallDir%25" == "" goto copytoparatext
623623
IF NOT EXIST "%25ParatextInstallDir%25" goto copytoparatext
624624

625-
robocopy $(TargetDir) "%25ParatextInstallDir%25plugins\$(ProjectName)" *.* /R:0 /NFL /NDL /np
625+
robocopy $(TargetDir) "%25ParatextInstallDir%25\plugins\$(ProjectName)" *.* /R:0 /NFL /NDL /np
626626
if %25ERRORLEVEL%25 GEQ 8 goto failed
627627
@REM Remove files we know are not needed:
628-
IF EXIST "%25ParatextInstallDir%25plugins\$(ProjectName)\$(TargetName).dll" del "%25ParatextInstallDir%25plugins\$(ProjectName)\$(TargetName).dll"
628+
IF EXIST "%25ParatextInstallDir%25\plugins\$(ProjectName)\$(TargetName).dll" del "%25ParatextInstallDir%25\plugins\$(ProjectName)\$(TargetName).dll"
629629

630-
robocopy $(TargetDir)lib\win-x64 "%25ParatextInstallDir%25plugins\$(ProjectName)" *.* /R:0 /NFL /NDL /np
630+
robocopy $(TargetDir)lib\win-x64 "%25ParatextInstallDir%25\plugins\$(ProjectName)" *.* /R:0 /NFL /NDL /np
631631
if %25ERRORLEVEL%25 GEQ 8 goto failed
632-
robocopy $(TargetDir)runtimes\win-x64\native "%25ParatextInstallDir%25plugins\$(ProjectName)" *.* /R:0 /NFL /NDL /np
632+
robocopy $(TargetDir)runtimes\win-x64\native "%25ParatextInstallDir%25\plugins\$(ProjectName)" *.* /R:0 /NFL /NDL /np
633633
if %25ERRORLEVEL%25 GEQ 8 goto failed
634-
robocopy $(TargetDir)..\..\..\..\DistFiles "%25ParatextInstallDir%25plugins\$(ProjectName)" /S *.* /R:0 /NFL /NDL /np
634+
robocopy $(TargetDir)..\..\..\..\DistFiles "%25ParatextInstallDir%25\plugins\$(ProjectName)" /S *.* /R:0 /NFL /NDL /np
635635
if %25ERRORLEVEL%25 GEQ 8 goto failed
636-
robocopy "$(TargetDir)..\..\..\..\Docs\Help Topics" "%25ParatextInstallDir%25plugins\$(ProjectName)\docs" /S *.* /R:0 /NFL /NDL /np
636+
robocopy "$(TargetDir)..\..\..\..\Docs\Help Topics" "%25ParatextInstallDir\%25plugins\$(ProjectName)\docs" /S *.* /R:0 /NFL /NDL /np
637637
if %25ERRORLEVEL%25 GEQ 8 goto failed
638638
goto done
639639

TxlMasterQuestionPreProcessor/TxlMasterQuestionPreProcessor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ IF NOT EXIST "%25ParatextInstallDir%25" goto copytoparatext
313313
robocopy "$(TargetDir)." "%25ParatextInstallDir%25\plugins\$(ProjectName)"
314314
if %25ERRORLEVEL%25 GEQ 8 goto failed
315315
@REM Remove files we know are not needed:
316-
IF EXIST "%25ParatextInstallDir%25plugins\$(ProjectName)\$(TargetName).dll" del "%25ParatextInstallDir%25plugins\$(ProjectName)\$(TargetName).dll"
316+
IF EXIST "%25ParatextInstallDir%25\plugins\$(ProjectName)\$(TargetName).dll" del "%25ParatextInstallDir%25\plugins\$(ProjectName)\$(TargetName).dll"
317317

318318
goto copytoparatext
319319

0 commit comments

Comments
 (0)