Afforess
The White Wizard
Any progress dbkblk? No rush, just checking up.
BOOL b_64BitOpSys;
IsWow64Process(GetCurrentProcess(), &b_64BitOpSys);
So to clarify the bug I found, you are missing a semicolon here: https://github.com/dbkblk/and2_checker/blob/devel/checker/main.cpp#L22
Code:BOOL b_64BitOpSys; IsWow64Process(GetCurrentProcess(), &b_64BitOpSys);
Also I had trouble compiling a releasable build, I could only get Qt Creator to build in debug mode. Could you perhaps document how to build the application, in case I am missing some steps?
Note that the installer put the updater into the right folder, so it shouldn't be executed in another folder.Finally, less about the code and more about the updater. I'd like to be able to replace the main download installer with this eventually, but there are a couple key issues preventing that. First, this updater has to be run from the RAND mod directory, which is counter-intuitive. It would be easiest if the updater could be run from anywhere, and found the mod directory on it's own (or asked the user, failing to find it from the registry).
I used QtCreator 5.3.2 with a custom compiled static Qt 5.3 installation (with msvc-2010). You should be able to compile it with the standard dynamic installation as well !
Note that the installer put the updater into the right folder, so it shouldn't be executed in another folder.
Do you expect it to move into the right folder after the first launch ? How do you think it should behave ?
Here are the steps i use to compile a static installation:Ah, that is the step I was missing. I had to go look up how to do a static installation from the Qt source code.
1.) Installer runs, installs the updater to the mod location
2.) User runs the updater, it installs the mod
3.) User runs the game through the updater
I'd like to combine step 1 and step 2, so that instead of having to install the updater anywhere, it just runs without any installation. All of the libraries that are currently unpacked could probably just be loaded into memory. So users would just download the updater and it would contain and run everything, no matter where they moved it or what files they changed.
Here are the steps i use to compile a static installation:
Qt static build:
- Make QtStatic folder
- Install Perl (Strawberry) and Python
- Decompress jom in C:\QtStatic\tools\jom (see qt website)
- Decompress Qt source in C:\QtStatic\qt-x.x.x-src (or use the maintenance tool which download it to C:\Qt\5.3\Src\)
- Install Microsoft SDK 7.1 or Visual C++ 2010 express
- Open MSVC prompt:
- Cd into the build folder
SetEnv.cmd /x86 /Release
set PATH=%PATH%;C:\QtStatic\tools\jom;
set LANG=en
c:\QtStatic\qt-x.x.x-src\configure -release -static -opensource -opengl desktop -nomake examples -nomake tests (-debug-and-release ?) (or C:\Qt\5.3\Src, as the configure option will copy the files into the folder you are into)
jom /W /S -j8 (with 8 the number of your CPU cores).
In fact, you expect the installer to fully install the mod in one step.
What are the benefits of being able to launch it anywhere ? Actually, the executable does not need any libraries, but svn or rsync does.
I don't know how to create an executable which embed others files ATM :/
The alternative is to automatically launch the checker once the mod is installed ?
@Afforess: Assuming we won't use SVN anymore for updating.
How do you think i can get the changelog ? SVN need to have a .svn to grab changelog so i need to get it with another method.
My best guess is that you enhance your script to automatically:
- Generate a "changelog_last.json" which contains the last 50 entries.
- Generate a "changelog_full.json" which contains all the changelog history.
The ideal move would be to put the revision number in a separate tag so i just need to check it out. These would need to be accessible with rsync.
"repo.json" won't be needed anymore as rsync will handle everything.
(EDIT: No need for JSON, the easiest for you is to output the request of svn changelog with "svn --xml" and i will parse it in no time. So i need a changelog_last.xml and changelog_full.xml).
The idea behind that is to simplify the behavior of the launcher:
- Start and initialise the launcher
- Use rsync the grab changelog_last.json.
- Check the latest version from the file and compare it with the local installation (from the python file ? or maybe from a variable in the ini which is validated if the update went well ?).
- If there is an update, inform the user (with the yellow update button).
- The update window will print the "changelog_last" content. A button will invite the user to read the full if needed. Another one to begin the update.
- Blacklist the config files from the rsync sync operation.
- The addons support will be removed from now.
Then, on a later update:
- Allow the user to exclude custom files from the sync process.
- Download mods, check the contained filepaths and then exclude it from the rsync process. Allow to remove them by "un-blacklisting" them then rsync again.
About the installer:
I think it should be possible to integrate rsync inside the NSIS installer.
What need to be resolved:
I need to find a way to get progress from rsync to properly integrate it into a GUI.
Do you agree about the process ?
Thanks
EDIT: I don't know how to get these files from rsync ! The rsync module server-side only allow me to access to the ftp, which point straight to the mod folder !