2011-09-26 19:04:02 +00:00
|
|
|
|
2015-01-09 00:12:51 +00:00
|
|
|
#####################################
|
|
|
|
# Generate the FAT bootsector source files
|
|
|
|
#
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/fat.c ${CMAKE_CURRENT_BINARY_DIR}/fat.h
|
[TOOLS_BIN2C]
- Fix a GCC warning (error on Macs) concerning the printf "%Iu" specifier.
- To make sure data included by bin2c, that need to be interpreted as a (long) string, is correctly NULL-terminated, introduce an output format called "STR": this creates a long character array using the "\xXX" format.
- To circumvent a silly limitation of MSVC (all versions?) about the maximum length (65535 bytes) of a char string (aka. char MyArray[] = "...my_long_string...";), introduced yet another output format called "BINSTR" which creates an array of bytes that is NULL-terminated (aka. char MyArray[] = {0xde, 0xad, 0xbe, 0xef, 0x00};).
- Finally, the output format "BIN" is the regular bin2c format (simple array of bytes).
[HAL_PCIDATA][FREELDR_INSTALL]
Use the above-described functionality (for HAL_PCIDATA, use BINSTR format because the PciVendors data is otherwise too large to be stored in "char_string" format).
svn path=/trunk/; revision=68255
2015-06-24 19:54:19 +00:00
|
|
|
COMMAND native-bin2c ${CMAKE_CURRENT_BINARY_DIR}/../bootsect/fat.bin ${CMAKE_CURRENT_BINARY_DIR}/fat.c ${CMAKE_CURRENT_BINARY_DIR}/fat.h BIN fat_data
|
2015-01-09 00:12:51 +00:00
|
|
|
DEPENDS native-bin2c fat)
|
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/fat32.c ${CMAKE_CURRENT_BINARY_DIR}/fat32.h
|
[TOOLS_BIN2C]
- Fix a GCC warning (error on Macs) concerning the printf "%Iu" specifier.
- To make sure data included by bin2c, that need to be interpreted as a (long) string, is correctly NULL-terminated, introduce an output format called "STR": this creates a long character array using the "\xXX" format.
- To circumvent a silly limitation of MSVC (all versions?) about the maximum length (65535 bytes) of a char string (aka. char MyArray[] = "...my_long_string...";), introduced yet another output format called "BINSTR" which creates an array of bytes that is NULL-terminated (aka. char MyArray[] = {0xde, 0xad, 0xbe, 0xef, 0x00};).
- Finally, the output format "BIN" is the regular bin2c format (simple array of bytes).
[HAL_PCIDATA][FREELDR_INSTALL]
Use the above-described functionality (for HAL_PCIDATA, use BINSTR format because the PciVendors data is otherwise too large to be stored in "char_string" format).
svn path=/trunk/; revision=68255
2015-06-24 19:54:19 +00:00
|
|
|
COMMAND native-bin2c ${CMAKE_CURRENT_BINARY_DIR}/../bootsect/fat32.bin ${CMAKE_CURRENT_BINARY_DIR}/fat32.c ${CMAKE_CURRENT_BINARY_DIR}/fat32.h BIN fat32_data
|
2015-01-09 00:12:51 +00:00
|
|
|
DEPENDS native-bin2c fat32)
|
|
|
|
#####################################
|
|
|
|
|
2011-09-26 19:04:02 +00:00
|
|
|
add_executable(installfreeldr EXCLUDE_FROM_ALL
|
|
|
|
install.c
|
2015-01-09 00:12:51 +00:00
|
|
|
volume.c
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/fat.c
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/fat32.c)
|
2011-09-26 19:04:02 +00:00
|
|
|
|
|
|
|
set_module_type(installfreeldr win32cui)
|
|
|
|
add_importlibs(installfreeldr msvcrt kernel32)
|
2020-04-15 10:37:21 +00:00
|
|
|
add_cd_file(TARGET installfreeldr DESTINATION loader NO_CAB NOT_IN_HYBRIDCD FOR bootcd livecd hybridcd)
|