Im trying to create an Extension condition in C# based on the Installshield article http://helpnet.flexerasoftware.com/installshield21helplib/helplibrary/SteExtCondAuthor.htm#buildingconditionalstatements_384870052_1039129
but this is referencing c++. Anyone do this in c# or have some examples in c#
Conditions may be evaluated multiple times, so we suggest keeping extension conditions fast and implemented in C++. And as of yet there is no built-in C# support for extension conditions. That said, I've seen a utility that creates an unmanaged entry point that can run managed code, and you may be able to use that wrapper. (Unfortunately I do not remember what it is called.)
Once you have your managed code up and running, you just need to communicate back with the Suite. Do this by declaring the ISuiteExtension interface, and use the IDispatch parameter to your method as such, just like in the C++ example. Reference the topic Working with a Managed-Code Action in a Suite/Advanced UI Installation for the C# declaration of ISuiteExtension, and some samples of how to write code using it.
Related
We have an app written in Objective C. It uses CoreData, RestKit, about 10 viewcontrollers.
We would like to migrate it to Xamarin (so we can target Android and Windows).
I was hoping there was a way to bind the current code to a Xamarin solution and kind of rewrite features step by step within Xamarin (eg: replacing a viewcontroller at a time, and at the end replacing RestKit+CoreData, by SQLite + ServiceStack).
I am aware of the binding to Objective C option that they provide, however, it doesn't look to be the appropriate fit for this (way too complex, probably easier to rewrite the app from scratch).
Is there a way to migrate our current project to Xamarin so we can convert? or do we start from scratch?
Thanks.
Options:
Migrate full project - no;
Automatically create binding for libraries, rewrite business-code, UI-code - yes;
Rewrite from scratch using .Net/Mono classes - yes.
If code size is relatively small, you should rewrite the whole app. Moreover, thus you could have a chance to separate business-logic from UI code and tools libraries (RestKit, CoreData). In perspective, that code will be more reliable and cross-platformish.
This tool can help. It does Obj-c to C# translation (some manual cleanup required):
Automagical
Quite probably, a re-write, from scratch. One thing to keep in mind, if your back-end is .net.. and you are using DTO's.. like with AutoMapper from Entity Framework objects.. you'll be able to re-use those DTO objects on your mobile side with Xamarin. If you are using OData, I'm not sure if this is still a problem, but Xamarin studio wasn't generating OData service clients. So you had to generate them in Visual Studio, then take the generated client code and throw them into your Mobile projects.
sqllite-net is awesome. I've never had any problems with it.
https://github.com/praeclarum/sqlite-net
I currently have a project, with DTO Objects from an Azure WCF service, that I push directly down into SQLLite objects on IOS and Android with Xamarin. I use RestSharp, rather than Service Stack. I should probably go learn the difference.
If you are looking to use SQLCipher from the Component store, to encrypt your sqllite db locally on your device (Good advice to do so), you should be aware that there is an issue in android.. going to 2.2 or 2.3 with SQLCipher. Works for ICS and above though, if I remember right.
Just be careful on your security implementation for allowing clients to connect. I want to say.. don't take too much advice.. and don't take too little either. : )
I'm currently trying to port an application from owl to vcl.
In my old projekt-file I was able to load dialogs with something like
TBatchAcDialog(TWindow* parent) : TAPDialog(parent, BATCH_DIALOG)
However, using TTaskDialog instead it doesn't support the second argument.
I have found an explanation for the user interface designer that when rightclicking on a menu you can load the first declared menu from a rc-file.
However, I don't really know how to load those dialogs as dialogs in this IDE and linking them to my classes again.
Does anyone of you know about this or could link me to an article about a similar problem? I seem to have failed finding a proper solution although implementing rc-dialogs seems to be a common problem to me.
I'm currently trying to port an application from owl to vcl.
What is your exact goal? To be able to build the application with C++ Builder, or to use VCL instead of OWL?
If you want to use VCL for the dialogs, then you cannot port them, you need to rewrite all the UI from scratch, as VCL is very different from the standard Windows dialogs.
If you want just to build the application with C++ Builder, then you can do so by upgrading to OWLNext - it is an open-source upgrade for the OWL framework and works with the modern compilers like C++ Builder and Visual C++.
You can also use OWLNext for a gradual migration to VCL - as VCL and OWL can co-exist in the same application, so you can migrate your old OWL application to C++ Builder, write any new UI in VCL, and gradually rewrite the old UI in VCL - it might be easier and safer than rewriting the whole application with VCL.
C++Builder does not have any native functionality that wraps resource dialogs in classes. You have to set that up manually in your own code if you need it. Otherwise, just use Win32 API functions like CreateDialog() when working with resource dialogs, or else redesign your UI to make use of VCL TForm windows instead of resource dialogs.
TTaskDialog is not what you think it is. It is just a wrapper for the Win32 API TaskDialogIndirect() function (Vista and later only), which is not related to what you are attempting to accomplish.
Can you advice me a shareware HTTP component for Delphi 2010?
I want to use it as HTTP multithread .exe file downloader.
I.e. one big .exe file will be downloaded in several threads.
Indy (included with Delphi) is blocking, which I find makes it much easier to include in threads.
There are also the following freeware components:
ICS - non-blocking
Synapse - Blocking
Personally, I prefer Indy. I have used and like ICS, and I have heard good things about Synapse. You can't really go wrong.
UPDATE:
I see you've made the question more specific, asking for details on using HTTP range.
This can be done in Indy using the request.range property. There is a working example here.
May be you can check Clever Components Internet Suite and see Multi Downloader demo
I haven't worked with Delphi 2010 yet, but I believe you can still import ActiveX type libraries. I've used MSXML2_TLB and WinHttp_TLB before to perform HTTP requests.
Some people don't like using third party components for Internet access. If you prefer, you can use WinInet directly.
It's more verbose, but this can be used from Delphi. And, of course, HTTP Range is also supported.
I am trying to port a C# window's application to ipad. I compiled everything on monotouch and it runs well. Now, I need to make an iPad user interface. If I implement the UI in Objective C, how hard is it to integrate it with my C# core? I saw monotouch can call objective C library, but I am doing the opposite direction. Any help is appreciate.
There's currently no support for you to execute the C# code from Objective-C. Your best bet is to just stay in MonoTouch and finish the iPad application with C#.
Working with UIKit in C# is at least as simple as it is with Obj-C, plus you get all the benefits of not having to deal with Memory allocation and the C# language and .NET framework. Developing UI code with lambda expressions and linq is a beatiful thing. Most obj-C sample code can be translated one-to-one to C# code, so almost every sample you find can be easily understood.
There is one possibility, you make your UI into a library, then you bind the library to C#, and then your C# code calls your Objective-C code to the UI, and this one in turn, calls back to C# for its business logic.
You are better off doing the UI directly in C# as well.
Is there any way to know if a program was created with VB, C# or Delphi and the compiler version?
The easiest way would be to use some software like DependencyWalker and just see what DLLs they use.
.NET binaries are easy to figure out, And there are also software that deassemble them back to C#.NET , VB.NET or C++.NET code for you (whatever you desire)
You can't determine if a .NET binary is written in VB.NET or C#.NET since it is converted into MSIL (Microsoft Intermediate Language).
Also applications like resource explorer should tell you information about the binary.
If you're a little more specific, I can provide more.
Yes.
With Delphi applications, you can use a resource editor like XN Resource Editor. Each executable has an RC_DATA resource called DVCLAL that identifies it as a Delphi app (and contains info about the compiler version). If the app uses the VCL (is a Windows GUI application), you can also see other RC_DATA resources that represent the form file (DFM). You can also view VCL/RTL classes in the binary using a hex editor.
Reflector can show you if an app is C# or VB.NET.
DependencyWalker (linked by another answer) will show you if the app is loading the VB runtime, which would identify a VB Win32 application.
you can use a tool like PEiD (unfortunately this project has been discontinued, but the application is still working).
PEiD detects most common packers,
cryptors and compilers for PE files.
It can currently detect more than 600
different signatures in PE files.