FunkyFr3sh / cnc-ddraw

GDI, OpenGL and Direct3D 9 re-implementation of the DirectDraw API for classic 2D games for better compatibility with Windows 2000, XP, Vista, 7, 8, 10, 11, Wine (Linux/macOS/Android) and Virtual Machines
https://discord.gg/afWXJNDDF5
MIT License
2.12k stars 143 forks source link

Update GHA #294

Closed egornovivan closed 3 months ago

egornovivan commented 4 months ago
  1. RAD Studio 12 is used to build the configurator, so it's worth checking compatibility with older systems.
  2. RAD Studio is downloaded from Google Drive, GitHub may complain about the API Key that is used in plaintext
  3. It is advisable that you transfer the archive with RAD Studio 12 to your Google Drive, so that no one will have any complaints against me later. You can use this API Key, it is taken from a public service 4. I did not automate the publication of releases, you can do it yourself somehow, if necessary. ~~You can look here https://github.com/BGforgeNet/Fallout2_Restoration_Project/blob/e4f41599eb046fe1c7131bfe4b8dcdf6f4a24341/.github/workflows/build.yml#L58-L66~~

https://github.com/marketplace/actions/gh-release

egornovivan commented 4 months ago

@FunkyFr3sh Is RAD Studio 12 suitable for build or need RAD Studio 11?

egornovivan commented 4 months ago

When creating a release with a tag, archives will now be added


While I was testing the edits, I used up my Google Drive quota and now to wait 5-24 hours for it to work properly

изображение

FunkyFr3sh commented 4 months ago

Just a quick look, but didn't try it yet though. Currently I'm wondering how this is supposed to work, the embarcadero tools are not free to use so I'm wondering if this is legal? I use the Community Editon, but even that required a license and is only valid for 1 year. How did you solve the problem?

@FunkyFr3sh Is RAD Studio 12 suitable for build or need RAD Studio 11?

I use "C++ Builder 11", never tried the 12 versions so I don't know if they'll work

egornovivan commented 4 months ago

How did you solve the problem?

Compilers from Studio work with MSBuild without checking the license. There is a separate archive with compilers on their website, but it has not been updated for 10 years and there is not enough inc/lib there. The archive contains a version of Architect, and there is a key with which the installation was carried out, but all this can work without a key for assembly with MSBuild


I spent so much time understanding the environment variables to adapt the work from the archive. It would probably have been easier to rewrite the configurator in Autoit and more reliable in terms of compatibility with XP


I had plans to make a configurator for sfall and now I have ideas on how to make a universal configurator for different ini files, but implementing this will not be as easy as a regular configurator

FunkyFr3sh commented 3 months ago

What key is included? It's not legal? I don't want my github/repo here to be closed or get in trouble, I can't use it if it isn't legal.

Yeah, I also thought about rewriting it. But it's difficult to find a good GUI framework that can compete with the one used here. Either they are too big, or they have dependencies or not anti-virus friendly (i think autoit isn't lol)

egornovivan commented 3 months ago

It's not legal?

Not legal. Now I’ll re-upload the archive without the key.

(i think autoit isn't lol)

Why not? Everything you need to create bots/launchers/configurators is there. There is a PCRE regular expression interpreter, there are structures, there is functionality for working with dlls and win api

I’m already thinking about what and how to do for a universal configurator. Descriptions of keys, aliases and parameter presets will be stored in separate ini without affecting the original ini изображение


I re-uploaded the archive without the keys.

FunkyFr3sh commented 3 months ago

I re-uploaded the archive without the keys.

So how would I be able to reconstruct the archive without using anything illegal?

Why not? Everything you need to create bots/launchers/configurators is there. There is a PCRE regular expression interpreter, there are structures, there is functionality for working with dlls and win api

I meant that autoit is usually causing a lot of false positives. You can try to upload a simple exe from it to virustotal.com and check

egornovivan commented 3 months ago

So how would I be able to reconstruct the archive without using anything illegal?

  1. Install any edition of RAD Studio in a non-system directory(for example, my path to the executable files was "D:\Embarcadero\Studio\23.0\bin")
  2. Optional but desirable, replace the "*.cfg" files in the "bin" directory with these from the config.zip (mirror) archive
  3. Create a "Documents" directory in the root directory of RAD Studio(my path turned out to be "D:\Embarcadero\Studio\23.0\Documents")
  4. From catalogs "C:\Users\Public\Documents" And "C:\Users\(USER ACCOUNT NAME)\Documents" copy the "Embarcadero" directory to the "D:\Embarcadero\Studio\23.0\Documents" directory
  5. From catalogs "C:\Users\(USER ACCOUNT NAME)\AppData\Roaming" "C:\Users\(USER ACCOUNT NAME)\AppData\Local" "C:\Program Files (x86)\Common Files" copy the "Embarcadero" directory to the root directory of RAD Studio(the path will be "D:\Embarcadero\Studio\23.0\Embarcadero")
  6. Pack the directory "D:\Embarcadero" into a 7z archive and upload "Embarcadero.7z" to Google Drive
  7. We receive a link to download the archive in this form "https://drive.google.com/file/d/BLABLABLABLABLABLA/view" and in the file "action.yml" we change the link "https:/www.googleapis.com/drive/v3/files/1SjvOu3yOnsoRtivNgIhsBV8nA2DQXJmt?alt=media&key=AIzaSyAA9ERw-9LZVEohRYtCWka_TQc6oXmvcVU" for such "https:/www.googleapis.com/drive/v3/files/BLABLABLABLABLABLA?alt=media&key=AIzaSyAA9ERw-9LZVEohRYtCWka_TQc6oXmvcVU"
  8. You also need to replace in the "action.yml" file "/Embarcadero/Studio/23.0/" with the correct "/Embarcadero/Studio/XX.X/"

    I meant that autoit is usually causing a lot of false positives. You can try to upload a simple exe from it to virustotal.com and check

Yes, there used to be false positives, now they almost never occur for complex GUI programs (It also depends on the number of #includes and the parameters for checking and assembling the code)

egornovivan commented 3 months ago

Do you have problems with compatibility with Win2000? Visual Studio will not be able to assemble a build for Win2000? https://github.com/FunkyFr3sh/cnc-ddraw/issues/298

FunkyFr3sh commented 3 months ago

Do you have problems with compatibility with Win2000? Visual Studio will not be able to assemble a build for Win2000? #298

I did not try yet, but i managed to build for Win XP RTM (Oirignal release with no service pack) just fine (VS 2022) with this hack: https://github.com/FunkyFr3sh/cnc-ddraw/blob/master/src/win2000.asm

Maybe it's possible to fix the other issues too and it will build for win 2000. But it's not that important, mingw gets the job done. Also, no one is really using win 2000 anymore so I could probably also drop support for it.

egornovivan commented 3 months ago

mingw

Did you use this for compilation and makefile? https://github.com/skeeto/w64devkit https://github.com/FunkyFr3sh/cnc-ddraw/blob/master/Makefile I can try adding a build to the GHA. There is only a suspicion that w64devkit will not work.

FunkyFr3sh commented 3 months ago

I use this (GHA made by Semphriss)

https://github.com/FunkyFr3sh/w64devkit/releases

And I changed the makefile to use "-march=i486"

But I wouldn'T worry about it. It's not worth the effort (I might just remove Win2000 support)

egornovivan commented 3 months ago

It seems to be working. To build, the latest release of w64devkit is downloaded from your repository


By the way, where can download the proxy dlls for the gh-releases? I didn't find a repository with them on you.

FunkyFr3sh commented 3 months ago

It seems to be working. To build, the latest release of w64devkit is downloaded from your repository

By the way, where can download the proxy dlls for the gh-releases? I didn't find a repository with them on you.

Nice. Still have to spend some time with it understanding it all

proxy dlls don't have a repo on github atm

FunkyFr3sh commented 3 months ago

So I just been looking around and I don't think there is a legal way to set this all up, there is no way to get all the needed files without a valid license. I don't want to get in trouble or get my github account closed so I can't really merge this.

I may be nice to replace the config tool one day with something that can be built legally with GHA and it should also have a license that allows commercial use as well because some games on Steam/GOG ship with cnc-ddraw and currently it's not possible to include the config program in such cases.

egornovivan commented 2 months ago

I'm faced with a trivial problem, I don't know how to implement scrolling in Autoit, and now I don't have time to finish the universal configurator 🙁 изображение