Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary files in the source code #22

Closed
hippie68 opened this issue Sep 24, 2022 · 5 comments
Closed

Binary files in the source code #22

hippie68 opened this issue Sep 24, 2022 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation work-in-progress We are working on this issue

Comments

@hippie68
Copy link

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.

@frang75
Copy link
Owner

frang75 commented Sep 24, 2022

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 frang75 self-assigned this Sep 24, 2022
@frang75 frang75 added the documentation Improvements or additions to documentation label Sep 24, 2022
@frang75
Copy link
Owner

frang75 commented Feb 26, 2023

Related issue #44. Expected to change in future releases.

@frang75
Copy link
Owner

frang75 commented Aug 23, 2023

Hi @hippie68 !

In next NAppGUI release (1.4), the 'nrc' will be compiled in CMake generate process. All precompiled binaries will be removed.

image

@frang75 frang75 added the work-in-progress We are working on this issue label Aug 23, 2023
@NejatHakan
Copy link

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

Hi, shouldn't it be: include(${ROOT_PATH}/prj/CMakeNAppGUI.cmake) instead of include(${ROOT_PATH}/prj/CMakeNAppGUI.txt) ???
Best regards Nejat

@frang75
Copy link
Owner

frang75 commented Jan 5, 2024

NAppGUI 1.4 has removed all binary files from repo. nrc is build from sources.

@frang75 frang75 closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation work-in-progress We are working on this issue
Projects
None yet
Development

No branches or pull requests

3 participants