GCI2012: Improve Game Configuration Widget
- Refactored mapmodel+datamanager to have two separate map models for static and mission maps, and then three static MapInfos in MapModel for the three special maps (random, maze, drawn).
- Created theme selector dialog.
- Created seed view/edit dialog.
- Enlarged start icon on pagemultiplayer and pagenetgame, and added Start.png.
- Moved "Settings" button on pagemultiplayer and pagenetgame from middle of page to page footer.
- Added "load drawing" button to mapcontainer widget.
- Map preview is no longer the randomize button; The randomize functionality is now in a button of its own.
- Map preview no longer grays out (isn't disabled) when in slave mode.
- Seed is now viewable and copyable when in slave mode -- but not editable.
- You should now use the property master (isMaster() and setMaster()) on gamecfgwidget and mapcontainer instead of the enabled property. This is because some widgets (e.g. "view/edit seed" button and map preview) shouldn't be disabled, when all other widgets should be.
- Added mission map descriptions w/ locale support in INI format in mapname/desc.txt if applicable. Use '|' for line break.
# Load Freepascal
if (FPC)
set(FPC_EXECUTABLE ${FPC})
else()
find_program(FPC_EXECUTABLE
NAMES fpc
PATHS /opt/local/bin /usr/local/bin /usr/bin)
endif()
# Check Freepascal version
if (FPC_EXECUTABLE)
exec_program(${FPC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE FPC_VERSION_FULL)
string(REGEX MATCH "[0-9]+\\.[0-9]+" FPC_VERSION_LONG "${FPC_VERSION_FULL}")
string(REGEX REPLACE "([0-9]+\\.[0-9]+)" "\\1" FPC_VERSION "${FPC_VERSION_LONG}")
message(STATUS "Found Freepascal: ${FPC_EXECUTABLE} (version ${FPC_VERSION})")
else()
message(FATAL_ERROR "Could NOT find Freepascal")
endif()
# Check for noexecstack flag support
message(STATUS "Checking whether linker needs explicit noexecstack")
set(NOEXECSTACK_FLAGS "-k-z" "-knoexecstack")
file(WRITE ${EXECUTABLE_OUTPUT_PATH}/checkstack.pas "begin end.")
execute_process(COMMAND ${FPC_EXECUTABLE} ${NOEXECSTACK_FLAGS} checkstack.pas
WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
RESULT_VARIABLE TEST_NOEXECSTACK
OUTPUT_QUIET ERROR_QUIET)
if (TEST_NOEXECSTACK)
set(NOEXECSTACK_FLAGS "")
message(STATUS "Checking whether linker needs explicit noexecstack -- no")
else(TEST_NOEXECSTACK)
message(STATUS "Checking whether linker needs explicit noexecstack -- yes")
endif(TEST_NOEXECSTACK)