How to Build .exe file from .app file dynamically? - guptateamdeveloper

I am working with application developed by Gupta, this Application is divided by 9 modules, For building .exe file from each .app file, I can do it easily via
Project > Build
I am repeating the above steps for each module.
Is there smart way for building all EXEs with one click as one bat file?
Appreciate any help.

You can build Gupta source code with command line:
If you want to compile to .exe then use
cbi63.exe -b "sourcefile" "destinationfile"
in your case this is something like
cbi63.exe -b "ktonline.app" "ktonline.exe"
If you want to compile to .apd use
cbi63.exe -m "sourcefile" "destinationfile"
This works with all Gupta versions. You just have to adjust cbiXXX.exe to your IDE version (e.g. cbi71.exe).

Related

Automate the process of including generated proto files into an Xcode project

Our iOS app currently is using Google protobuffer gRPC as our API layer to communicate between App and backend. And so we have these .proto files in our backend directory which will be converting to .grpc.swift and .pb.swift files by gRPC-Swift-Plugins and then consumed by the App.
This works okay, but the process of converting is very tedious, and we would like to automate the whole process.
Below is how we're doing it:
Delete previously copied directory, and copy all .proto files from backend (.proto files are maintained by backend devs) to App directory named "Protos" via a shell script
We already set up Build rules and include .proto files in Compile Sources. Following the steps from an answer here on SO
Screenshot of the current setup in Xcode Build Rules:
Whenever we build the project, .pb.swift and .grpc.swift are generated and putting into a directory named "generated" under the "Protos" folder.
Here are the problems:
If the backend added a new .proto files into the source directory, my script will only copy the files into the Protos directory but not included news files in the Compile Sources list.
Similar to the first problem, we need to manually set up Compile Sources in Xcode and that means if a new dev joins our team, he/she also needs to do the same setup again.
We sometimes need to refer to the .grpc.swift and .ph.swift files while coding. But If we add these files into Xcode and build the project again, Xcode will complain that these generated files are there like (Sorry, we're working on a private repo, so the project name and file names are replaced):
Multiple commands produce '${user_path}/${proto_name}.pb.o':
Target '${my_project_name}' (project '${my_project_name}') has compile command for Swift source files
Target '${my_project_name}' (project '${my_project_name}') has compile command for Swift source files
Any answers or comments and suggestions are greatly appreciated!
It's interesting I didn't have those problems with Swift if I use the $DERIVED_FILE_DIR
protoc "$INPUT_FILE_NAME" --swift_out="$DERIVED_FILE_DIR" --proto_path="Your/proto/path"
I don't use the plugin because I've got the plugin installed in my /usr/local/bin
But I have exactly those problems when we use the output for cpp files.

Build iOS app using Terminal

Is there a way to create a iOS without the Xcode IDE, and instead using Terminal and a Text Editor (like Atom)?
With Linux, i can accomplish this to build an Android app using Maven to create the minimum directory structure, compile the files after add them (in the Atom editor), create the APK and upload the package to the device.
Is there any command-line utility to accomplish some of this tasks in MacOSX?
You can use the xcodebuild command line tool to build, but there is no apple-provided tool to generate the project files other than Xcode. Google does have a tool called gyp which can generate the project files, though I'm not certain your use case is what it was designed for.
Other than that you pretty much have to hold your nose and use Xcode to setup your project, add files, change build settings, etc, and use whatever editor you want to actually edit the code.

How can I fix QNX ldd:FATAL:Could not load library XXXX.so.0?

I am trying to run GoogleTestLibrary on QNX ?
But i am getting this error message?
ldd:FATAL: Could not load library libgtest.so.0
Firstly i build googtestLibrary on qnx virtual machine with make command and it genarates lib files.
And then i added these libs in qnx extra library paths. Also i added extra include file for GoogleTestLibrary. And then i build my qnx project on QNX momentics ide and it build successfully. And then i tried to run but it gave me the ldd:FATAL: Could not load library libgtest.so.0 that error.
I included all libraries into the projects but i did not get success run. Does anyone encourage the that problem?
I found the solution.
I copied libgtest.so.0 library to /usr/lib folder in target machine.
And i restarted to target machine. After that i can run my projects. Thanks for advices.
Your project built successfully so paths for libraries in IDE are right.
You have an issue with run of binary therefore try to put built libraries into directory where binary is located.
Or you may use LIBRARY_PATH variable, like this:
C:\> LIBRARY_PATH=C:\projects\GoogleTestLibrary\ application.exe

CMake: How can I copy a directory into the ios application bundle

I have an ios project that builds with CMake 3.1.1, but I am stuck on the last problem - getting CMake to copy the asset directory into the right location for the app.
I have this, which works when running the app in the simulator. However, it does not work, and in fact causes a build failure when archiving because the destination directory it constructs does not exist.
get_target_property(APPLICATION_BIN ${APPLICATION_NAME} LOCATION)
get_dotapp_dir(${APPLICATION_BIN} APPLICATION_APP_LOCATION)
add_custom_command(TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND cp -r "${CMAKE_SOURCE_DIR}/assets" "${APPLICATION_APP_LOCATION}")
The directory I am copying has many subdirectories and I need them all preserved. Essentially I want to accomplish with cmake the same thing that happens when I drag the "assets" folder into the ios project underneath "Resources".
Use ${CMAKE_COMMAND} -E copy_directory instead of calling cp.
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${LOCATION_FOR_THE_APP} DEPENDS "${PROJECT_SOURCE_DIR}/assets" COMMAND -E copy_directory ${PROJECT_SOURCE_DIR}/assets ${CMAKE_CURRENT_BINARY_DIR}/${LOCATION_FOR_THE_APP})
add_custom_target(${CMAKE_CURRENT_BINARY_DIR}/${LOCATION_FOR_THE_APP} DEPENDS
My solution to this is similar to this answer. The goal of my project was to get googletests running on a cross-platform library, in which I had to wrap googletests into an XCTest Bundle. The build tool we are converting to is CMake for obvious reasons.
I ended up doing this as a pre-build step:
add_custom_command(TARGET ExampleTestTarget PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_LIST_DIR}/resources $<TARGET_FILE_DIR:ExampleTestTarget>
)
Essentially, at prebuild, CMake will copy everything in the resources folder into the root of the target's bundle. For some reason (probably a CMake thing), XCode picked these resource files up with no issue, so I didn't have to set the files to be RESOURCE files explicitly.
If you're using MacOS Bundles/Packages/etc., you'll have to copy-paste these files into $<TARGET_FILE_DIR:ExampleTestTarget>/Resources instead since this is the default resource location for MacOS xcodeproj's generated by CMake. (There are so many loopholes to get XCTests working in CMake that I advise everyone doing cross-platform gtests to create an executable instead for MacOS so you won't get into any trouble like this anyway).
Note, you won't see the files in XCode unless you add the files in target_sources(), but who cares... it works anyway! Who develops C++ exclusively in iOS? ....

How to fully automate from build to .ipa file in xcode 4

In xcode 3, using a bash script, I could run xcode from the command line, then take the files in the build directory and zip them up into a .ipa file, allowing for a fully automated build process for my adhoc iOS distribution. Anytime there is human intervention, there is the possibly for error.
Under xcode 4, this seem to be not possible anymore. The build directory has been replaced with a DerivedBuilds folder and it uses some obfuscation naming, so it's not possible to let an external script find the files.
In xcode 4, after the build, I need to run Produce->Archive, then selected the file in the organizer, then select save, then navigate to the final folder and name the file and hit save. This is a very error prone process better left to machines.
So, is there a way to go from a clean build all the way to a signed .ipa file? I've got to believe this is possible, there is no way people with automated build processes are having to do this step by hand.
Does anyone know how to do this?
Sure, the script I have been using in my continuous integration environment is available at https://gist.github.com/949831 That might do more than you need but should be able to serve as a base for whatever steps you want to include in your build process.
As you noted it would be hard to predict the derived data path Xcode will use but it is not too hard to located it in the build output as part of the build script.

Resources