Skip to content

Conversation

MirzaAtharBaig
Copy link

Added a shell script to improve the installation process by:

  • Adding Robustness Checks: Implemented initial system checks for OS distribution (Debian/Ubuntu) and essential commands like sudo, git, cmake, and make to provide clearer diagnostics and prevent failures on incompatible systems.
  • Correcting Build System: Identified and switched the build process from QMake to CMake, as indicated by the project's CMakeLists.txt file.
  • Adjusting Directory Structure: Updated paths to correctly navigate into the omodscan/ subdirectory, where the primary source and build files reside.
  • Implementing Out-of-Source Build: Configured CMake to perform an out-of-source build, which is a standard practice for CMake projects to keep source and build artifacts separate.
  • Including Missing Dependencies: Added libqt5serialbus5-dev to the dependency list, resolving the Qt::SerialBus target not found error during CMake configuration.
  • Correcting Executable Name: Adjusted the APP_NAME variable to omodscan, matching the actual executable name generated by the build process, ensuring correct installation to /usr/local/bin.
  • Enhancing Error Handling: Improved error messages for various stages of the installation process, providing more specific guidance for troubleshooting.

sanny32 and others added 4 commits December 9, 2024 08:28
This commit improves the OpenModScan installation script by:

- Adding Robustness Checks: Implemented initial system checks for OS distribution (Debian/Ubuntu) and essential commands like `sudo`, `git`, `cmake`, and `make` to provide clearer diagnostics and prevent failures on incompatible systems.
- Correcting Build System: Identified and switched the build process from QMake to CMake, as indicated by the project's `CMakeLists.txt` file.
- Adjusting Directory Structure: Updated paths to correctly navigate into the `omodscan/` subdirectory, where the primary source and build files reside.
- **Implementing Out-of-Source Build:** Configured CMake to perform an out-of-source build, which is a standard practice for CMake projects to keep source and build artifacts separate.
- **Including Missing Dependencies:** Added `libqt5serialbus5-dev` to the dependency list, resolving the `Qt::SerialBus` target not found error during CMake configuration.
- Correcting Executable Name: Adjusted the `APP_NAME` variable to `omodscan`, matching the actual executable name generated by the build process, ensuring correct installation to `/usr/local/bin`.
- Enhancing Error Handling: Improved error messages for various stages of the installation process, providing more specific guidance for troubleshooting.
@sanny32
Copy link
Owner

sanny32 commented Jun 17, 2025

Some notes:

  1. The install.sh file is located in the root of the project, but for some reason it clones the project into the /home directory. I suggest removing the cloning step and using the current directory with the already cloned project.
  2. I propose splitting the install.sh file into two separate files — build.sh, which will handle building the project, and install.sh, which will handle installation.
  3. Currently, the build script does not work and throws an error.

Building OpenModScan with make...
[ 1%] Updating translation files...
/bin/sh: 1: ansimenu.cpp: not found
make[2]: *** [CMakeFiles/update_translations.dir/build.make:251: translations/omodscan_ru.ts] Error 127
make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/update_translations.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
ERROR: Make failed. Compilation errors occurred. Review the build output for details.
Installation failed. Please review the output above.

@sanny32 sanny32 self-requested a review June 18, 2025 16:46
@@ -0,0 +1,167 @@
#!/bin/bash
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment to pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants