Compare commits

..

No commits in common. "5fc35517cb180940c026cf91aedd52d6c4ca0677" and "3a087ad581f2e15451bfc12d8ad520422a92f4a8" have entirely different histories.

2 changed files with 29 additions and 11 deletions

View File

@ -3,8 +3,7 @@ logdiag
'logdiag' is a simple multiplatform schematic editor written in GTK+. 'logdiag' is a simple multiplatform schematic editor written in GTK+.
This software has never really been finished, and is no longer being worked on, This software has never really been finished, and is no longer being worked on.
although I strive to keep it building on Windows XP and elsewhere.
image::docs/user-guide/logdiag-en.png[align="center"] image::docs/user-guide/logdiag-en.png[align="center"]
@ -54,22 +53,28 @@ Build from source on Windows
---------------------------- ----------------------------
_Note that with the current method we're stuck with GTK+ 3.8.2._ _Note that with the current method we're stuck with GTK+ 3.8.2._
First install CMake and MinGW. Add both to your system path. If you want First install CMake and MinGW. Add both to your system path. If you want
to build an installation package, also install NSIS. If you want to build to build an installation package, also install NSIS. If you want to build within
within a path containing spaces, fix your FindPkgConfig.cmake to say (#22396): a path containing spaces, fix your FindPkgConfig.cmake to say:
separate_arguments(_pkgconfig_invoke_result UNIX_COMMAND "${_pkgconfig_invoke_result}") separate_arguments(_pkgconfig_invoke_result UNIX_COMMAND "${_pkgconfig_invoke_result}")
Run the following command in the directory with source files to automatically Run the following command in the directory with source files to automatically
fetch and set up all dependencies (note that Windows XP is no longer able to fetch and setup all dependencies (contact me if the script becomes obsolete,
download from HTTPS sources): it's easy to fix but I usually update it only just a short while before
releasing a new version in order to resolve compatibility issues):
> cmake -P Win32Depends.cmake > cmake -P Win32Depends.cmake
Reserve a directory for an out-of-source build and let CMake prepare the build: Note that Windows XP is no longer able to reliably download from HTTPS sources.
Reserve a directory for an out-of-source build:
> mkdir build > mkdir build
> cd build > cd build
Let CMake prepare the build:
> cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release > cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
Now you can generate a package with CPack. You may choose between: Now you can generate a package with CPack. You may choose between:

View File

@ -6,6 +6,7 @@ cmake_minimum_required (VERSION 3.9)
# Directories # Directories
set (working_dir ${CMAKE_CURRENT_BINARY_DIR}/win32-depends) set (working_dir ${CMAKE_CURRENT_BINARY_DIR}/win32-depends)
set (pkg_dir ${working_dir}/packages) set (pkg_dir ${working_dir}/packages)
set (tmp_dir ${working_dir}/tmp)
file (MAKE_DIRECTORY ${working_dir}) file (MAKE_DIRECTORY ${working_dir})
file (MAKE_DIRECTORY ${pkg_dir}) file (MAKE_DIRECTORY ${pkg_dir})
@ -92,11 +93,23 @@ foreach (pkg_set ${pkg_list})
foreach (url ${pkg_${pkg_set}_urls}) foreach (url ${pkg_${pkg_set}_urls})
get_filename_component (filename ${url} NAME) get_filename_component (filename ${url} NAME)
message (STATUS "Extracting ${filename}...") message (STATUS "Extracting ${filename}...")
set (extract_command ${CMAKE_COMMAND} -E tar xf)
set (filename ${pkg_dir}/${filename}) set (filename ${pkg_dir}/${filename})
execute_process (COMMAND ${CMAKE_COMMAND} -E tar xf ${filename} if (pkg_${pkg_set}_strip)
WORKING_DIRECTORY ${working_dir} file (MAKE_DIRECTORY ${tmp_dir})
RESULT_VARIABLE status) execute_process (COMMAND ${extract_command} ${filename}
WORKING_DIRECTORY ${tmp_dir}
RESULT_VARIABLE status)
file (COPY ${tmp_dir}/${pkg_${pkg_set}_strip}/
DESTINATION ${working_dir})
file (REMOVE_RECURSE ${tmp_dir})
else ()
execute_process (COMMAND ${extract_command} ${filename}
WORKING_DIRECTORY ${working_dir}
RESULT_VARIABLE status)
endif ()
if (status) if (status)
message (FATAL_ERROR "Extraction failed: ${status}") message (FATAL_ERROR "Extraction failed: ${status}")
endif () endif ()