Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Revert "Windows port: Make g-ir-annotiotion-tool, g-ir-doc-tool and g…
Browse files Browse the repository at this point in the history
…-ir-scanner 'relocatable' at runtime."

It's a bit too soon for this one, misunderstood review on irc.
Apologies for the mess!

This reverts commit 0102c51.
  • Loading branch information
dieterv committed Sep 7, 2011
1 parent 0102c51 commit 3544760
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 34 deletions.
15 changes: 3 additions & 12 deletions tools/g-ir-annotation-tool.in
Expand Up @@ -23,12 +23,7 @@ import os
import sys
import __builtin__

if os.name == 'nt':
datadir = os.path.join(os.path.dirname(__file__), '..', 'share')
else:
datadir = "@datarootdir@"

__builtin__.__dict__['DATADIR'] = datadir
__builtin__.__dict__['DATADIR'] = "@datarootdir@"

if 'GI_SCANNER_DEBUG' in os.environ:
def on_exception(exctype, value, tb):
Expand All @@ -37,17 +32,13 @@ if 'GI_SCANNER_DEBUG' in os.environ:
pdb.pm()
sys.excepthook = on_exception

srcdir = os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None)
srcdir=os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None)
if srcdir is not None:
path = srcdir
else:
# This is a private directory, we don't want to pollute the global
# namespace.
if os.name == 'nt':
# Makes g-ir-annotation-tool 'relocatable' at runtime on Windows.
path = os.path.join(os.path.dirname(__file__), '..', 'lib', 'gobject-introspection')
else:
path = os.path.join('@libdir@', 'gobject-introspection')
path = os.path.join('@libdir@', 'gobject-introspection')
sys.path.insert(0, path)

from giscanner.annotationmain import annotation_main
Expand Down
13 changes: 2 additions & 11 deletions tools/g-ir-doc-tool.in
Expand Up @@ -23,12 +23,7 @@ import os
import sys
import __builtin__

if os.name == 'nt':
datadir = os.path.join(os.path.dirname(__file__), '..', 'share')
else:
datadir = "@datarootdir@"

__builtin__.__dict__['DATADIR'] = datadir
__builtin__.__dict__['DATADIR'] = "@datarootdir@"

if 'GI_SCANNER_DEBUG' in os.environ:
def on_exception(exctype, value, tb):
Expand All @@ -43,11 +38,7 @@ if srcdir is not None:
else:
# This is a private directory, we don't want to pollute the global
# namespace.
if os.name == 'nt':
# Makes g-ir-doc-tool 'relocatable' at runtime on Windows.
path = os.path.join(os.path.dirname(__file__), '..', 'lib', 'gobject-introspection')
else:
path = os.path.join('@libdir@', 'gobject-introspection')
path = os.path.join('@libdir@', 'gobject-introspection')
sys.path.insert(0, path)

from giscanner.docmain import doc_main
Expand Down
13 changes: 2 additions & 11 deletions tools/g-ir-scanner.in
Expand Up @@ -23,12 +23,7 @@ import os
import sys
import __builtin__

if os.name == 'nt':
datadir = os.path.join(os.path.dirname(__file__), '..', 'share')
else:
datadir = "@datarootdir@"

__builtin__.__dict__['DATADIR'] = datadir
__builtin__.__dict__['DATADIR'] = "@datarootdir@"

if 'GI_SCANNER_DEBUG' in os.environ:
def on_exception(exctype, value, tb):
Expand All @@ -43,11 +38,7 @@ if srcdir is not None:
else:
# This is a private directory, we don't want to pollute the global
# namespace.
if os.name == 'nt':
# Makes g-ir-scanner 'relocatable' at runtime on Windows.
path = os.path.join(os.path.dirname(__file__), '..', 'lib', 'gobject-introspection')
else:
path = os.path.join('@libdir@', 'gobject-introspection')
path = os.path.join('@libdir@', 'gobject-introspection')
sys.path.insert(0, path)

from giscanner.scannermain import scanner_main
Expand Down

0 comments on commit 3544760

Please sign in to comment.