Skip to content

Commit

Permalink
Win32: Installing libdeng2 and Qt libs
Browse files Browse the repository at this point in the history
Also cleaned up the output of packres.py a little (quiet mode).

LegacyCore is now operational on all platforms.
  • Loading branch information
skyjake committed Oct 4, 2011
1 parent 083041f commit 11299e2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 13 deletions.
4 changes: 3 additions & 1 deletion distrib/win32/setup.iss.template
Expand Up @@ -59,6 +59,9 @@ Source: "bin\jHexen.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components

; Libraries
Source: "..\win32\vcredist_x86.exe"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Source: "bin\deng2.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Source: "bin\QtCore4.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Source: "bin\QtNetwork4.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Source: "bin\SDL.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Source: "bin\SDL_net.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Source: "bin\eax.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Expand All @@ -72,7 +75,6 @@ Source: "bin\lzss.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components:
Source: "bin\zlib1.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Source: "bin\libpng15.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
Source: "bin\libcurl.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine
;Source: "bin\msvcr100.dll"; DestDir: "{app}\bin"; Flags: ignoreversion; Components: Engine

; Snowberry
Source: "..\..\snowberry\dist\*"; DestDir: "{app}\snowberry"; Flags: ignoreversion; Components: Launcher
Expand Down
2 changes: 1 addition & 1 deletion doomsday/build/build.pro
Expand Up @@ -9,7 +9,7 @@ TEMPLATE = subdirs
include(../config.pri)

# Update the PK3 files.
system(cd $$PWD/scripts/ && python packres.py \"$$OUT_PWD/..\")
system(cd $$PWD/scripts/ && python packres.py --quiet \"$$OUT_PWD/..\")

# Install the launcher.
deng_snowberry {
Expand Down
25 changes: 18 additions & 7 deletions doomsday/build/scripts/packres.py
Expand Up @@ -10,47 +10,58 @@
print "(run in build/scripts/)"
sys.exit(0)

# Check quiet flag.
quietMode = False
if '--quiet' in sys.argv:
sys.argv.remove('--quiet')
quietMode = True

deng_dir = os.path.join('..', '..')
target_dir = os.path.abspath(sys.argv[1])

class Pack:
def __init__(self):
self.files = [] # tuples
self.files = [] # tuples

def add_files(self, fileNamesArray):
self.files += fileNamesArray

def msg(self, text):
if not quietMode: print text

def create(self, name):
full_name = os.path.join(target_dir, name)
print "creating %s as %s" % (os.path.normpath(name), os.path.normpath(full_name))

self.msg("Creating %s as %s..." % (os.path.normpath(name), os.path.normpath(full_name)))
pk3 = zipfile.ZipFile(full_name, 'w', zipfile.ZIP_DEFLATED)

for src, dest in self.files:
full_src = os.path.join(deng_dir, src)
# Is this a file or a folder?
if os.path.isfile(full_src):
# Write the file as is.
print "writing %s as %s" % (os.path.normpath(full_src), os.path.normpath(dest))
self.msg("writing %s as %s" % (os.path.normpath(full_src), os.path.normpath(dest)))
pk3.write(full_src, dest)
elif os.path.isdir(full_src):
# Write the contents of the folder recursively.
def process_dir(path, dest_path):
print "processing", os.path.normpath(path)
self.msg("processing %s" % os.path.normpath(path))
for file in os.listdir(path):
real_file = os.path.join(path, file)
if file[0] == '.':
continue # Ignore these.
if os.path.isfile(real_file):
print "writing %s as %s" % (os.path.normpath(real_file), os.path.normpath(os.path.join(dest_path, file)))
if not quietMode:
self.msg("writing %s as %s" % (os.path.normpath(real_file),
os.path.normpath(os.path.join(dest_path, file))))
pk3.write(real_file, os.path.join(dest_path, file))
elif os.path.isdir(real_file):
process_dir(real_file,
os.path.join(dest_path, file))
process_dir(full_src, dest)

# Write it out.
print "closing", os.path.normpath(full_name)
print "Created %s (with %i files)." % (os.path.normpath(full_name), len(pk3.namelist()))
pk3.close()

# First up, doomsday.pk3.
Expand Down
11 changes: 11 additions & 0 deletions doomsday/dep_deng2.pri
Expand Up @@ -10,3 +10,14 @@ LIBS += -ldeng2

# libdeng2 requires the following Qt modules.
QT += core network

win32 {
# Install the required Qt DLLs into the products dir.
INSTALLS += qtlibs
deng_debug: qtver = "d4"
else: qtver = "4"
qtlibs.files += \
$$[QT_INSTALL_LIBS]/QtCore$${qtver}.dll \
$$[QT_INSTALL_LIBS]/QtNetwork$${qtver}.dll
qtlibs.path = $$DENG_LIB_DIR
}
5 changes: 1 addition & 4 deletions doomsday/libdeng2/libdeng2.pro
Expand Up @@ -39,10 +39,7 @@ SOURCES += \

# Installation ---------------------------------------------------------------

win32 {
}
else:unix:!macx {
# Generic Unix installation.
!macx {
INSTALLS += target
target.path = $$DENG_LIB_DIR
}

0 comments on commit 11299e2

Please sign in to comment.