Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove native code for JNI console #366

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
.metadata
.recommenders

# IntelliJ IDEA
/.idea

# Eclipse output folders for all projects under source/
bin

Expand Down
1 change: 1 addition & 0 deletions build/modules/clc/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<fileset dir="${dir.global.build.source}/com.microsoft.tfs.core/libs" includes="**/*.jar" />
<fileset dir="${dir.global.build.source}/com.microsoft.tfs.core.httpclient/libs" includes="**/*.jar" />
<fileset dir="${dir.global.build.source}/com.microsoft.tfs.logging/lib" includes="**/*.jar" />
<fileset dir="${dir.global.build.source}/com.microsoft.tfs.jni/libs" includes="**/*.jar" />
</copy>

<!-- copy plugin jars -->
Expand Down
1 change: 1 addition & 0 deletions build/modules/sdk/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<!-- copy core dependency jars -->
<copy todir="${dir.binaries}/${name.dist-directory.sdk}/redist/lib" flatten="true">
<fileset dir="${dir.global.build.output.plugins}/com.microsoft.tfs.core/libs" includes="**/*.jar" />
<fileset dir="${dir.global.build.output.plugins}/com.microsoft.tfs.jni/libs" includes="**/*.jar" />
</copy>

<!-- copy dependent plugin jars -->
Expand Down
2 changes: 0 additions & 2 deletions source/com.microsoft.tfs.core/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
<attribute name="javadoc_location" value="jar:platform:/resource/com.microsoft.tfs.core/libs_src/jackson-core-2.4.1/jackson-databind-2.4.1-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="libs/jna/jna-4.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="libs/jna/jna-platform-4.2.1.jar"/>
<classpathentry kind="lib" path="libs/jsr305-1.3.9/jsr305-1.3.9.jar"/>
<classpathentry exported="true" kind="lib" path="libs/oauth2-useragent/oauth2-useragent-0.11.2.jar" sourcepath="libs/oauth2-useragent/oauth2-useragent-0.11.2-sources.jar"/>
<classpathentry kind="output" path="bin"/>
Expand Down
2 changes: 0 additions & 2 deletions source/com.microsoft.tfs.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ Bundle-ClassPath: com.microsoft.tfs.core.jar,
libs/jackson-core-2.4.1/jackson-core-2.4.1.jar,
libs/jackson-core-2.4.1/jackson-databind-2.4.1.jar,
libs/annotation-detector-3.0.4/annotation-detector-3.0.4.jar,
libs/jna/jna-4.2.1.jar,
libs/jna/jna-platform-4.2.1.jar,
libs/slf4j/slf4j-api-1.7.19.jar,
libs/slf4j/slf4j-log4j12-1.7.19.jar,
libs/oauth2-useragent/oauth2-useragent-0.11.2.jar,
Expand Down
2 changes: 0 additions & 2 deletions source/com.microsoft.tfs.core/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ bin.includes = META-INF/,\
libs/jackson-core-2.4.1/jackson-databind-2.4.1.jar,\
libs/applicationinsights-core/applicationinsights-core-1.0.4.jar,\
libs/annotation-detector-3.0.4/annotation-detector-3.0.4.jar,\
libs/jna/jna-4.2.1.jar,\
libs/jna/jna-platform-4.2.1.jar,\
libs/slf4j/slf4j-api-1.7.19.jar,\
libs/slf4j/slf4j-log4j12-1.7.19.jar,\
libs/oauth2-useragent/oauth2-useragent-0.11.2.jar,\
Expand Down
2 changes: 2 additions & 0 deletions source/com.microsoft.tfs.jni/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry exported="true" kind="lib" path="libs/jna/jna-4.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="libs/jna/jna-platform-4.2.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
4 changes: 3 additions & 1 deletion source/com.microsoft.tfs.jni/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ Export-Package: com.microsoft.tfs.jni,
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: com.microsoft.tfs.logging,
com.microsoft.tfs.util
Bundle-ClassPath: com.microsoft.tfs.jni.jar
Bundle-ClassPath: com.microsoft.tfs.jni.jar,
libs/jna/jna-4.2.1.jar,
libs/jna/jna-platform-4.2.1.jar
2 changes: 2 additions & 0 deletions source/com.microsoft.tfs.jni/build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
bin.includes = META-INF/,\
os/,\
com.microsoft.tfs.jni.jar,\
libs/jna/jna-4.2.1.jar,\
libs/jna/jna-platform-4.2.1.jar,\
plugin.properties
source.com.microsoft.tfs.jni.jar = src/
16 changes: 0 additions & 16 deletions source/com.microsoft.tfs.jni/native-src/build-inner.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ rem ###########################################################
if not defined NOJAVAH (
echo Generating C headers...
"%JAVA_HOME%\bin\javah" -classpath "%BUILD_TMP%" -o "%BUILD_TMP%\native_auth.h" com.microsoft.tfs.jni.internal.auth.NativeAuth
"%JAVA_HOME%\bin\javah" -classpath "%BUILD_TMP%" -o "%BUILD_TMP%\native_console.h" com.microsoft.tfs.jni.internal.console.NativeConsole
"%JAVA_HOME%\bin\javah" -classpath "%BUILD_TMP%" -o "%BUILD_TMP%\native_filesystem.h" com.microsoft.tfs.jni.internal.filesystem.NativeFileSystem
"%JAVA_HOME%\bin\javah" -classpath "%BUILD_TMP%" -o "%BUILD_TMP%\native_misc.h" com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc
"%JAVA_HOME%\bin\javah" -classpath "%BUILD_TMP%" -o "%BUILD_TMP%\native_synchronization.h" com.microsoft.tfs.jni.internal.synchronization.NativeSynchronization
Expand All @@ -262,7 +261,6 @@ if not defined NOJAVAH (
)

if not exist "%BUILD_TMP%\native_auth.h" goto javaherror
if not exist "%BUILD_TMP%\native_console.h" goto javaherror
if not exist "%BUILD_TMP%\native_filesystem.h" goto javaherror
if not exist "%BUILD_TMP%\native_misc.h" goto javaherror
if not exist "%BUILD_TMP%\native_synchronization.h" goto javaherror
Expand All @@ -289,7 +287,6 @@ echo Compiling native C code...
rem Compile everything to objects
@echo on
cl -c win32\auth_sspi.c -Fo"%BUILD_TMP%\auth_sspi.obj" %CFLAGS%
cl -c win32\console_jni.c -Fo"%BUILD_TMP%\console_jni.obj" %CFLAGS%
cl -c win32\filesystem_jni.c -Fo"%BUILD_TMP%\filesystem_jni.obj" %CFLAGS%
cl -c win32\misc_jni.c -Fo"%BUILD_TMP%\misc_jni.obj" %CFLAGS%
cl -c win32\synchronization_jni.c -Fo"%BUILD_TMP%\synchronization_jni.obj" %CFLAGS%
Expand All @@ -303,7 +300,6 @@ cl -c common\util.c -Fo"%BUILD_TMP%\util.obj" %CFLAGS%
@echo off

if not exist "%BUILD_TMP%\auth_sspi.obj" goto compileerror
if not exist "%BUILD_TMP%\console_jni.obj" goto compileerror
if not exist "%BUILD_TMP%\filesystem_jni.obj" goto compileerror
if not exist "%BUILD_TMP%\misc_jni.obj" goto compileerror
if not exist "%BUILD_TMP%\synchronization_jni.obj" goto compileerror
Expand All @@ -318,7 +314,6 @@ rem Link individual libraries.

@echo on
link -dll "%BUILD_TMP%\auth.obj" "%BUILD_TMP%\auth_sspi.obj" "%BUILD_TMP%\util.obj" "%BUILD_TMP%\logger_log4j.obj" -out:"%BUILD_TMP%\native_auth.dll" %LFLAGS%
link -dll "%BUILD_TMP%\console_jni.obj" "%BUILD_TMP%\util.obj" -out:"%BUILD_TMP%\native_console.dll" %LFLAGS%
link -dll "%BUILD_TMP%\filesystem_jni.obj" "%BUILD_TMP%\util.obj" "%BUILD_TMP%\objects.obj" advapi32.lib -out:"%BUILD_TMP%\native_filesystem.dll" %LFLAGS%
link -dll "%BUILD_TMP%\misc_jni.obj" "%BUILD_TMP%\util.obj" advapi32.lib -out:"%BUILD_TMP%\native_misc.dll" %LFLAGS%
link -dll "%BUILD_TMP%\synchronization_jni.obj" "%BUILD_TMP%\util.obj" -out:"%BUILD_TMP%\native_synchronization.dll" %LFLAGS%
Expand All @@ -328,7 +323,6 @@ link -dll "%BUILD_TMP%\messagewindow_jni.obj" "%BUILD_TMP%\util.obj" user32.lib
@echo off

if not exist "%BUILD_TMP%\native_auth.dll" goto compileerror
if not exist "%BUILD_TMP%\native_console.dll" goto compileerror
if not exist "%BUILD_TMP%\native_filesystem.dll" goto compileerror
if not exist "%BUILD_TMP%\native_misc.dll" goto compileerror
if not exist "%BUILD_TMP%\native_synchronization.dll" goto compileerror
Expand Down Expand Up @@ -358,11 +352,6 @@ if exist %DESTDIR%\native_auth.dll goto delerror
if exist %SYMBOLDIR%\native_auth.pdb del %SYMBOLDIR%\native_auth.pdb
if exist %SYMBOLDIR%\native_auth.pdb goto delerror

if exist %DESTDIR%\native_console.dll del %DESTDIR%\native_console.dll
if exist %DESTDIR%\native_console.dll goto delerror
if exist %SYMBOLDIR%\native_console.pdb del %SYMBOLDIR%\native_console.pdb
if exist %SYMBOLDIR%\native_console.pdb goto delerror

if exist %DESTDIR%\native_filesystem.dll del %DESTDIR%\native_filesystem.dll
if exist %DESTDIR%\native_filesystem.dll goto delerror
if exist %SYMBOLDIR%\native_filesystem.pdb del %SYMBOLDIR%\native_filesystem.pdb
Expand Down Expand Up @@ -402,11 +391,6 @@ if not exist %DESTDIR%\native_auth.dll goto copyerror
copy "%BUILD_TMP%\native_auth.pdb" %SYMBOLDIR%\native_auth.pdb
if not exist %SYMBOLDIR%\native_auth.pdb goto copyerror

copy "%BUILD_TMP%\native_console.dll" %DESTDIR%\native_console.dll
if not exist %DESTDIR%\native_console.dll goto copyerror
copy "%BUILD_TMP%\native_console.pdb" %SYMBOLDIR%\native_console.pdb
if not exist %SYMBOLDIR%\native_console.pdb goto copyerror

copy "%BUILD_TMP%\native_filesystem.dll" %DESTDIR%\native_filesystem.dll
if not exist %DESTDIR%\native_filesystem.dll goto copyerror
copy "%BUILD_TMP%\native_filesystem.pdb" %SYMBOLDIR%\native_filesystem.pdb
Expand Down
10 changes: 0 additions & 10 deletions source/com.microsoft.tfs.jni/native-src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,13 @@ esac
# The simple names of the libraries we generate. A "lib" prefix
# and/or file extension is added per-platform.
LIBRARY_AUTH="native_auth"
LIBRARY_CONSOLE="native_console"
LIBRARY_FILESYSTEM="native_filesystem"
LIBRARY_MISC="native_misc"
LIBRARY_SYNCHRONIZATION="native_synchronization"
LIBRARY_KEYCHAIN="native_keychain"

# The sources required by each library we compile and link.
SOURCES_AUTH="common/util.c common/objects.c common/logger_log4j.c common/auth.c unix/auth_gss.c"
SOURCES_CONSOLE="common/util.c common/objects.c unix/console_jni.c"
SOURCES_FILESYSTEM="common/util.c common/objects.c unix/filesystem_jni.c"
SOURCES_MISC="common/util.c common/objects.c unix/misc_jni.c"
SOURCES_SYNCHRONIZATION="common/util.c common/objects.c unix/synchronization_jni.c"
Expand Down Expand Up @@ -396,7 +394,6 @@ if [ "$PREVIEW" = 0 ] ; then

$E -n "- Generating C headers... "
javah -jni -o "$TMP/native_auth.h" com.microsoft.tfs.jni.internal.auth.NativeAuth
javah -jni -o "$TMP/native_console.h" com.microsoft.tfs.jni.internal.console.NativeConsole
javah -jni -o "$TMP/native_filesystem.h" com.microsoft.tfs.jni.internal.filesystem.NativeFileSystem
javah -jni -o "$TMP/native_keychain.h" com.microsoft.tfs.jni.internal.keychain.NativeKeychain
javah -jni -o "$TMP/native_misc.h" com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc
Expand Down Expand Up @@ -435,7 +432,6 @@ case $PLATFORM in
CFLAGS="$CFLAGS -fstack-protector -Wstack-protector -D_FORTIFY_SOURCE=2 -I${JAVA_FRAMEWORK}/Headers $arch_support -DMACOS_X -DHAS_STAT_MTIMESPEC"
LDFLAGS="$LDFLAGS -bundle -framework JavaVM -framework SystemConfiguration -framework CoreServices -mmacosx-version-min=10.5"

build_library_gcc "$TMP/lib$LIBRARY_CONSOLE.jnilib" "$SOURCES_CONSOLE"
build_library_gcc "$TMP/lib$LIBRARY_FILESYSTEM.jnilib" "$SOURCES_FILESYSTEM"
build_library_gcc "$TMP/lib$LIBRARY_MISC.jnilib" "$SOURCES_MISC"
build_library_gcc "$TMP/lib$LIBRARY_SYNCHRONIZATION.jnilib" "$SOURCES_SYNCHRONIZATION"
Expand Down Expand Up @@ -471,7 +467,6 @@ case $PLATFORM in
CFLAGS="$CFLAGS -m32 -Di386 -Di586 -DcpuIntel -D_LITTLE_ENDIAN"
fi

build_library_gcc "$TMP/lib$LIBRARY_CONSOLE.so" "$SOURCES_CONSOLE"
build_library_gcc "$TMP/lib$LIBRARY_FILESYSTEM.so" "$SOURCES_FILESYSTEM"
build_library_gcc "$TMP/lib$LIBRARY_MISC.so" "$SOURCES_MISC"
build_library_gcc "$TMP/lib$LIBRARY_SYNCHRONIZATION.so" "$SOURCES_SYNCHRONIZATION"
Expand Down Expand Up @@ -506,7 +501,6 @@ case $PLATFORM in
CFLAGS="$CFLAGS -milp32"
fi

build_library_gcc "$TMP/lib$LIBRARY_CONSOLE.$EXTENSION" "$SOURCES_CONSOLE"
build_library_gcc "$TMP/lib$LIBRARY_FILESYSTEM.$EXTENSION" "$SOURCES_FILESYSTEM"
build_library_gcc "$TMP/lib$LIBRARY_MISC.$EXTENSION" "$SOURCES_MISC"
build_library_gcc "$TMP/lib$LIBRARY_SYNCHRONIZATION.$EXTENSION" "$SOURCES_SYNCHRONIZATION"
Expand Down Expand Up @@ -535,7 +529,6 @@ case $PLATFORM in
LDFLAGS="$LDFLAGS -z defs"
fi

build_library_gcc "$TMP/lib$LIBRARY_CONSOLE.so" "$SOURCES_CONSOLE"
build_library_gcc "$TMP/lib$LIBRARY_FILESYSTEM.so" "$SOURCES_FILESYSTEM"
build_library_gcc "$TMP/lib$LIBRARY_MISC.so" "$SOURCES_MISC"
build_library_gcc "$TMP/lib$LIBRARY_SYNCHRONIZATION.so" "$SOURCES_SYNCHRONIZATION"
Expand Down Expand Up @@ -572,7 +565,6 @@ case $PLATFORM in
CFLAGS="$CFLAGS -DPOWERPC -D_BIG_ENDIAN"
fi

build_library_gcc "$TMP/lib$LIBRARY_CONSOLE.a" "$SOURCES_CONSOLE"
build_library_gcc "$TMP/lib$LIBRARY_FILESYSTEM.a" "$SOURCES_FILESYSTEM"
build_library_gcc "$TMP/lib$LIBRARY_MISC.a" "$SOURCES_MISC"
build_library_gcc "$TMP/lib$LIBRARY_SYNCHRONIZATION.a" "$SOURCES_SYNCHRONIZATION"
Expand All @@ -599,7 +591,6 @@ case $PLATFORM in
LDFLAGS="$LDFLAGS -z defs"
fi

build_library_gcc "$TMP/lib$LIBRARY_CONSOLE.so" "$SOURCES_CONSOLE"
build_library_gcc "$TMP/lib$LIBRARY_FILESYSTEM.so" "$SOURCES_FILESYSTEM"
build_library_gcc "$TMP/lib$LIBRARY_MISC.so" "$SOURCES_MISC"
build_library_gcc "$TMP/lib$LIBRARY_SYNCHRONIZATION.so" "$SOURCES_SYNCHRONIZATION"
Expand Down Expand Up @@ -627,7 +618,6 @@ case $PLATFORM in
CFLAGS="$CFLAGS -D_POSIX_SOURCE -D_XOPEN_SOURCE=500 -I$JAVA_HOME/include -W \"c,langlvl(extended),float(ieee),dll,exportall\""
LDFLAGS="$LDFLAGS -W l,dll"

build_library_zos "$TMP/lib$LIBRARY_CONSOLE.so" "$EBCDIC_DIR" "$SOURCES_CONSOLE"
build_library_zos "$TMP/lib$LIBRARY_FILESYSTEM.so" "$EBCDIC_DIR" "$SOURCES_FILESYSTEM"
build_library_zos "$TMP/lib$LIBRARY_MISC.so" "$EBCDIC_DIR" "$SOURCES_MISC"
build_library_zos "$TMP/lib$LIBRARY_SYNCHRONIZATION.so" "$EBCDIC_DIR" "$SOURCES_SYNCHRONIZATION"
Expand Down
117 changes: 0 additions & 117 deletions source/com.microsoft.tfs.jni/native-src/unix/console_jni.c

This file was deleted.

Loading