nappgui_src icon indicating copy to clipboard operation
nappgui_src copied to clipboard

Binary files in the source code

Open hippie68 opened this issue 1 year ago • 1 comments

A lot of effort seems to have put into this project. I looks interesting and I would like to try it out, however when looking at the source code, I found binary files for various operating systems in subdirectories of the directory "prj". E.g. "prj/script/win/x64/nrc.exe", a file which even got 2 warnings when analyzing it via virustotal.com. I admit some false positives are normal. I want to trust the project, however I don't know why those binary files are there nor what they do, and why they need to be there in binary form instead of source code. Could you clarify it? Would it be possible to provide the source code? I am concerned about running binary files of unknown origin. Thanks for understanding.

hippie68 avatar Sep 24 '22 14:09 hippie68

Hi @hippie68! First of all, thank you very much for your feedback. The binaries you mention correspond to nrc (NAppGUI Resource Compiler), a utility that is used by CMake to generate the source code of project resources. More information about NRC here:

https://nappgui.com/en/start/resources.html

You have the NRC source code at:

https://github.com/frang75/nappgui_src/tree/main/src/utils

If you want to use NAppGUI avoiding precompiled binaries you can follow these steps:

  • Download/Clone the repo.
  • Remove all binaries from /prj (don't delete the folders)
  • Change src/CMakeLists.txt to this one.
#------------------------------------------
# NAppGUI CMake build script
#------------------------------------------
cmake_minimum_required(VERSION 2.8.12)
project(NAppGUI)

# NAppGUI Build Scripts
get_filename_component(ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR} PATH)
include(${ROOT_PATH}/prj/CMakeNAppGUI.txt)

# Libraries
staticLib("sewer" "" NRC_NONE)
staticLib("osbs" "sewer" NRC_NONE)
staticLib("core" "osbs" NRC_NONE)
staticLib("utils/nlib" "core" NRC_NONE)
commandApp("utils/nrc" "utils/nlib" NRC_NONE)
  • Generate and compile the project. This will create your own version of nrc.
  • Copy the binary (nrc.exe) to the appropriate folder: prj/script/win/x64/nrc.exe.
  • You will have to do the same on all platforms (win x86, linux, macos, etc)
  • Revert src/CMakeLists.txt to the original.
  • Compile and run the NAppGUI examples according to: https://nappgui.com/en/start/quick.html

I find your observation interesting. I will include in the official documentation these steps, so that the user can generate the NRC locally. I will also check the viruses you mention. The binaries go directly from my CI to GitHub, they do not go through any intermediary service (hosting, etc).

Regards and enjoy NAppGUI

frang75 avatar Sep 24 '22 18:09 frang75