Skip to content

Commit

Permalink
fix: build version
Browse files Browse the repository at this point in the history
  • Loading branch information
qiin2333 committed Jun 2, 2024
1 parent c28fea1 commit c81eb72
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
path = third-party/nanors
url = https://github.com/sleepybishop/nanors.git
branch = master
[submodule "third-party/nlohmann_json"]
path = third-party/nlohmann_json
url = https://github.com/nlohmann/json
branch = master
[submodule "third-party/nv-codec-headers"]
path = third-party/nv-codec-headers
url = https://github.com/FFmpeg/nv-codec-headers
Expand Down
11 changes: 1 addition & 10 deletions cmake/dependencies/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ pkg_check_modules(CURL REQUIRED libcurl)
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})

# nlohmann_json
if(SUNSHINE_SYSTEM_NLOHMANN_JSON)
pkg_check_modules(NLOHMANN_JSON nlohmann_json>=3.9.0 REQUIRED IMPORTED_TARGET)
set(JSON_LIBRARIES PkgConfig::NLOHMANN_JSON)
else()
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/nlohmann_json")
set(JSON_LIBRARIES nlohmann_json::nlohmann_json)
endif()

# ffmpeg pre-compiled binaries
if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
if(WIN32)
Expand Down Expand Up @@ -89,4 +80,4 @@ elseif(UNIX)
else()
include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake")
endif()
endif()
endif()
4 changes: 3 additions & 1 deletion cmake/prep/build_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI
# https://github.com/nocnokneo/cmake-git-versioning-example/blob/master/LICENSE
else()
find_package(Git)
string(TIMESTAMP COMPILE_TIME "%Y.%m%d.%H%M%S")
set(PROJECT_VERSION ${COMPILE_TIME})
if(GIT_EXECUTABLE)
MESSAGE("${CMAKE_SOURCE_DIR}")
get_filename_component(SRC_DIR "${CMAKE_SOURCE_DIR}" DIRECTORY)
Expand Down Expand Up @@ -43,7 +45,7 @@ else()
MESSAGE("Sunshine Version: ${GIT_DESCRIBE_VERSION}")
endif()
if(GIT_IS_DIRTY)
set(PROJECT_VERSION ${PROJECT_VERSION}.dirty)
set(PROJECT_VERSION ${PROJECT_VERSION}.杂鱼)
MESSAGE("Git tree is dirty!")
endif()
else()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,6 @@ const displayDevices = computed(() =>
<template #macos> </template>
</PlatformLayout>
</div>
</div>
<label for="output_name" class="form-label">{{
$t("config.output_name_win")
}}</label>
<select id="output_name" class="form-select" v-model="config.output_name">
<option value="">{{ $t("_common.autodetect") }}</option>
<option
v-for="device in displayDevices"
:value="device.id"
:key="device.id"
>
{{ device.name }}
</option>
</select>
<div class="form-text">{{ $t("config.output_name_desc_win") }}<br /></div>
</div>
<div class="mb-3" v-if="platform === 'linux' || platform === 'macos'">
<label for="output_name" class="form-label">{{
Expand Down Expand Up @@ -94,5 +79,5 @@ const displayDevices = computed(() =>
</pre
>
</div>
</div> -->
</div>
</template>
2 changes: 1 addition & 1 deletion src_assets/common/assets/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h3>{{githubVersion.release.name}}</h3>
if (!this.preReleaseVersion || !this.githubVersion || !this.version) {
return false;
}
return this.preReleaseVersion.isGreater(this.version) && this.preReleaseVersion.isGreater(this.githubVersion);
return this.preReleaseVersion.isGreater(this.version);
},
buildVersionIsDirty() {
return this.version.version?.split(".").length === 5 &&
Expand Down

0 comments on commit c81eb72

Please sign in to comment.