diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-10-07 05:38:00 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-10-07 05:38:00 +0000 |
commit | c19ab9ec7f3ac4823802388ac953e9494c613575 (patch) | |
tree | 63513ffd7ce0b3ab3de2d9b619cc4e5b892eea31 /java/cmake/SignJar.cmake | |
parent | bba54b0b14fded1d457f426cdc8843a34d6c9dc5 (diff) | |
download | tigervnc-c19ab9ec7f3ac4823802388ac953e9494c613575.tar.gz tigervnc-c19ab9ec7f3ac4823802388ac953e9494c613575.zip |
Move Java source up one level and allow Java viewer to be built as a standalone project (per community request)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4715 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/cmake/SignJar.cmake')
-rw-r--r-- | java/cmake/SignJar.cmake | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/java/cmake/SignJar.cmake b/java/cmake/SignJar.cmake new file mode 100644 index 00000000..abc35ba6 --- /dev/null +++ b/java/cmake/SignJar.cmake @@ -0,0 +1,30 @@ +if(NOT Java_PATH) + message(FATAL_ERROR "Java_PATH must be defined") +endif() + +if(NOT JAR_FILE) + message(FATAL_ERROR "JAR_FILE must be defined") +endif() + +message(STATUS "Signing ${JAR_FILE}") + +set(KEYTOOL "${Java_PATH}/keytool") +set(JARSIGNER "${Java_PATH}/jarsigner") + +file(REMOVE tigervnc.keystore) +execute_process(COMMAND + ${KEYTOOL} -genkey -alias TigerVNC -keystore tigervnc.keystore -keyalg RSA + -storepass tigervnc -keypass tigervnc -validity 7300 + -dname "CN=TigerVNC, OU=Software Development, O=The TigerVNC Project, L=Austin, S=Texas, C=US" + RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE ERROR) +if(NOT RESULT EQUAL 0) + message(FATAL_ERROR "${KEYTOOL} failed:\n${ERROR}") +endif() +execute_process(COMMAND + ${JARSIGNER} -keystore tigervnc.keystore + -storepass tigervnc -keypass tigervnc ${JAR_FILE} TigerVNC + RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE ERROR) +if(NOT RESULT EQUAL 0) + message(FATAL_ERROR "${JARSIGNER} failed:\n${ERROR}") +endif() +file(REMOVE tigervnc.keystore) |