Skip to content

Commit

Permalink
add missing stuff; get jaxer to build on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Stepanov committed May 3, 2010
1 parent 9aea04a commit 23d82b4
Show file tree
Hide file tree
Showing 211 changed files with 33,786 additions and 10,468 deletions.
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.svn/
.deps/
*.o
*.lo
*.a
*.la
*.lai
*.so
*.so.*
*.slo
server/distro/*.zip
server/distro/jam/Apache22-local/
server/distro/jam/Apache22/
server/AptanaJaxer/
server/src/httpd-2.2.6/
server/src/libevent/
server/src/google/google_breakpad/
server/src/mozilla/ff-release/
server/src/mozilla/ff-debug/
203 changes: 102 additions & 101 deletions server/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,40 +227,40 @@ def filesmatching(path, prefix, pattern):
'src/mozilla/' + ffdir + '/dist/bin/')

# Build Manager.
print "\n===== Building JaxerManager."
if GetOS() == SOLARIS:
#system('cd src/manager/unix && gcc -DSOLARIS -I../../libevent/libevent-1.4.2-rc -o jaxermanager jaxermanager.cpp -L../../libevent/libevent-1.4.2-rc/.libs -levent -lxnet -lstdc++')
system('cd src/manager/unix && gmake -f Makefile.sun clean && gmake -f Makefile.sun')
copyfile('src/manager/unix/jaxermanager',
'src/mozilla/' + ffdir + '/dist/bin/jaxermanager')
elif GetOS() == LINUX:
#system('cd src/manager/unix && g++ -I../../libevent/libevent-1.4.2-rc -L../../libevent/libevent-1.4.2-rc/.libs -levent -lrt -o jaxermanager jaxermanager.cpp')
if (platform.architecture()[0] == "32bit"):
system('cd src/manager/unix && make -f Makefile.linux clean && make -f Makefile.linux')
else:
system('cd src/manager/unix && g++ -DLINUX_64 -I../../libevent/libevent-1.4.2-rc -L../../libevent/libevent-1.4.2-rc/.libs -levent -lrt -o jaxermanager jaxermanager.cpp')
copyfile('src/manager/unix/jaxermanager',
'src/mozilla/' + ffdir + '/dist/bin/jaxermanager')
elif GetOS() == MACOS:
if gcfg['generateDebuggerSymbols'] == True:
system('cd src/manager/unix && bash ./buildMacUniversal.sh GENERATE_SYMBOLS=1')
else:
system('cd src/manager/unix && bash ./buildMacUniversal.sh')
# print "\n===== Building JaxerManager."
# if GetOS() == SOLARIS:
# #system('cd src/manager/unix && gcc -DSOLARIS -I../../libevent/libevent-1.4.2-rc -o jaxermanager jaxermanager.cpp -L../../libevent/libevent-1.4.2-rc/.libs -levent -lxnet -lstdc++')
# system('cd src/manager/unix && gmake -f Makefile.sun clean && gmake -f Makefile.sun')
# copyfile('src/manager/unix/jaxermanager',
# 'src/mozilla/' + ffdir + '/dist/bin/jaxermanager')
# elif GetOS() == LINUX:
# #system('cd src/manager/unix && g++ -I../../libevent/libevent-1.4.2-rc -L../../libevent/libevent-1.4.2-rc/.libs -levent -lrt -o jaxermanager jaxermanager.cpp')
# if (platform.architecture()[0] == "32bit"):
# system('cd src/manager/unix && make -f Makefile.linux clean && make -f Makefile.linux')
# else:
# system('cd src/manager/unix && g++ -DLINUX_64 -I../../libevent/libevent-1.4.2-rc -L../../libevent/libevent-1.4.2-rc/.libs -levent -lrt -o jaxermanager jaxermanager.cpp')
# copyfile('src/manager/unix/jaxermanager',
# 'src/mozilla/' + ffdir + '/dist/bin/jaxermanager')
# elif GetOS() == MACOS:
# if gcfg['generateDebuggerSymbols'] == True:
# system('cd src/manager/unix && bash ./buildMacUniversal.sh GENERATE_SYMBOLS=1')
# else:
# system('cd src/manager/unix && bash ./buildMacUniversal.sh')

copyfile('src/manager/unix/JaxerManager',
'src/mozilla/' + ffdir + '/ppc/dist/bin/JaxerManager')
copyfile('src/manager/unix/JaxerManager',
'src/mozilla/' + ffdir + '/i386/dist/bin/JaxerManager')
elif GetOS() == WINDOWS:
system('cd src/manager/win32 && MSBuild.exe JaxerManager.sln /p:Configuration=release')
copyfile('src/manager/win32/Release/JaxerManager.exe',
'src/mozilla/' + ffdir + '/dist/bin/JaxerManager.exe')
copyfile('src/manager/win32/Release/JaxerManager.pdb',
'src/mozilla/' + ffdir + '/dist/bin/JaxerManager.pdb')

if GetOS() != MACOS:
copyfile('src/manager/JaxerManager.cfg',
'src/mozilla/' + ffdir + '/dist/bin/JaxerManager.cfg')
# copyfile('src/manager/unix/JaxerManager',
# 'src/mozilla/' + ffdir + '/ppc/dist/bin/JaxerManager')
# copyfile('src/manager/unix/JaxerManager',
# 'src/mozilla/' + ffdir + '/i386/dist/bin/JaxerManager')
# elif GetOS() == WINDOWS:
# system('cd src/manager/win32 && MSBuild.exe JaxerManager.sln /p:Configuration=release')
# copyfile('src/manager/win32/Release/JaxerManager.exe',
# 'src/mozilla/' + ffdir + '/dist/bin/JaxerManager.exe')
# copyfile('src/manager/win32/Release/JaxerManager.pdb',
# 'src/mozilla/' + ffdir + '/dist/bin/JaxerManager.pdb')

# if GetOS() != MACOS:
# copyfile('src/manager/JaxerManager.cfg',
# 'src/mozilla/' + ffdir + '/dist/bin/JaxerManager.cfg')

# Build LogServer
print "\n===== Building JaxerLogger."
Expand All @@ -272,7 +272,7 @@ def filesmatching(path, prefix, pattern):
system('cd src/Utils/JaxerLog && gcc -I../../libevent/libevent-1.4.2-rc -o jaxerlogger LogServerUnix.cpp -L../../libevent/libevent-1.4.2-rc/.libs -levent -lxnet -lstdc++')
copyfile('src/Utils/JaxerLog/jaxerlogger',
'src/mozilla/' + ffdir + '/dist/bin/jaxerlogger')
elif GetOS() == LINUX:
elif GetOS()+'x' == LINUX:
system('cd src/Utils/JaxerLog && g++ -I../../libevent/libevent-1.4.2-rc -L../../libevent/libevent-1.4.2-rc/.libs -levent -lrt -o jaxerlogger LogServerUnix.cpp')
copyfile('src/Utils/JaxerLog/jaxerlogger',
'src/mozilla/' + ffdir + '/dist/bin/jaxerlogger')
Expand Down Expand Up @@ -312,9 +312,9 @@ def filesmatching(path, prefix, pattern):
path = os.path.abspath(jaxer)
xpts = ' '.join(filesmatching('%s/components' % path, 'components/', r'\.xpt$'))
if GetOS() == WINDOWS:
system('cd %s && xpt_link.exe components/components.xpt_ %s' % (path, xpts))
system('cd %s && ../sdk/bin/xpt_link.exe components/components.xpt_ %s' % (path, xpts))
else:
system('cd %s && ./xpt_link components/components.xpt_ %s' % (path, xpts))
system('cd %s && ../sdk/bin/xpt_link components/components.xpt_ %s' % (path, xpts))
system('rm %s/components/*.xpt' % path)
system('mv %s/components/components.xpt_ %s/components/components.xpt' % (path, path))
unlinkifexists(jaxer + '/components/compreg.dat')
Expand Down Expand Up @@ -355,35 +355,35 @@ def filesmatching(path, prefix, pattern):
'src/mozilla/' + ffdir + '/dist/bin/connectors/Microsoft.VC80.CRT.manifest')

# Build JavaScript framework.
print "\n===== Building JavaScript framework."
os.environ['TREEROOT'] = os.path.abspath('../..')
f = open('framework/buildConfig.js', 'w')
f.write('SERVER_OUTPUT = "../src/mozilla/' + ffdir + '/dist/bin/framework/serverFramework.js";\n')
f.write('JSLIB_OUTPUT = "../src/mozilla/' + ffdir + '/dist/bin/framework/JSLib.js";\n')
f.write('CLIENT_OUTPUT = "../src/mozilla/' + ffdir + '/dist/bin/framework/clientFramework.js";\n')
f.write('LICENSE_HEADER = "framework_header.txt";\n')
f.write('COMPRESSED_LICENSE_HEADER = "framework_compresed_header.txt";\n')
f.close()
clientFramework = 'products/server/src/mozilla/' + ffdir + '/dist/bin/framework/clientFramework.js'
compressedFramework = 'products/server/src/mozilla/' + ffdir + '/dist/bin/framework/clientFramework_compressed.js'
if GetOS() == WINDOWS:
system('cd ../../tools/com.aptana.autobuild/libs && build.bat')
else:
system('cd ../../tools/com.aptana.autobuild/libs && bash ./build.sh')
copyfile('framework/config.js', framework + '/config.js')
copyfile('framework/configLog.js', framework + '/configLog.js')
copyfile('framework/configApps.js', framework + '/configApps.js')
copyfile('framework/studio_config.js', framework + '/studio_config.js')
if os.path.exists(framework + '/extensions'):
shutil.rmtree(framework + '/extensions')
for root, dirs, files in os.walk('framework/extensions'):
destdir = framework + root.partition('framework')[2]
os.mkdir(destdir)
root = root + '/'
destdir = destdir + '/'
for file in files:
copyfile(root + file, destdir + file)
dirs.remove('.svn')
# print "\n===== Building JavaScript framework."
# os.environ['TREEROOT'] = os.path.abspath('..')
# f = open('framework/buildConfig.js', 'w')
# f.write('SERVER_OUTPUT = "../src/mozilla/' + ffdir + '/dist/bin/framework/serverFramework.js";\n')
# f.write('JSLIB_OUTPUT = "../src/mozilla/' + ffdir + '/dist/bin/framework/JSLib.js";\n')
# f.write('CLIENT_OUTPUT = "../src/mozilla/' + ffdir + '/dist/bin/framework/clientFramework.js";\n')
# f.write('LICENSE_HEADER = "framework_header.txt";\n')
# f.write('COMPRESSED_LICENSE_HEADER = "framework_compresed_header.txt";\n')
# f.close()
# clientFramework = 'products/server/src/mozilla/' + ffdir + '/dist/bin/framework/clientFramework.js'
# compressedFramework = 'products/server/src/mozilla/' + ffdir + '/dist/bin/framework/clientFramework_compressed.js'
# if GetOS() == WINDOWS:
# system('cd ../tools/com.aptana.autobuild/libs && build.bat')
# else:
# system('cd ../tools/com.aptana.autobuild/libs && bash ./build.sh')
# copyfile('framework/config.js', framework + '/config.js')
# copyfile('framework/configLog.js', framework + '/configLog.js')
# copyfile('framework/configApps.js', framework + '/configApps.js')
# copyfile('framework/studio_config.js', framework + '/studio_config.js')
# if os.path.exists(framework + '/extensions'):
# shutil.rmtree(framework + '/extensions')
# for root, dirs, files in os.walk('framework/extensions'):
# destdir = framework + root.partition('framework')[2]
# os.mkdir(destdir)
# root = root + '/'
# destdir = destdir + '/'
# for file in files:
# copyfile(root + file, destdir + file)
# dirs.remove('.svn')

# Build servlet.
print "\n===== Building servlet."
Expand Down Expand Up @@ -435,23 +435,23 @@ def filesmatching(path, prefix, pattern):
system('cd src/launcher/mac && xcodebuild')

# Build tellJaxerManager.
if GetOS() == WINDOWS:
print "\n===== Building tellJaxerManager."
system('cd src/Utils/tellManager && cl.exe /D "WIN32" /nologo /Ox /MT tellManager.cpp /link ws2_32.lib')
copyfile ('src/Utils/tellManager/tellManager.exe',
'src/mozilla/' + ffdir + '/dist/bin/tellJaxerManager.exe')
elif GetOS() == MACOS:
system('cd src/Utils/tellManager && bash ./buildMacUniversal.sh')
copyfile('src/Utils/tellManager/tellJaxerManager',
'src/mozilla/' + ffdir + '/dist/bin/tellJaxerManager')
elif GetOS() == LINUX:
system('cd src/Utils/tellManager && g++ -lrt tellManager.cpp')
copyfile('src/Utils/tellManager/a.out',
'src/mozilla/' + ffdir + '/dist/bin/telljaxermanager')
elif GetOS() == SOLARIS:
system('cd src/Utils/tellManager && gcc tellManager.cpp -lxnet -lstdc++')
copyfile('src/Utils/tellManager/a.out',
'src/mozilla/' + ffdir + '/dist/bin/telljaxermanager')
# if GetOS() == WINDOWS:
# print "\n===== Building tellJaxerManager."
# system('cd src/Utils/tellManager && cl.exe /D "WIN32" /nologo /Ox /MT tellManager.cpp /link ws2_32.lib')
# copyfile ('src/Utils/tellManager/tellManager.exe',
# 'src/mozilla/' + ffdir + '/dist/bin/tellJaxerManager.exe')
# elif GetOS() == MACOS:
# system('cd src/Utils/tellManager && bash ./buildMacUniversal.sh')
# copyfile('src/Utils/tellManager/tellJaxerManager',
# 'src/mozilla/' + ffdir + '/dist/bin/tellJaxerManager')
# elif GetOS() == LINUX:
# system('cd src/Utils/tellManager && g++ -lrt tellManager.cpp')
# copyfile('src/Utils/tellManager/a.out',
# 'src/mozilla/' + ffdir + '/dist/bin/telljaxermanager')
# elif GetOS() == SOLARIS:
# system('cd src/Utils/tellManager && gcc tellManager.cpp -lxnet -lstdc++')
# copyfile('src/Utils/tellManager/a.out',
# 'src/mozilla/' + ffdir + '/dist/bin/telljaxermanager')

# Build jam distribution.
print "\n===== Building jam distributions."
Expand Down Expand Up @@ -534,8 +534,8 @@ def filesmatching(path, prefix, pattern):
if GetOS() == LINUX:
print "\n == Renaming jam/Apache22-local to jam/Apache22."
os.rename('jam/Apache22-local', 'jam/Apache22')
shutil.copytree('src/scripts/linux', 'jam/scripts')
shutil.rmtree('jam/scripts/.svn')
shutil.copytree('src/scripts/unix', 'jam/scripts')
# shutil.rmtree('jam/scripts/.svn')
os.remove('jam/StartServers.bat')
os.remove('jam/ConfigureFirewall.exe')
elif GetOS() == MACOS:
Expand All @@ -544,36 +544,37 @@ def filesmatching(path, prefix, pattern):

print "\n == Extra process for MAC."
shutil.copytree('src/launcher/mac/build/Default/Jaxer Launcher.app', 'jam/Jaxer Launcher.app')
shutil.copytree('src/scripts/mac', 'jam/scripts')
shutil.rmtree('jam/scripts/.svn')
shutil.copytree('src/scripts/unix', 'jam/scripts')
# shutil.rmtree('jam/scripts/.svn')
os.remove('jam/StartServers.bat')
os.remove('jam/ConfigureFirewall.exe')
elif GetOS() == SOLARIS:
print "\n == Renaming jam/Apache22-local to jam/Apache22."
os.rename('jam/Apache22-local', 'jam/Apache22')
shutil.copytree('src/scripts/solaris', 'jam/scripts')
shutil.rmtree('jam/scripts/.svn')
# shutil.rmtree('jam/scripts/.svn')
os.remove('jam/StartServers.bat')
os.remove('jam/ConfigureFirewall.exe')

print "\n === Copying chrome (should be reviewed/removed in the future)"
os.mkdir('jam/jaxer/chrome');
copyfile('src/mozilla/' + ffdir +'/dist/bin/chrome/en-US.manifest',
'jam/jaxer/chrome/en-US.manifest')
copyfile('src/mozilla/' + ffdir +'/dist/bin/chrome/en-US.jar',
'jam/jaxer/chrome/en-US.jar')

# Copy the build-time generated framework tests as well.
shutil.copytree('framework/tests',
'jam/jaxer/aptana/diagnostics/unit_tests_jaxer')

copyfile('framework/testRunner.html',
'jam/jaxer/aptana/diagnostics/testRunner.html')
copyfile('framework/unitTestingBoth.js',
'jam/jaxer/aptana/diagnostics/unitTestingBoth.js')
copyfile('framework/unitTestingServerOnly.js',
'jam/jaxer/aptana/diagnostics/unitTestingServerOnly.js')
copyfile('framework/unitTestingHeader.js',
'jam/jaxer/aptana/diagnostics/unitTestingHeader.js')
#shutil.copytree('framework/tests',
# 'jam/jaxer/aptana/diagnostics/unit_tests_jaxer')

#copyfile('framework/testRunner.html',
# 'jam/jaxer/aptana/diagnostics/testRunner.html')
#copyfile('framework/unitTestingBoth.js',
# 'jam/jaxer/aptana/diagnostics/unitTestingBoth.js')
#copyfile('framework/unitTestingServerOnly.js',
# 'jam/jaxer/aptana/diagnostics/unitTestingServerOnly.js')
#copyfile('framework/unitTestingHeader.js',
# 'jam/jaxer/aptana/diagnostics/unitTestingHeader.js')

# Create a version file in NSIS format
print "\n === Creating a version file in NSIS format."
Expand All @@ -586,9 +587,9 @@ def filesmatching(path, prefix, pattern):
break

# Create docs
print "\n === Creating docs."
if (cfg['makeDocs']):
system('python make-docs.py %s' % (fullversion))
#print "\n === Creating docs."
#if (cfg['makeDocs']):
# system('python make-docs.py %s' % (fullversion))

# Create subset distributions and zip them.
print "\n===== Creating and zipping distributions."
Expand Down
2 changes: 1 addition & 1 deletion server/make-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def system(cmd):
exit(rc)

# make sure supporting files for docgen are up to date
system('svn up %s' % cfg['docgenRoot'])
#system('svn up %s' % cfg['docgenRoot'])

# define constants
serverBrowser = "Jaxer Server Framework"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
typedef SSIZE_T ssize_t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <cassert>
#include <stdio.h>

#include "google_breakpad/processor/minidump_processor.h"
#include "google_breakpad/processor/call_stack.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ static void usage(const char *program_name) {
" -m : Output in machine-readable format\n",
program_name);
}
#include <string.h>

int main(int argc, char **argv) {
BPLOG_INIT(&argc, &argv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@


#include <sstream>
#include <cstdio>

#include "processor/postfix_evaluator.h"
#include "google_breakpad/processor/memory_region.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <sys/stat.h>

#include <cassert>
#include <algorithm>

#include "processor/simple_symbol_supplier.h"
#include "google_breakpad/processor/code_module.h"
Expand Down
Loading

0 comments on commit 23d82b4

Please sign in to comment.