Change deployment scripts location and updated doc.

In order to be able to build with cmake and to have a complete source package including the demo the deployment scripts were moved to the root Cpp folder and updated.
Also the releasing-antlr.md doc file has been updated.
This commit is contained in:
Mike Lischke 2016-08-04 17:03:34 +02:00
parent ccc1fc4939
commit 7abfbc60c6
7 changed files with 57 additions and 51 deletions

View File

@ -248,7 +248,7 @@ Add links to the artifacts from download.html
The C++ target is the most complex one, because it addresses multiple platforms, which require individual handling. We have 4 scenarios to cover:
* **Windows**: static and dynamic libraries for the VC++ runtime 2013 or 2015 (corresponding to Visual Studio 2013 or 2015) + header files. All that in 32 and 64bit, debug + release.
* **MacOS**: static and dynamic libraries + header files.
* **MacOS**: static and dynamic release libraries + header files.
* **iOS**: no prebuilt binaries, but just a zip of the source, including the XCode project to build everything from source.
* **Linux**: no prebuilt binaries, but just a zip of the source code, including the cmake file to build everything from source there.
@ -259,21 +259,21 @@ For each platform there's a deployment script which generates zip archives and c
On a Mac (with XCode 7+ installed):
```bash
cd runtime/Cpp/runtime
cd runtime/Cpp
./deploy-macos.sh
```
On any Mac or Linux machine:
```bash
cd runtime/Cpp/runtime
cd runtime/Cpp
./deploy-source.sh
```
On a Windows machine the build scripts checks if VS 2013 and/or VS 2015 are installed and builds binaries for each, if found. This script requires 7z to be installed (http://7-zip.org).
```bash
cd runtime/Cpp/runtime
cd runtime/Cpp
deploy-windows.cmd
```

View File

@ -21,6 +21,7 @@ The C++ target has been the work of the following people:
## Other contributors
* Marcin Szalowicz, mszalowicz@mailplus.pl (cmake build setup)
* Tim O'Callaghan, timo@linux.com (additional superbuild cmake pattern script)
## Project Status
@ -54,4 +55,5 @@ Either open the included XCode project and build that or use the cmake compilati
- DESTDIR=<antlr4-dir>/runtime/Cpp/run make install
If you don't want to build the demo then simply run cmake without parameters.
There is another cmake script available in the subfolder cmake/ for those who prefer the superbuild cmake pattern.

27
runtime/Cpp/deploy-macos.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# Clean left overs from previous builds if there are any
rm -f -R antlr4-runtime build lib 2> /dev/null
rm antlr4-cpp-runtime-macos.zip 2> /dev/null
# Binaries
xcodebuild -project runtime/antlrcpp.xcodeproj -target antlr4 -configuration Release
xcodebuild -project runtime/antlrcpp.xcodeproj -target antlr4_static -configuration Release
rm -f -R lib
mkdir lib
mv runtime/build/Release/libantlr4-runtime.a lib/
mv runtime/build/Release/libantlr4-runtime.dylib lib/
# Headers
rm -f -R antlr4-runtime
pushd runtime/src
find . -name '*.h' | cpio -pdm ../../antlr4-runtime
popd
# Zip up and clean up
zip -r antlr4-cpp-runtime-macos.zip antlr4-runtime lib
rm -f -R antlr4-runtime build lib
# Deploy
#cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download

9
runtime/Cpp/deploy-source.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# Zip it
rm -f antlr4-cpp-runtime-source.zip
zip -r antlr4-cpp-runtime-source.zip "README.md" "cmake" "demo" "runtime" "CMakeLists.txt" "License.txt" "deploy-macos.sh" "deploy-source.sh" "deploy-windows.cmd" "VERSION" \
-X -x "*.DS_Store*" "antlrcpp.xcodeproj/xcuserdata/*" "*Build*" "*DerivedData*" "*.jar" "demo/generated/*"
# Deploy
#cp antlr4-cpp-runtime-source.zip ~/antlr/sites/website-antlr4/download

View File

@ -1,33 +1,35 @@
@echo off
rem Clean left overs from previous builds if there are any
if exist bin rmdir /S /Q bin
if exist obj rmdir /S /Q obj
if exist bin rmdir /S /Q runtime\bin
if exist obj rmdir /S /Q runtime\obj
if exist lib rmdir /S /Q lib
if exist antlr4-runtime rmdir /S /Q antlr4-runtime
if exist antlr4-cpp-runtime-vs2013.zip erase antlr4-cpp-runtime-vs2013.zip
if exist antlr4-cpp-runtime-vs2015.zip erase antlr4-cpp-runtime-vs2015.zip
rem Headers
xcopy src\*.h antlr4-runtime\ /s
xcopy runtime\src\*.h antlr4-runtime\ /s
rem Binaries
if exist "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" (
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
pushd runtime
msbuild antlr4cpp-vs2013.vcxproj /p:configuration="Release DLL" /p:platform=Win32
msbuild antlr4cpp-vs2013.vcxproj /p:configuration="Release Static" /p:platform=Win32
msbuild antlr4cpp-vs2013.vcxproj /p:configuration="Release DLL" /p:platform=x64
msbuild antlr4cpp-vs2013.vcxproj /p:configuration="Release Static" /p:platform=x64
popd
7z a antlr4-cpp-runtime-vs2013.zip antlr4-runtime
xcopy bin\*.dll lib\ /s
xcopy bin\*.lib lib\ /s
xcopy runtime\bin\*.dll lib\ /s
xcopy runtime\bin\*.lib lib\ /s
7z a antlr4-cpp-runtime-vs2013.zip lib
rmdir /S /Q lib
rmdir /S /Q bin
rmdir /S /Q obj
rmdir /S /Q runtime\bin
rmdir /S /Q runtime\obj
rem if exist antlr4-cpp-runtime-vs2013.zip copy antlr4-cpp-runtime-vs2013.zip ~/antlr/sites/website-antlr4/download
)
@ -35,19 +37,21 @@ if exist "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDe
if exist "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" (
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
pushd runtime
msbuild antlr4cpp-vs2015.vcxproj /p:configuration="Release DLL" /p:platform=Win32
msbuild antlr4cpp-vs2015.vcxproj /p:configuration="Release Static" /p:platform=Win32
msbuild antlr4cpp-vs2015.vcxproj /p:configuration="Release DLL" /p:platform=x64
msbuild antlr4cpp-vs2015.vcxproj /p:configuration="Release Static" /p:platform=x64
popd
7z a antlr4-cpp-runtime-vs2015.zip antlr4-runtime
xcopy bin\*.dll lib\ /s
xcopy bin\*.lib lib\ /s
xcopy runtime\bin\*.dll lib\ /s
xcopy runtime\bin\*.lib lib\ /s
7z a antlr4-cpp-runtime-vs2015.zip lib
rmdir /S /Q lib
rmdir /S /Q bin
rmdir /S /Q obj
rmdir /S /Q runtime\bin
rmdir /S /Q runtime\obj
rem if exist antlr4-cpp-runtime-vs2015.zip copy antlr4-cpp-runtime-vs2015.zip ~/antlr/sites/website-antlr4/download
)

View File

@ -1,27 +0,0 @@
#!/bin/bash
# Clean left overs from previous builds if there are any
rm -f -R antlr4-runtime build lib
rm antlr4-cpp-runtime-macos.zip
# Binaries
xcodebuild -project antlrcpp.xcodeproj -target antlr4 -configuration Release
xcodebuild -project antlrcpp.xcodeproj -target antlr4_static -configuration Release
rm -f -R lib
mkdir lib
mv build/Release/libantlr4-runtime.a lib/
mv build/Release/libantlr4-runtime.dylib lib/
# Headers
rm -f -R antlr4-runtime
pushd src
find . -name '*.h' | cpio -pdm ../antlr4-runtime
popd
# Zip up and clean up
zip -r antlr4-cpp-runtime-macos.zip antlr4-runtime lib
rm -f -R antlr4-runtime build lib
# Deploy
cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download

View File

@ -1,9 +0,0 @@
#!/bin/bash
# Zip it
rm -f antlr4-cpp-runtime-source.zip
zip -r antlr4-cpp-runtime-source.zip "antlr4cpp.*" "antlrcpp-ios" "src" "CMakeLists.txt" "antlrcpp.xcodeproj" \
-X --exclude "**/.DS_Store" "src/lib*" "antlrcpp.xcodeproj/xcuserdata/*"
# Deploy
cp antlr4-cpp-runtime-source.zip ~/antlr/sites/website-antlr4/download