diff --git a/.gitignore b/.gitignore index 9c41b048..69fa1d96 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ scripts/cleanup.sh version.rc version.cpp override.sh +repertory.iss diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a03a842..10c0db26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,14 @@ if(PROJECT_BUILD) ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/version.cpp @ONLY ) + + if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.iss.in") + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.iss.in + ${PROJECT_DIST_DIR}/../${PROJECT_NAME}.iss + @ONLY + ) + endif() else() message(STATUS "-=[CMake Settings]=-") message(STATUS " C standard: ${CMAKE_C_STANDARD}") diff --git a/cmake/versions.cmake b/cmake/versions.cmake index 0bd00b33..39c580d5 100644 --- a/cmake/versions.cmake +++ b/cmake/versions.cmake @@ -1,15 +1,15 @@ set(BINUTILS_VERSION 2.44) -set(BOOST2_MAJOR_VERSION 1) -set(BOOST2_MINOR_VERSION 76) -set(BOOST2_PATCH_VERSION 0) set(BOOST_MAJOR_VERSION 1) set(BOOST_MINOR_VERSION 88) set(BOOST_PATCH_VERSION 0) +set(BOOST2_MAJOR_VERSION 1) +set(BOOST2_MINOR_VERSION 76) +set(BOOST2_PATCH_VERSION 0) set(CPP_HTTPLIB_VERSION 0.23.1) -set(CURL2_VERSION 8_15_0) set(CURL_VERSION 8.15.0) -set(EXPAT2_VERSION 2_7_1) +set(CURL2_VERSION 8_15_0) set(EXPAT_VERSION 2.7.1) +set(EXPAT2_VERSION 2_7_1) set(GCC_VERSION 15.1.0) set(GTEST_VERSION 1.17.0) set(ICU_VERSION 76-1) @@ -21,7 +21,7 @@ set(PKG_CONFIG_VERSION 0.29.2) set(PUGIXML_VERSION 1.15) set(ROCKSDB_VERSION 10.4.2) set(SPDLOG_VERSION 1.15.3) -set(SQLITE2_VERSION 3.50.3) set(SQLITE_VERSION 3500300) +set(SQLITE2_VERSION 3.50.3) set(STDUUID_VERSION 1.2.3) set(ZLIB_VERSION 1.3.1) diff --git a/docker/x86_64/mingw64 b/docker/x86_64/mingw64 index bf93e5ca..724a1fbf 100644 --- a/docker/x86_64/mingw64 +++ b/docker/x86_64/mingw64 @@ -799,6 +799,7 @@ RUN if [ -f "/3rd_party/libevent-${MY_LIBEVENT_VERSION}-stable.tar.gz" ]; then \ && cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=${MY_CXX_STANDARD} \ + -DCMAKE_C_FLAGS="-include winsock2.h -include ws2tcpip.h -include iphlpapi.h" \ -DCMAKE_INSTALL_PREFIX=${MY_MINGW_DIR} \ -DCMAKE_TOOLCHAIN_FILE=${MY_TOOLCHAIN_FILE_CMAKE} \ -DEVENT__DISABLE_OPENSSL=ON \ diff --git a/repertory.iss.in b/repertory.iss.in new file mode 100644 index 00000000..688b0d9b --- /dev/null +++ b/repertory.iss.in @@ -0,0 +1,49 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "repertory" +#define MyAppVersion "@PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_REVISION_VERSION@-@PROJECT_RELEASE_ITER@_@PROJECT_GIT_REV@" +#define MyAppPublisher "BlockStorage" +#define MyAppURL "https://git.fifthgrid.com/BlockStorage/repertory" +#define MyAppExeName "repertory.exe" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{BD165823-1DEF-4D23-87DC-3D7A9BB73A00} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +UninstallDisplayIcon={app}\{#MyAppExeName} +; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run +; on anything but x64 and Windows 11 on Arm. +ArchitecturesAllowed=x64compatible +; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the +; install be done in "64-bit mode" on x64 or Windows 11 on Arm, +; meaning it should use the native 64-bit Program Files directory and +; the 64-bit view of the registry. +ArchitecturesInstallIn64BitMode=x64compatible +DefaultGroupName={#MyAppName} +DisableProgramGroupPage=yes +LicenseFile=repertory\LICENSE.md +; Uncomment the following line to run in non administrative install mode (install for current user only). +;PrivilegesRequired=lowest +OutputBaseFilename=repertory_{#MyAppVersion}_@PROJECT_GIT_REV@_setup +SolidCompression=yes +WizardStyle=modern + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Files] +Source: "repertory\"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs uninsneveruninstall +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" + diff --git a/scripts/make_common.sh b/scripts/make_common.sh index 981a567c..7e038a5b 100755 --- a/scripts/make_common.sh +++ b/scripts/make_common.sh @@ -43,6 +43,10 @@ make -j${CMAKE_BUILD_PARALLEL_LEVEL} || exit 1 popd popd +if [ -f "${PROJECT_SOURCE_DIR}/LICENSE.md" ]; then + rsync -av --progress "${PROJECT_SOURCE_DIR}/LICENSE.md" "${PROJECT_DIST_DIR}/" +fi + if [ "${PROJECT_IS_MINGW}" != "1" ] && [ "${PROJECT_REQUIRE_ALPINE}" == "ON" ]; then rsync -av --progress /usr/share/icu/74.2/ "${PROJECT_DIST_DIR}/icu/" fi @@ -94,4 +98,15 @@ if [ -f "${PROJECT_SOURCE_DIR}/post_build.sh" ]; then "${PROJECT_SOURCE_DIR}/post_build.sh" fi +if [ "${PROJECT_IS_MINGW}" == "1" ]; then + if [ -f "${PROJECT_DIST_DIR}/../${PROJECT_NAME}.iss" ]; then + pushd "${PROJECT_DIST_DIR}/../" + if [ "${PROJECT_IS_MINGW_UNIX}" != "1" ]; then + wine64 "c:/Program Files (x86)/Inno Setup 6/iscc.exe" "${PROJECT_NAME}.iss" || exit 1 + else + iscc "${APP}.iss" || exit 1 + fi + popd + fi +fi . "${PROJECT_SCRIPTS_DIR}/make_package.sh" "$1" "$2" "$3" "$4" "$5" diff --git a/scripts/make_package.sh b/scripts/make_package.sh index 8afa3e84..2a6d6091 100755 --- a/scripts/make_package.sh +++ b/scripts/make_package.sh @@ -63,4 +63,16 @@ tar cvzf "${PROJECT_OUT_FILE}" -C ${TEMP_DIR} . || error_exit "failed to create create_file_validations "${PROJECT_OUT_FILE}" popd +if [ "${PROJECT_IS_MINGW}" == "1" ] && [ -f "${PROJECT_DIST_DIR}/../${PROJECT_NAME}.iss" ]; then + pushd "${PROJECT_DIST_DIR}/../" + if [ "${PROJECT_IS_MINGW_UNIX}" != "1" ]; then + wine64 "c:/Program Files (x86)/Inno Setup 6/iscc.exe" "${PROJECT_NAME}.iss" || exit 1 + else + iscc "${APP}.iss" || exit 1 + fi + + create_file_validations "OutputDir/${PROJECT_NAME}_${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_REVISION_VERSION}-${PROJECT_RELEASE_ITER}_${PROJECT_GIT_REV}_setup.exe" + popd +fi + error_exit "created package ${PROJECT_FILE_PART}" 0