[Dev-C++] Questions about porting to windows
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Goran <go...@de...> - 2003-12-11 16:25:34
|
Hi, I have a Linux app written in C, with GTK, libcurl and sqlite and I want to port it to Windows. All libs have versions for Windows, so I made a MSYS/ MinGW enviroment and added GTK, libcurl and sqlite library. But, I have some Windows genral programming questions. 1) In Linux, i have ./configure script that adds PACKAGE_DIR gcc define, so I can use it from code to open files like this: sqlite_open(PACKAGE_DIR "/data.db"); But on Windows I will have precompiled executable. Do I must to change paths to load them from Windows registry and set up keys during setup, or there is some other common procedure? 2) As it will be commercial application, I want to know how can I protect it from copying? I want to do serial number check that will be entered on first time use of application. But keeping some flag that the app is registered is pointless, as everybody can just copy app from host to host. So I had some ideas to make a algorithm that will check some system thing (like processor serial number, HDD serial or something other), and than accept only one value of serial number. So the user will have machine ID, and than call service center, ask for serial number, enter it and that serial will work only on that computer. Problems: well if algorithm is plain, it can be cracked so everybody will have serials ;), than I donow know how to get Hardware data, and what is that hardware data that I can use for serial generating. Do you have some better ideas? Thank you, Goran Rakic |