Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-09-29 02:56:34 -0400
committerArun Thondapu2016-09-30 07:08:52 -0400
commit73b806450e52343d74b96914da7a12775d31a4f1 (patch)
tree1e052810ef414152568aada96807c2bb6302f39c /features
parent685d39d3b2f27797e28c74ed1e24cc918fc51b7d (diff)
downloadrt.equinox.framework-73b806450e52343d74b96914da7a12775d31a4f1.tar.gz
rt.equinox.framework-73b806450e52343d74b96914da7a12775d31a4f1.tar.xz
rt.equinox.framework-73b806450e52343d74b96914da7a12775d31a4f1.zip
Bug 502519 - Remove Photon native code
Remove photon native code and mentions of it in the build scripts. Change-Id: I114c1d7e9aca98271177ea477e46db36b577d3d0 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'features')
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipseShm.c67
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/photon/.cvsignore2
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/photon/build.sh79
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/photon/build.xml20
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/photon/eclipsePhoton.c288
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/photon/make_qnx.mak57
-rw-r--r--features/org.eclipse.equinox.executable.feature/resources/build.xml8
7 files changed, 0 insertions, 521 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipseShm.c b/features/org.eclipse.equinox.executable.feature/library/eclipseShm.c
index 0aaadbe2b..4fbb39be7 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipseShm.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipseShm.c
@@ -128,73 +128,6 @@ int setSharedData(const _TCHAR* id, const _TCHAR* data) {
return 0;
}
-#elif PHOTON
-
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-int createSharedData(char** id, int size) {
- int fd;
- char* location = "/tmp/eclipse_%x";
- char* name = malloc(strlen(location) + 9);
- sprintf(name, location, getpid());
- if ((fd = shm_open(name, O_RDWR | O_CREAT, 0666 )) == -1) return -1;
- if (ftruncate(fd, size) == -1 ) {
- shm_unlink(name);
- return -1;
- }
- close( fd );
- if (id != NULL) {
- *id = name;
- }
- return 0;
-}
-
-int destroySharedData(char* id) {
- return shm_unlink(id);
-}
-
-int getSharedData(char* id, char** data) {
- int fd, length, size;
- char *sharedData, *newData = NULL;
- if ((fd = shm_open(id, O_RDWR, 0666 )) == -1) return -1;
- size = lseek(fd, 0, SEEK_END);
- sharedData = mmap( 0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
- if (sharedData != MAP_FAILED) {
- if (data != NULL) {
- length = strlen(sharedData) + 1;
- newData = malloc(length);
- memcpy(newData, sharedData, length);
- }
- munmap(sharedData, size);
- }
- close(fd);
- *data = newData;
- return newData == NULL ? -1 : 0;
-}
-
-int setSharedData(char* id, char* data) {
- int fd, length, size;
- char *sharedData;
- if ((fd = shm_open(id, O_RDWR, 0666 )) == -1) return -1;
- size = lseek(fd, 0, SEEK_END);
- sharedData = mmap( 0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
- if (sharedData != MAP_FAILED) {
- if (data != NULL) {
- length = strlen(data) + 1;
- memcpy(sharedData, data, length);
- } else {
- memset(sharedData, 0, sizeof(char));
- }
- munmap(sharedData, size);
- }
- close(fd);
- return 0;
-}
-
#else /* Unix like platforms */
#include <sys/shm.h>
diff --git a/features/org.eclipse.equinox.executable.feature/library/photon/.cvsignore b/features/org.eclipse.equinox.executable.feature/library/photon/.cvsignore
deleted file mode 100644
index 5535df034..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/photon/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.o
-eclipse
diff --git a/features/org.eclipse.equinox.executable.feature/library/photon/build.sh b/features/org.eclipse.equinox.executable.feature/library/photon/build.sh
deleted file mode 100644
index 43ef9b167..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/photon/build.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-#*******************************************************************************
-#
-# Usage: sh build.sh [<optional switches>] [clean]
-#
-# where the optional switches are:
-# -output <PROGRAM_OUTPUT> - executable filename ("eclipse")
-# -os <DEFAULT_OS> - default Eclipse "-os" value
-# -arch <DEFAULT_OS_ARCH> - default Eclipse "-arch" value
-# -ws <DEFAULT_WS> - default Eclipse "-ws" value
-#
-#
-# This script can also be invoked with the "clean" argument.
-
-cd `dirname $0`
-
-# Define default values for environment variables used in the makefiles.
-programOutput="eclipse"
-defaultOS="qnx"
-defaultOSArch="x86"
-defaultWS="photon"
-makefile="make_qnx.mak"
-if [ "$OS" = "" ]; then
- OS=`uname -s`
-fi
-
-# Parse the command line arguments and override the default values.
-extraArgs=""
-while [ "$1" != "" ]; do
- if [ "$1" = "-os" ] && [ "$2" != "" ]; then
- defaultOS="$2"
- shift
- elif [ "$1" = "-arch" ] && [ "$2" != "" ]; then
- defaultOSArch="$2"
- shift
- elif [ "$1" = "-ws" ] && [ "$2" != "" ]; then
- defaultWS="$2"
- shift
- elif [ "$1" = "-output" ] && [ "$2" != "" ]; then
- programOutput="$2"
- shift
- else
- extraArgs="$extraArgs $1"
- fi
- shift
-done
-
-# Set up environment variables needed by the makefiles.
-PROGRAM_OUTPUT="$programOutput"
-DEFAULT_OS="$defaultOS"
-DEFAULT_OS_ARCH="$defaultOSArch"
-DEFAULT_WS="$defaultWS"
-EXEC_DIR=../../../../../rt.equinox.binaries/org.eclipse.equinox.executable
-OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
-
-export OUTPUT_DIR PROGRAM_OUTPUT DEFAULT_OS DEFAULT_OS_ARCH DEFAULT_WS
-
-# If the OS is supported (a makefile exists)
-if [ "$makefile" != "" ]; then
- if [ "$extraArgs" != "" ]; then
- make -f $makefile $extraArgs
- else
- echo "Building $OS launcher. Defaults: -os $DEFAULT_OS -arch $DEFAULT_OS_ARCH -ws $DEFAULT_WS"
- make -f $makefile clean
- make -f $makefile all
- fi
-else
- echo "Unknown OS ($OS) -- build aborted"
-fi
diff --git a/features/org.eclipse.equinox.executable.feature/library/photon/build.xml b/features/org.eclipse.equinox.executable.feature/library/photon/build.xml
deleted file mode 100644
index 990298e64..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/photon/build.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project default="build_eclipse" basedir=".">
-
-<target name="build_eclipse">
- <exec dir="." executable="sh">
- <arg line="${basedir}/build.sh"/>
- <arg line="install"/>
- </exec>
-</target>
-
-<target name="clean">
- <tstamp/>
- <exec dir="." executable="sh">
- <arg line="${basedir}/build.sh"/>
- <arg line="clean"/>
- </exec>
-</target>
-
-</project> \ No newline at end of file
diff --git a/features/org.eclipse.equinox.executable.feature/library/photon/eclipsePhoton.c b/features/org.eclipse.equinox.executable.feature/library/photon/eclipsePhoton.c
deleted file mode 100644
index e5dfbd2a1..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/photon/eclipsePhoton.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Kevin Cornell (Rational Software Corporation)
- *******************************************************************************/
-
-/* Photon specific logic for displaying the splash screen. */
-
-#include "eclipseOS.h"
-#include "eclipseUtil.h"
-#include <Pt.h>
-
-#define PX_IMAGE_MODULES
-#define PX_BMP_SUPPORT
-
-#include <photon/PxImage.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <string.h>
-#include <locale.h>
-#include <libgen.h>
-
-/* Global Variables */
-char dirSeparator = '/';
-char pathSeparator = ':';
-#ifndef J9VM
-char* defaultVM = "java";
-char* shippedVMDir = "jre/bin/";
-#else
-char* defaultVM = "j9";
-char* shippedVMDir = "ive/bin/";
-#endif
-
-/* Define the window system arguments for the various Java VMs. */
-static char* argVM_JAVA[] = { NULL };
-static char* argVM_J9[] = { "-jit", "-ms:32", "-mso:256", NULL };
-
-
-/* Define local variables for the main window. */
-static PtWidget_t* topWindow = NULL;
-
-/* Define local variables for running the JVM and detecting its exit. */
-static pid_t jvmProcess = 0;
-static int jvmExitCode;
-
-/* Local functions */
-static void bringDownSplashWindow( int );
-static void centreWindow( PtWidget_t *widget, PtWidget_t *label);
-static int splashTimeout( PtWidget_t* widget, void* data, PtCallbackInfo_t* id );
-
-/* Display a Message */
-void displayMessage( char* title, char* message )
-{
- if (topWindow == 0)
- {
- initWindowSystem( NULL, NULL, 0 );
- }
-
- PtNotice( NULL,NULL, title, NULL, message, NULL, NULL, NULL, Pt_CENTER | Pt_MODAL );
-}
-
-
-/* Initialize Window System
- *
- * Initialize Photon.
- */
-void initWindowSystem( int* pArgc, char* argv[], int showSplash )
-{
- PtArg_t arg[5];
- int nArgs;
-
- /* Create a top level window with no decorations. */
- setlocale(LC_ALL, "");
- PtInit( NULL );
- nArgs = 0;
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_WINDOW_RENDER_FLAGS, 0, ~0 );
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_WINDOW_MANAGED_FLAGS, Ph_WM_TASKBAR | Ph_WM_CLOSE, ~0 );
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_WINDOW_STATE, Ph_WM_STATE_ISFRONT, ~0 );
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_WINDOW_TITLE, getOfficialName(), ~0 );
- topWindow = PtCreateWidget( PtWindow, Pt_NO_PARENT, nArgs, arg );
-}
-
-
-/* Show the Splash Window
- *
- * Create the splash window, load the bitmap and display the splash window.
- *
- */
-int showSplash( char* timeoutString, char* featureImage )
-{
- int timeout = 0;
- PtWidget_t* label;
- PtArg_t arg[10];
- PhImage_t* image = NULL;
- int nArgs;
- int depth;
- PgDisplaySettings_t settings;
- PgVideoModeInfo_t mode_info;
-
- /* Determine the splash timeout value (in seconds). */
- if (timeoutString != NULL && strlen( timeoutString ) > 0)
- {
- sscanf( timeoutString, "%d", &timeout );
- }
-
- /* Install a signal handler to catch SIGUSR2 (which will shut down the window). */
- signal( SIGUSR2, bringDownSplashWindow );
-
- /* Load the splash image from the feature directory. */
- PgGetVideoMode( &settings );
- PgGetVideoModeInfo( settings.mode, &mode_info );
- depth = mode_info.bits_per_pixel;
- if (featureImage != NULL)
- image = PxLoadImage( featureImage, NULL );
-
- /* If the splash image could not be found, return an error. */
- if (image == NULL)
- return ENOENT;
-
- /* Create a label widget (only child of top window) with the image. */
- nArgs = 0;
- image->flags |= Ph_RELEASE_IMAGE_ALL;
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_LABEL_TYPE, Pt_IMAGE, 0 );
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_LABEL_IMAGE, image, 0 );
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_TEXT_STRING, officialName, 0 );
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_MARGIN_WIDTH, 0, 0 );
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_MARGIN_HEIGHT, 0, 0 );
- label = PtCreateWidget( PtLabel, topWindow, nArgs, arg );
-
- /* Free the image */
- free( image );
-
- /* Centre the splash window and display it. */
- centreWindow( topWindow, label );
-
- /* If a timeout for the splash window was given */
- if (timeout != 0)
- {
- PtAddEventHandler( topWindow, Ph_EV_TIMER, splashTimeout, NULL );
- PtTimerArm( topWindow, (timeout * 1000) );
- }
-
- /* Process messages until the splash window is closed or process is terminated. */
- while (PtWidgetIsRealized( topWindow ))
- {
- PtProcessEvent();
- }
-
- /* Destroy the splash window. */
- PtDestroyWidget( topWindow );
- topWindow = 0;
-
- return 0;
-}
-
-
-/* Get the window system specific VM arguments */
-char** getArgVM( char* vm )
-{
- return (isJ9VM( vm ) ? argVM_J9 : argVM_JAVA);
-}
-
-void fixEnvForJ9( char* vm ) {
- if (isJ9VM( vm )) {
- char *ldpath;
- char newpath[PATH_MAX+1];
-
- ldpath = getenv( "LD_LIBRARY_PATH" );
-
- /* Always dup the string so we can free later */
- if( ldpath != NULL )
- ldpath = strdup( ldpath );
- else
- ldpath = strdup( "" );
-
- /* Get the j9 binary location */
- strncpy( newpath, vm, PATH_MAX );
- dirname( newpath );
-
- /* Add j9 binary location to LD_LIBRARY_PATH */
- ldpath = realloc( ldpath, strlen( ldpath ) + strlen( newpath ) + 2 );
- if( ldpath != NULL )
- {
- strcat( ldpath, ":" );
- strcat( ldpath, newpath );
- }
-
- setenv( "LD_LIBRARY_PATH", ldpath, 1 );
-
- free( ldpath );
- }
-}
-
-/* Start the Java VM
- *
- * This method is called to start the Java virtual machine and to wait until it
- * terminates. The function returns the exit code from the JVM.
- */
-int startJavaVM( char* args[] )
-{
- int exitCode;
-
- fixEnvForJ9 (args [0]);
-
- /* Create a child process for the JVM. */
- jvmProcess = fork();
- if (jvmProcess == 0)
- {
- /* Child process ... start the JVM */
- execv( args[0], args );
-
- /* The JVM would not start ... return error code to parent process. */
- jvmExitCode = errno;
- exit( jvmExitCode );
- }
-
- /* If the JVM is still running, wait for it to terminate. */
- if (jvmProcess != 0)
- {
- wait( &exitCode );
- jvmExitCode = ((exitCode & 0x00ff) == 0 ? (exitCode >> 8) : exitCode); /* see wait(2) */
- }
-
- /* Return the exit code from the JVM. */
- return jvmExitCode;
-}
-
-/*------ Local functions -----*/
-
-
-/* Catch a signal that indicates the splash window is to be brought down. */
-static void bringDownSplashWindow( int sig )
-{
- if (topWindow != 0)
- {
- PtUnrealizeWidget( topWindow );
- }
-}
-
-
-/* Centre the top window on the screen. */
-
-static void centreWindow( PtWidget_t* window, PtWidget_t* expose )
-{
- PtArg_t arg[2];
- int nArgs;
- PhPoint_t pos;
- PhArea_t area;
- PhRect_t rect;
- int width, height;
-
- /* Realize the top window to calculate its width/height. */
- PtExtentWidgetFamily( window );
-
- /* Get the desired dimensions of the window. */
- PtWidgetArea( window, &area );
-
- /* Calculate the X and Y position for the window. */
- PhWindowQueryVisible( Ph_QUERY_WORKSPACE, 0, PhInputGroup(0), &rect );
- width = rect.lr.x - rect.ul.x + 1;
- height = rect.lr.y - rect.ul.y + 1;
- pos.x = rect.ul.x + (width - area.size.w) / 2;
- pos.y = rect.ul.y + (height - area.size.h) / 2;
-
- /* Set the new shell position and display it. */
- nArgs = 0;
- PtSetArg( &arg[ nArgs++ ], Pt_ARG_POS, &pos, 0 );
- PtSetResources( window, nArgs, arg );
- PtRealizeWidget( window );
-}
-
-
-/* Splash Timeout */
-static int splashTimeout( PtWidget_t* widget, void* data, PtCallbackInfo_t* info )
-{
- bringDownSplashWindow( 0 );
- return 1;
-}
diff --git a/features/org.eclipse.equinox.executable.feature/library/photon/make_qnx.mak b/features/org.eclipse.equinox.executable.feature/library/photon/make_qnx.mak
deleted file mode 100644
index 475cf48a3..000000000
--- a/features/org.eclipse.equinox.executable.feature/library/photon/make_qnx.mak
+++ /dev/null
@@ -1,57 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-#*******************************************************************************
-
-# Makefile for creating the Photon eclipse launcher program.
-
-# This makefile expects the following environment variables set:
-#
-# PROGRAM_OUTPUT - the filename of the output executable
-# DEFAULT_OS - the default value of the "-os" switch
-# DEFAULT_OS_ARCH - the default value of the "-arch" switch
-# DEFAULT_WS - the default value of the "-ws" switch
-
-# Define the object modules to be compiled and flags.
-OBJS = eclipse.o eclipseUtil.o eclipseShm.o eclipseConfig.o eclipsePhoton.o
-EXEC = $(PROGRAM_OUTPUT)
-LIBS = -lph -lphrender -lphexlib
-CFLAGS = -O -s -Wall \
- -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
- -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
- -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
- -DJ9VM -I.. -DPHOTON
-
-all: $(EXEC)
-
-.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
-
-eclipse.o: ../eclipse.c ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipse.c -o $@
-
-eclipseShm.o: ../eclipseShm.c ../eclipseShm.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseShm.c -o $@
-
-eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseConfig.c -o $@
-
-eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
- $(CC) $(CFLAGS) -c ../eclipseUtil.c -o $@
-
-$(EXEC): $(OBJS)
- $(CC) -o $(EXEC) $(OBJS) $(LIBS)
-
-install: all
- cp $(EXEC) $(OUTPUT_DIR)
- rm -f $(EXEC) $(OBJS)
-
-clean:
- rm -f $(EXEC) $(OBJS)
diff --git a/features/org.eclipse.equinox.executable.feature/resources/build.xml b/features/org.eclipse.equinox.executable.feature/resources/build.xml
index 859c1c9cf..349ce6709 100644
--- a/features/org.eclipse.equinox.executable.feature/resources/build.xml
+++ b/features/org.eclipse.equinox.executable.feature/resources/build.xml
@@ -233,13 +233,6 @@
</copy>
<chmod perm="755" dir="${feature.base}/hpux.gtk.ia64/${collectingFolder}" includes="launcher" />
</target>
- <target name="rootFilesqnx_photon_x86">
- <mkdir dir="${feature.base}/qnx.photon.x86/${collectingFolder}"/>
- <copy todir="${feature.base}/qnx.photon.x86/${collectingFolder}" failonerror="true" overwrite="true">
- <fileset dir="${basedir}/bin/photon/qnx/x86" includes="**" />
- </copy>
- <chmod perm="755" dir="${feature.base}/qnx.photon.x86/${collectingFolder}" includes="launcher" />
- </target>
<target name="rootFilesgroup_group_group">
<antcall target="rootFileswin32_win32_x86"/>
<antcall target="rootFileswin32_win32_x86_64"/>
@@ -262,7 +255,6 @@
<antcall target="rootFilesaix_gtk_ppc64"/>
<antcall target="rootFilesaix_gtk_ppc"/>
<antcall target="rootFileshpux_gtk_ia64"/>
- <antcall target="rootFilesqnx_photon_x86"/>
</target>
<target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: org.eclipse.platform.launchers.">

Back to the top