From 17c3bb1145d448337ab406c7835fbef31a681b4e Mon Sep 17 00:00:00 2001
From: Fatbag <X-Fi6@phppoll.org>
Date: Sat, 28 Jan 2012 12:11:34 -0600
Subject: [PATCH] Switched over to cmake. Everything now works in one command.

---
 CMakeLists.txt                                | 82 ++++++++++++++++
 .../cmx/Makefile => Client/CMakeLists.txt     |  0
 Compiling instructions.txt                    | 19 +++-
 Libraries/CMakeLists.txt                      |  3 +
 Libraries/FileHandler/CMakeLists.txt          |  4 +
 Libraries/FileHandler/Makefile                |  1 -
 Libraries/FileHandler/utk/CMakeLists.txt      |  9 ++
 Libraries/FileHandler/utk/Makefile            | 30 ------
 Libraries/FileHandler/xa/CMakeLists.txt       |  9 ++
 Libraries/FileHandler/xa/Makefile             | 30 ------
 Libraries/FileHandler/xa/xadecode.c           |  7 +-
 Libraries/libvitaboy/CMakeLists.txt           |  0
 Makefile                                      | 97 -------------------
 Server/CMakeLists.txt                         |  0
 Tools/CMakeLists.txt                          |  1 +
 Tools/FARDive/CMakeLists.txt                  | 19 ++++
 Tools/FARDive/windows/ReadPNGIcon.cpp         |  2 +-
 Tools/FARDive/windows/Startup.cpp             |  2 +-
 Tools/FARDive/windows/resource.rc             | 58 +++++------
 packages.makefile                             |  9 --
 20 files changed, 179 insertions(+), 203 deletions(-)
 create mode 100644 CMakeLists.txt
 rename Libraries/FileHandler/cmx/Makefile => Client/CMakeLists.txt (100%)
 create mode 100644 Libraries/CMakeLists.txt
 create mode 100644 Libraries/FileHandler/CMakeLists.txt
 delete mode 100644 Libraries/FileHandler/Makefile
 create mode 100644 Libraries/FileHandler/utk/CMakeLists.txt
 delete mode 100644 Libraries/FileHandler/utk/Makefile
 create mode 100644 Libraries/FileHandler/xa/CMakeLists.txt
 delete mode 100644 Libraries/FileHandler/xa/Makefile
 create mode 100644 Libraries/libvitaboy/CMakeLists.txt
 delete mode 100644 Makefile
 create mode 100644 Server/CMakeLists.txt
 create mode 100644 Tools/CMakeLists.txt
 create mode 100644 Tools/FARDive/CMakeLists.txt
 delete mode 100644 packages.makefile

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..bafb16c
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,82 @@
+#########################################
+#### CMake generator file for Niotso ####
+
+cmake_minimum_required(VERSION 2.6)
+
+project(Niotso)
+
+# Installation directory
+set(CMAKE_INSTALL_PREFIX "c:/Program Files (x86)/Maxis/The Sims Online/Niotso" CACHE FILEPATH "Installation directory")
+
+# Build type
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+    set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build configurations: Release Debug Release-MakeProfile Release-UseProfile")
+else()
+    set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build configurations: Release Debug")
+endif()
+
+
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+    # Base options
+    set(CFLAGS  "-Wall -Wextra -Wabi -m32 -mmmx -msse -msse2 -msse3 -mfpmath=both -msahf")
+    set(LDFLAGS "-m32")
+    set(RCFLAGS "-F pe-i386")
+    set(ASMFLAGS "-O3 -F win32")
+
+    set(CFLAGS_LANG_C   "-ansi")
+    set(CFLAGS_LANG_CPP "-fno-exceptions -fno-rtti")
+
+
+    ####
+    ## [Profiles]
+
+    if(NOT (CMAKE_BUILD_TYPE MATCHES "Debug"))
+        if(CMAKE_BUILD_TYPE MATCHES "Release-MakeProfile")
+            set(CFLAGS "${CFLAGS} -fprofile-generate")
+            set(LDFLAGS "${LDFLAGS} -lgcov")
+        elseif(CMAKE_BUILD_TYPE MATCHES "Release-UseProfile")
+            set(CFLAGS "${CFLAGS} -fprofile-use")
+        endif()
+
+        # Size
+        set(CFLAGS_SIZE "${CFLAGS} -Os -g0 -fomit-frame-pointer -ffast-math -fmerge-all-constants -funsafe-loop-optimizations -fmerge-all-constants -fsched-pressure")
+        set(LDFLAGS_SIZE "${LDFLAGS} -s")
+
+        # Speed
+        set(CFLAGS_SPEED "${CFLAGS} -O3 -g0 -fomit-frame-pointer -ffast-math -fmerge-all-constants -funsafe-loop-optimizations -fmerge-all-constants -fsched-pressure -fmodulo-sched -fmodulo-sched-allow-regmoves -fgcse-sm -fgcse-las -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns=0 -fsched-stalled-insns-dep -fsched2-use-superblocks -fipa-pta -fipa-matrix-reorg -ftree-loop-linear -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -ftree-loop-distribution -ftree-loop-im -ftree-loop-ivcanon -fivopts -fvect-cost-model -fvariable-expansion-in-unroller -fbranch-target-load-optimize -maccumulate-outgoing-args -fwhole-program -flto")
+        set(LDFLAGS_SPEED "${LDFLAGS} -s -fwhole-program -flto")
+    else()
+        # Debug
+        set(CFLAGS_DEBUG "${CFLAGS} -O0 -g3")
+        set(LDFLAGS_DEBUG "${LDFLAGS}")
+            set(CFLAGS_SIZE "${CFLAGS_DEBUG}")
+            set(LDFLAGS_SIZE "${LDFLAGS_DEBUG}")
+            set(CFLAGS_SPEED "${CFLAGS_DEBUG}")
+            set(LDFLAGS_SPEED "${LDFLAGS_DEBUG}")
+    endif()
+
+    set(CMAKE_C_FLAGS "${CFLAGS_LANG_C} ${CFLAGS_SIZE}")
+    set(CMAKE_CXX_FLAGS "${CFLAGS_LANG_CPP} ${CFLAGS_SIZE}")
+    set(CMAKE_SHARED_LINKER_FLAGS "${LDFLAGS} ${LDFLAGS_SIZE}")
+    set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS} ${LDFLAGS_SIZE}")
+    set(CMAKE_RC_FLAGS "${RCFLAGS}")
+endif()
+
+if(WIN32)
+    set(DIST_NAME "windows" CACHE STRING "Output folder name for the _dist folder (no start or end slash)")
+elseif(APPLE)
+    set(DIST_NAME "mac" CACHE STRING "Output folder name for the _dist folder (no start or end slash)")
+elseif(UNIX)
+    set(DIST_NAME "linux" CACHE STRING "Output folder name for the _dist folder (no start or end slash)")
+else()
+    set(DIST_NAME "unknown" CACHE STRING "Output folder name for the _dist folder (no start or end slash)")
+endif()
+
+#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/_dist/${DIST_NAME}") (-flto means our archive files should not be redistributed)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/_dist/${DIST_NAME}")
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/_dist/${DIST_NAME}")
+
+add_subdirectory(Client)
+add_subdirectory(Libraries)
+add_subdirectory(Server)
+add_subdirectory(Tools)
\ No newline at end of file
diff --git a/Libraries/FileHandler/cmx/Makefile b/Client/CMakeLists.txt
similarity index 100%
rename from Libraries/FileHandler/cmx/Makefile
rename to Client/CMakeLists.txt
diff --git a/Compiling instructions.txt b/Compiling instructions.txt
index 64db955..38dd57d 100644
--- a/Compiling instructions.txt	
+++ b/Compiling instructions.txt	
@@ -1,6 +1,13 @@
-All you need installed to compile Niotso for Windows, Linux, or Mac is GCC 4.6 or newer, and NASM for libjpeg-turbo.
+All you need installed to compile Niotso for Windows, Linux, or Mac is cmake 2.6 or newer, a compatible compiler (such as GCC 4.6 or newer), and NASM 2.0 or newer for libjpeg-turbo.
 
-Run "make" in this directory to compile every package. -j # will greatly speed up the compile time for processors with # cores.
+cd into the _build directory and run
+ $ cmake -G "<Generator name>" ..
+
+The list of generators can be found with cmake --help.
+
+//-- Makefile
+
+Run "make" to compile every package. -j # will greatly speed up the compile time for processors with # cores.
 Run "make install" after compiling to install Niotso to your game directory; please specify it first in the Makefile.
 
 Run "make objclean" to delete all object files created during compilation.
@@ -10,5 +17,9 @@ Run "make uninstall" to delete Niotso from your game directory.
 Run "make uninstall_all" to delete Niotso from your game directory as well as all Niotso.ini files created by Niotso.
 
 Run "make <component>" to compile only a specific package.
-For a list of packages, see packages.makefile.
-Note that packages must and will compile any other packages required as a dependency.
\ No newline at end of file
+For a list of packages, run "make help".
+Note that packages must and will compile any other packages required as a dependency.
+
+//-- Code::Blocks, Visual Studio, XCode
+
+Open the solution or project file; you may select between a Release, Debug, Release64, and Debug64 build configuration.
\ No newline at end of file
diff --git a/Libraries/CMakeLists.txt b/Libraries/CMakeLists.txt
new file mode 100644
index 0000000..30bdcc5
--- /dev/null
+++ b/Libraries/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_subdirectory(FileHandler)
+add_subdirectory(freetype)
+add_subdirectory(libvitaboy)
\ No newline at end of file
diff --git a/Libraries/FileHandler/CMakeLists.txt b/Libraries/FileHandler/CMakeLists.txt
new file mode 100644
index 0000000..c925f6d
--- /dev/null
+++ b/Libraries/FileHandler/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_subdirectory(libpng)
+add_subdirectory(utk)
+add_subdirectory(xa)
+add_subdirectory(zlib)
\ No newline at end of file
diff --git a/Libraries/FileHandler/Makefile b/Libraries/FileHandler/Makefile
deleted file mode 100644
index 9a7089b..0000000
--- a/Libraries/FileHandler/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-filehandler: bmp cmx ini libfar libjpeg-turbo libpng mpg123 tga vtd-xml wav xa zlib
\ No newline at end of file
diff --git a/Libraries/FileHandler/utk/CMakeLists.txt b/Libraries/FileHandler/utk/CMakeLists.txt
new file mode 100644
index 0000000..4cef8ba
--- /dev/null
+++ b/Libraries/FileHandler/utk/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 2.6)
+project(utk)
+
+set(UTK_SOURCES
+    read_utk.c
+    utkdecode.c
+)
+    
+add_executable(utkdecode ${UTK_SOURCES})
\ No newline at end of file
diff --git a/Libraries/FileHandler/utk/Makefile b/Libraries/FileHandler/utk/Makefile
deleted file mode 100644
index fcbba94..0000000
--- a/Libraries/FileHandler/utk/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# macros --------------------------------------------------------------------
-CC = gcc
-LD = gcc
-CFLAGS = -m32 -Wall -Wextra -Wabi -Os -march=i686 -fomit-frame-pointer -g0
-LDFLAGS = -m32 -s -fwhole-program
-
-AR = ar rcs
-WINDRES = windres -F pe-i386
-
-OBJECTS = obj/read_utk.o obj/utkdecode.o
-
-# These will rebuild the entire library upon edit.
-DEPS =	Makefile \
-		read_utk.h
-
-# dependencies --------------------------------------------------------------
-all: utkdecode.exe
-
-$(OBJECTS): $(DEPS)
-
-utkdecode.exe: $(OBJECTS)
-	$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
-
-# make rules ----------------------------------------------------------------
-obj/%.o: %.c
-	$(CC) -c -ansi -pedantic $(CFLAGS) -o $@ $<
-
-# maintenance ---------------------------------------------------------------
-clean:
-	del /Q /S obj utkdecode.exe
\ No newline at end of file
diff --git a/Libraries/FileHandler/xa/CMakeLists.txt b/Libraries/FileHandler/xa/CMakeLists.txt
new file mode 100644
index 0000000..921ad0a
--- /dev/null
+++ b/Libraries/FileHandler/xa/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 2.6)
+project(xa)
+
+set(XA_SOURCES
+    read_xa.c
+    xadecode.c
+)
+
+add_executable(xadecode ${XA_SOURCES})
\ No newline at end of file
diff --git a/Libraries/FileHandler/xa/Makefile b/Libraries/FileHandler/xa/Makefile
deleted file mode 100644
index d2a565f..0000000
--- a/Libraries/FileHandler/xa/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# macros --------------------------------------------------------------------
-CC = gcc
-LD = gcc
-CFLAGS = -m32 -Wall -Wextra -Wabi -Os -march=i686 -fomit-frame-pointer -ffast-math -funsafe-loop-optimizations -fmerge-all-constants -g0 -fno-exceptions
-LDFLAGS = -m32 -s -fwhole-program
-
-AR = ar rcs
-WINDRES = windres -F pe-i386
-
-OBJECTS = obj/read_xa.o obj/xadecode.o
-
-# These will rebuild the entire library upon edit.
-DEPS =	Makefile \
-		read_xa.h
-
-# dependencies --------------------------------------------------------------
-all: xadecode.exe
-
-$(OBJECTS): $(DEPS)
-
-xadecode.exe: $(OBJECTS)
-	$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
-
-# make rules ----------------------------------------------------------------
-obj/%.o: %.c
-	$(CC) -c -ansi -pedantic $(CFLAGS) -o $@ $<
-
-# maintenance ---------------------------------------------------------------
-clean:
-	del /Q /S obj xadecode.exe
\ No newline at end of file
diff --git a/Libraries/FileHandler/xa/xadecode.c b/Libraries/FileHandler/xa/xadecode.c
index 31ebf10..418a104 100644
--- a/Libraries/FileHandler/xa/xadecode.c
+++ b/Libraries/FileHandler/xa/xadecode.c
@@ -1,5 +1,5 @@
 /*
-    xadecode.c - Copyright (c) 2011 Fatbag <X-Fi6@phppoll.org>
+    xadecode.c - Copyright (c) 2011-2012 Fatbag <X-Fi6@phppoll.org>
 
     Permission to use, copy, modify, and/or distribute this software for any
     purpose with or without fee is hereby granted, provided that the above
@@ -39,6 +39,7 @@ int main(int argc, char *argv[]){
     DWORD bytestransferred = 0;
     uint8_t * XAData;
     xaheader_t XAHeader;
+    unsigned BeginningTime, EndingTime;
 
     if(argc == 1 || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){
         printf("Usage: xadecode [-f] infile outfile\n"
@@ -106,10 +107,12 @@ int main(int argc, char *argv[]){
             return -1;
         }
 
+        BeginningTime = GetTickCount();
         if(!xa_decode(XAData+24, WaveData+44, XAHeader.Frames, XAHeader.nChannels)){
             printf("%sMemory for this file could not be allocated.", "xadecode: error: ");
             return -1;
         }
+        EndingTime = GetTickCount();
 
         HeapFree(ProcessHeap, HEAP_NO_SERIALIZE, XAData);
 
@@ -154,6 +157,8 @@ int main(int argc, char *argv[]){
                 return -1;
             }
         }
+        printf("Extracted %u bytes in %.2f seconds.\n", (unsigned) XAHeader.dwOutSize,
+            ((float) (EndingTime - BeginningTime))/1000);
         WriteFile(hFile, WaveData, 44+XAHeader.dwOutSize, &bytestransferred, NULL);
         CloseHandle(hFile);
     }
diff --git a/Libraries/libvitaboy/CMakeLists.txt b/Libraries/libvitaboy/CMakeLists.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 80e53fd..0000000
--- a/Makefile
+++ /dev/null
@@ -1,97 +0,0 @@
-#######################################
-#### Makefile for compiling Niotso ####
-
-# Environment (valid options: cmd posix)
-buildenv = cmd
-
-# Installation directory (do not use backslashes)
-installdir = c:/Program Files (x86)/Maxis/The Sims Online/Niotso
-
-# Debugging (valid options: yes no)
-debug = no
-
-# Profile-guided optimization (valid options: none instrument optimize)
-pgo = none
-
-CC = gcc
-LD = gcc
-AR = ar
-RC = windres
-
-# Base options
-CFLAGS  = -m32 -mmx -sse -sse2 -sse3 -mfpmath=both -msahf
-LDFLAGS = -m32 -static -static-libgcc
-ARFLAGS = rcs
-RCFLAGS = -F pe-i386
-
-CFLAGS_LANG_C   = -ansi
-CFLAGS_LANG_CPP = -std=c++98
-
-####
-## [Profiles]
-
-# Size
-CFLAGS_SIZE  = $(CFLAGS) -Os -g0 -fomit-frame-pointer -ffast-math -fmerge-all-constants -funsafe-loop-optimizations -fsched-pressure -fno-enforce-eh-specs
-LDFLAGS_SIZE = $(LDFLAGS) -s
-
-# Speed
-CFLAGS_SPEED  = $(CFLAGS) -O3 -g0 -fomit-frame-pointer -ffast-math -fmerge-all-constants -funsafe-loop-optimizations -fsched-pressure -fno-enforce-eh-specs -fmodulo-sched -fmodulo-sched-allow-regmoves -fgcse-sm -fgcse-las -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns=0 -fsched-stalled-insns-dep -fsched2-use-superblocks -fipa-pta -fipa-matrix-reorg -ftree-loop-linear -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -ftree-loop-distribution -ftree-loop-im -ftree-loop-ivcanon -fivopts -fvect-cost-model -fvariable-expansion-in-unroller -fbranch-target-load-optimize -maccumulate-outgoing-args -fwhole-program -flto
-LDFLAGS_SPEED = $(LDFLAGS) -s -flto
-
-# Debug
-CFLAGS_DEBUG  = $(CFLAGS) -O0 -g3
-LDFLAGS_DEBUG = $(LDFLAGS)
-
-WARNINGS = -Wall -Wextra -Wabi -pedantic
-
-ifeq($(debug), yes)
-    CFLAGS_SIZE = $(CFLAGS_DEBUG)
-    CFLAGS_SPEED = $(CFLAGS_DEBUG)
-    LDFLAGS_SIZE = $(LDFLAGS_DEBUG)
-    LDFLAGS_SPEED = $(LDFLAGS_DEBUG)
-endif
-
-
-####
-## [Miscellaneous]
-
-ifeq ($(buildenv),cmd)
-    RM_R = -@del /s /q
-    CP_F = copy /y
-    EXE  = .exe
-    DLL  = .dll
-else
-    RM_R = -@rm -r
-    CP_F = cp -f
-    EXE  =
-    DLL  = .so
-endif
-
-ifeq ($(pgo),instrument)
-    CFLAGS  += -fprofile-generate
-    LDFLAGS += -lgcov
-else ifeq ($(pgo),optimize)
-    CFLAGS  += -fprofile-use
-endif
-
-niotso_buildsys = 1
-
-
-####
-## [Targets]
-
-include packages.makefile
-
-filter_obj = *.o *.lo *.la *.Plo *.Pla *.gch *.pch *.obj *.res *.exp *.dep *.aps *.intermediate.manifest
-filter_exe = *.a *.lib $(niotso_exes) $(niotso_dlls)
-filter_profile = *.gcda
-filter_dist =  *.dsp *.dsw *.user *.ncb *.pdb *.idb *.opt *.plg *.suo BuildLog.htm
-
-objclean:
-	$(RM_R) $(filter_obj)
-clean: objclean
-	$(RM_R) $(filter_obj) $(filter_exe)
-profileclean:
-	$(RM_R) $(filter_profile)
-distclean:
-	$(RM_R) $(filter_obj) $(filter_exe) $(filter_profile) $(filter_dist)
\ No newline at end of file
diff --git a/Server/CMakeLists.txt b/Server/CMakeLists.txt
new file mode 100644
index 0000000..e69de29
diff --git a/Tools/CMakeLists.txt b/Tools/CMakeLists.txt
new file mode 100644
index 0000000..63c025f
--- /dev/null
+++ b/Tools/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(FARDive)
\ No newline at end of file
diff --git a/Tools/FARDive/CMakeLists.txt b/Tools/FARDive/CMakeLists.txt
new file mode 100644
index 0000000..32f9979
--- /dev/null
+++ b/Tools/FARDive/CMakeLists.txt
@@ -0,0 +1,19 @@
+cmake_minimum_required(VERSION 2.6)
+project(FARDive)
+
+if(WIN32)
+    set(FARDIVE_SOURCES
+        windows/common.cpp
+        windows/Interaction.cpp
+        windows/MainWindow.cpp
+        windows/ReadPNGIcon.cpp
+        windows/Resource.rc
+        windows/Startup.cpp
+        windows/Dialog/AddToArchive.cpp
+        windows/Dialog/NewArchive.cpp
+    )
+    set(FARDIVE_LINK -mwindows ole32 uxtheme)
+endif()
+
+add_executable(FARDive ${FARDIVE_SOURCES})
+target_link_libraries(FARDive ${FARDIVE_LINK} libpng_shared)
\ No newline at end of file
diff --git a/Tools/FARDive/windows/ReadPNGIcon.cpp b/Tools/FARDive/windows/ReadPNGIcon.cpp
index b9a8a12..474463e 100644
--- a/Tools/FARDive/windows/ReadPNGIcon.cpp
+++ b/Tools/FARDive/windows/ReadPNGIcon.cpp
@@ -1,5 +1,5 @@
 #include <windows.h>
-#include "../libpng-1.5.6/png.h"
+#include "../../../Libraries/FileHandler/libpng/png.h"
 
 extern HDC hDC;
 
diff --git a/Tools/FARDive/windows/Startup.cpp b/Tools/FARDive/windows/Startup.cpp
index d08d2f5..5c2e736 100644
--- a/Tools/FARDive/windows/Startup.cpp
+++ b/Tools/FARDive/windows/Startup.cpp
@@ -1,6 +1,6 @@
 #include "Windows.hpp"
 #include "GUI.hpp"
-#include "../libpng-1.5.6/png.h"
+#include "../../../Libraries/FileHandler/libpng/png.h"
 
 HBITMAP PNGIcon[MENUICONS];
 
diff --git a/Tools/FARDive/windows/resource.rc b/Tools/FARDive/windows/resource.rc
index a8e0980..f488b94 100644
--- a/Tools/FARDive/windows/resource.rc
+++ b/Tools/FARDive/windows/resource.rc
@@ -3,8 +3,8 @@
 #include "../version.hpp"
 #include "resource.hpp"
 
-ID_MANIFEST			RT_MANIFEST	"resources/Windows/FARDive.exe.manifest"
-IDI_FARDIVE			ICON		"resources/Windows/FARDive.ico"
+ID_MANIFEST			RT_MANIFEST	"../resources/Windows/FARDive.exe.manifest"
+IDI_FARDIVE			ICON		"../resources/Windows/FARDive.ico"
 
 ID_VERSIONINFO		VERSIONINFO
 FILEVERSION			FD_VERSION_A,FD_VERSION_B,FD_VERSION_C,FD_REVISION
@@ -82,34 +82,34 @@ BEGIN
 	END
 END
 
-IDI_FILE_NEW			RCDATA "resources/icons/document-new.png"
-IDI_FILE_OPEN			RCDATA "resources/icons/document-open.png"
-IDI_FILE_SAVE			RCDATA "resources/icons/document-save.png"
-IDI_FILE_SAVEAS			RCDATA "resources/icons/document-save-as.png"
-IDI_FILE_ADD			RCDATA "resources/icons/list-add.png"
-IDI_FILE_EXPORTALL		RCDATA "resources/icons/package-x-generic.png"
-IDI_FILE_EXPORTSELECTED	RCDATA "resources/icons/package-x-generic-selected.png"
-IDI_FILE_CHANGETYPE		RCDATA "resources/icons/applications-other.png"
-IDI_FILE_CLOSE			RCDATA "resources/icons/emblem-unreadable.png"
-IDI_FILE_EXIT			RCDATA "resources/icons/system-log-out.png"
-IDI_EDIT_DUPLICATE		RCDATA "resources/icons/edit-copy.png"
-IDI_EDIT_REMOVE			RCDATA "resources/icons/list-remove.png"
-IDI_EDIT_RENAME			RCDATA "resources/icons/edit-select-all.png"
-IDI_EDIT_PROPERTIES		RCDATA "resources/icons/document-properties.png"
-IDI_EDIT_CONTENTS		RCDATA "resources/icons/accessories-text-editor.png"
-IDI_EDIT_FIND			RCDATA "resources/icons/edit-find.png"
-IDI_EDIT_FINDNEXT		RCDATA "resources/icons/go-last.png"
-IDI_EDIT_FINDPREVIOUS	RCDATA "resources/icons/go-first.png"
-IDI_EDIT_MATCHES		RCDATA "resources/icons/preferences-system-windows.png"
-IDI_EDIT_GOTO			RCDATA "resources/icons/go-jump.png"
-IDI_EDIT_PREFERENCES	RCDATA "resources/icons/preferences-desktop.png"
-IDI_TOOLS_RECOMPRESS	RCDATA "resources/icons/system-file-manager.png"
-IDI_TOOLS_RESORT		RCDATA "resources/icons/mail-send-receive.png"
-IDI_TOOLS_REMOVEHOLES	RCDATA "resources/icons/edit-clear.png"
-IDI_TOOLS_BATCH			RCDATA "resources/icons/utilities-terminal.png"
-IDI_HELP_WEBSITE		RCDATA "resources/icons/internet-web-browser.png"
+IDI_FILE_NEW			RCDATA "../resources/icons/document-new.png"
+IDI_FILE_OPEN			RCDATA "../resources/icons/document-open.png"
+IDI_FILE_SAVE			RCDATA "../resources/icons/document-save.png"
+IDI_FILE_SAVEAS			RCDATA "../resources/icons/document-save-as.png"
+IDI_FILE_ADD			RCDATA "../resources/icons/list-add.png"
+IDI_FILE_EXPORTALL		RCDATA "../resources/icons/package-x-generic.png"
+IDI_FILE_EXPORTSELECTED	RCDATA "../resources/icons/package-x-generic-selected.png"
+IDI_FILE_CHANGETYPE		RCDATA "../resources/icons/applications-other.png"
+IDI_FILE_CLOSE			RCDATA "../resources/icons/emblem-unreadable.png"
+IDI_FILE_EXIT			RCDATA "../resources/icons/system-log-out.png"
+IDI_EDIT_DUPLICATE		RCDATA "../resources/icons/edit-copy.png"
+IDI_EDIT_REMOVE			RCDATA "../resources/icons/list-remove.png"
+IDI_EDIT_RENAME			RCDATA "../resources/icons/edit-select-all.png"
+IDI_EDIT_PROPERTIES		RCDATA "../resources/icons/document-properties.png"
+IDI_EDIT_CONTENTS		RCDATA "../resources/icons/accessories-text-editor.png"
+IDI_EDIT_FIND			RCDATA "../resources/icons/edit-find.png"
+IDI_EDIT_FINDNEXT		RCDATA "../resources/icons/go-last.png"
+IDI_EDIT_FINDPREVIOUS	RCDATA "../resources/icons/go-first.png"
+IDI_EDIT_MATCHES		RCDATA "../resources/icons/preferences-system-windows.png"
+IDI_EDIT_GOTO			RCDATA "../resources/icons/go-jump.png"
+IDI_EDIT_PREFERENCES	RCDATA "../resources/icons/preferences-desktop.png"
+IDI_TOOLS_RECOMPRESS	RCDATA "../resources/icons/system-file-manager.png"
+IDI_TOOLS_RESORT		RCDATA "../resources/icons/mail-send-receive.png"
+IDI_TOOLS_REMOVEHOLES	RCDATA "../resources/icons/edit-clear.png"
+IDI_TOOLS_BATCH			RCDATA "../resources/icons/utilities-terminal.png"
+IDI_HELP_WEBSITE		RCDATA "../resources/icons/internet-web-browser.png"
 
-IDB_INFO                BITMAP "resources/icons/info.bmp"
+IDB_INFO                BITMAP "../resources/icons/info.bmp"
 
 ID_ACCELERATOR		    ACCELERATORS
 BEGIN
diff --git a/packages.makefile b/packages.makefile
deleted file mode 100644
index 04a6772..0000000
--- a/packages.makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-####
-## [Packages]
-
-all: client filehandler server fardive
-
-include Client/Makefile
-include Libraries/FileHandler/Makefile
-include Server/Makefile
-include Tools/FARDive/Makefile
\ No newline at end of file