Compare commits
15 Commits
Author | SHA1 | Date |
---|---|---|
Li | defd3f977c | |
Li | 53c04dfe7a | |
Li | 789eb5f4f2 | |
Li | 83b544655a | |
Li | c41d2b107d | |
Li | d35581525d | |
random() | 11fd69f882 | |
Li | 8bfe2bad45 | |
Li | 7234acf4b1 | |
Li | 49e29d622b | |
Li | 6b5663506c | |
Li | 4c847bc0dc | |
Li | fe308e5005 | |
Li | 2056d68f44 | |
Li | 11c4b7a3ef |
|
@ -0,0 +1,6 @@
|
|||
*/obj/*
|
||||
*/bin/*
|
||||
*/Release/*
|
||||
*/Debug/*
|
||||
*/.vs/*
|
||||
*.pdb
|
317
Button.pdn
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
Copyright (c) 2022 Li
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit d4bc191fed7b91c9859920e2e1b13974a2e6e7ce
|
43
README.md
|
@ -1,5 +1,44 @@
|
|||
# UGP
|
||||
# Universal GameMaker Patcher
|
||||
Originally created to enable the built in PSVita support in GM Studio, it has evolved into the most universal key generator for the old GameMaker programs
|
||||
|
||||
gamemaker-studio allows you to provide any modules you want into your license
|
||||
all options are:
|
||||
```
|
||||
HTML5
|
||||
iOS
|
||||
android
|
||||
androidTest
|
||||
AndroidTest
|
||||
AndroidMips
|
||||
AmazonFire
|
||||
Mac
|
||||
Tizen
|
||||
WindowsTest
|
||||
Linux
|
||||
RaspberryPi
|
||||
BlackBerry
|
||||
WindowsPhone
|
||||
Symbia
|
||||
Windows8
|
||||
Windows8RT
|
||||
WindowsPhone8
|
||||
yycompiler
|
||||
NeoGeoX
|
||||
ps3
|
||||
ps4
|
||||
psvita
|
||||
wiiu
|
||||
3ds
|
||||
xboxone
|
||||
WindowsUAP
|
||||
AndroidTV
|
||||
AppleTV
|
||||
JavaScript
|
||||
AmazonFireExpired
|
||||
Free
|
||||
```
|
||||
note: not all of these are actually avalible for download on yoyogames servers, for example BlackBerrry, RaspberryPi, etc.
|
||||
and so will not actually *work* if added into your license, the default options is for all modules that are public on yoyogames servers.
|
||||
|
||||
Universal GameMaker Patcher
|
||||
|
||||
Created in GameMaker: HTML5.
|
|
@ -1,26 +1,12 @@
|
|||
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
||||
<assets>
|
||||
<datafiles number="3">
|
||||
<datafile>
|
||||
<name>libeay32.dll</name>
|
||||
<filename>libeay32.dll</filename>
|
||||
<origname>C:\Users\User\Documents\git\UGP\UGP.gmx\datafiles\libeay32.dll</origname>
|
||||
<exists>-1</exists>
|
||||
<size>1207808</size>
|
||||
<exportAction>2</exportAction>
|
||||
<exportDir></exportDir>
|
||||
<overwrite>0</overwrite>
|
||||
<freeData>-1</freeData>
|
||||
<removeEnd>0</removeEnd>
|
||||
<store>-1</store>
|
||||
<data>datafiles\libeay32.dll</data>
|
||||
</datafile>
|
||||
<datafile>
|
||||
<name>UGP.dll</name>
|
||||
<filename>UGP.dll</filename>
|
||||
<origname>C:\Users\User\Documents\git\UGP\UGP.gmx\datafiles\UGP.dll</origname>
|
||||
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\datafiles\UGP.dll</origname>
|
||||
<exists>-1</exists>
|
||||
<size>93696</size>
|
||||
<size>97280</size>
|
||||
<exportAction>2</exportAction>
|
||||
<exportDir></exportDir>
|
||||
<overwrite>0</overwrite>
|
||||
|
@ -32,9 +18,9 @@
|
|||
<datafile>
|
||||
<name>ModuleDownloader.exe</name>
|
||||
<filename>ModuleDownloader.exe</filename>
|
||||
<origname>C:\Users\User\Documents\git\UGP\UGP.gmx\datafiles\ModuleDownloader.exe</origname>
|
||||
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\datafiles\ModuleDownloader.exe</origname>
|
||||
<exists>-1</exists>
|
||||
<size>2146816</size>
|
||||
<size>2147328</size>
|
||||
<exportAction>2</exportAction>
|
||||
<exportDir></exportDir>
|
||||
<overwrite>0</overwrite>
|
||||
|
@ -43,19 +29,33 @@
|
|||
<store>-1</store>
|
||||
<data>datafiles\ModuleDownloader.exe</data>
|
||||
</datafile>
|
||||
<datafile>
|
||||
<name>winspool.dll</name>
|
||||
<filename>winspool.dll</filename>
|
||||
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\datafiles\winspool.dll</origname>
|
||||
<exists>-1</exists>
|
||||
<size>75776</size>
|
||||
<exportAction>2</exportAction>
|
||||
<exportDir></exportDir>
|
||||
<overwrite>0</overwrite>
|
||||
<freeData>-1</freeData>
|
||||
<removeEnd>0</removeEnd>
|
||||
<store>-1</store>
|
||||
<data>datafiles\winspool.dll</data>
|
||||
</datafile>
|
||||
</datafiles>
|
||||
<options>
|
||||
<fullscreen>-1</fullscreen>
|
||||
<interpolate>0</interpolate>
|
||||
<interpolate>-1</interpolate>
|
||||
<noborder>0</noborder>
|
||||
<showcursor>0</showcursor>
|
||||
<scale>-1</scale>
|
||||
<sizeable>0</sizeable>
|
||||
<scale>0</scale>
|
||||
<sizeable>-1</sizeable>
|
||||
<stayontop>0</stayontop>
|
||||
<windowcolor>0</windowcolor>
|
||||
<changeresolution>0</changeresolution>
|
||||
<colordepth>0</colordepth>
|
||||
<resolution>0</resolution>
|
||||
<resolution>6</resolution>
|
||||
<frequency>0</frequency>
|
||||
<nobuttons>0</nobuttons>
|
||||
<freeze>0</freeze>
|
||||
|
@ -84,18 +84,18 @@
|
|||
<aborterrors>0</aborterrors>
|
||||
<variableerrors>0</variableerrors>
|
||||
<argumenterrors>-1</argumenterrors>
|
||||
<author>decompiler clan :police_car: :police_car: :police_car:</author>
|
||||
<version></version>
|
||||
<author>Li</author>
|
||||
<version>1.5</version>
|
||||
<lastchanged>44738.8179982292</lastchanged>
|
||||
<information></information>
|
||||
<version_major>1</version_major>
|
||||
<version_minor>0</version_minor>
|
||||
<version_release>0</version_release>
|
||||
<version_build>0</version_build>
|
||||
<version_company></version_company>
|
||||
<version_product></version_product>
|
||||
<version_copyright></version_copyright>
|
||||
<version_description></version_description>
|
||||
<version_company>The Crystal System</version_company>
|
||||
<version_product>Universal GameMaker Patcher</version_product>
|
||||
<version_copyright>no</version_copyright>
|
||||
<version_description>Patcher for GM5, 6, 8.1 HTML5 and Studio 1.4</version_description>
|
||||
<html5_index><undefined></html5_index>
|
||||
<html5_loadingbar></html5_loadingbar>
|
||||
<html5_alwaysreload>0</html5_alwaysreload>
|
||||
|
@ -147,6 +147,7 @@
|
|||
</sprites>
|
||||
<sprite>sprites\spr_checkmark</sprite>
|
||||
<sprite>sprites\spr_mute</sprite>
|
||||
<sprite>sprites\spr_fullscreen</sprite>
|
||||
<sprite>sprites\spr_back</sprite>
|
||||
<sprite>sprites\spr_go</sprite>
|
||||
<sprite>sprites\spr_textinput</sprite>
|
||||
|
@ -159,11 +160,11 @@
|
|||
<paths name="paths"/>
|
||||
<scripts name="scripts">
|
||||
<scripts name="UI">
|
||||
<script>scripts\create_gmhtml5_menu.gml</script>
|
||||
<script>scripts\create_status.gml</script>
|
||||
<script>scripts\create_product_menu.gml</script>
|
||||
<script>scripts\create_status.gml</script>
|
||||
<script>scripts\create_gm81_menu.gml</script>
|
||||
<script>scripts\create_gm5_menu.gml</script>
|
||||
<script>scripts\create_gmhtml5_menu.gml</script>
|
||||
<script>scripts\create_studio_menu.gml</script>
|
||||
<script>scripts\show_modules.gml</script>
|
||||
</scripts>
|
||||
|
@ -194,6 +195,11 @@
|
|||
<script>scripts\dectohex.gml</script>
|
||||
<script>scripts\string_starts_with.gml</script>
|
||||
</scripts>
|
||||
<scripts name="Ext">
|
||||
<script>scripts\draw_text_center.gml</script>
|
||||
<script>scripts\fullscreen_toggle.gml</script>
|
||||
<script>scripts\fullscreen_off.gml</script>
|
||||
</scripts>
|
||||
</scripts>
|
||||
<fonts name="fonts">
|
||||
<font>fonts\fn_text</font>
|
||||
|
@ -205,7 +211,7 @@
|
|||
<object>objects\obj_checkmark_old</object>
|
||||
<object>objects\obj_checkmark_modules</object>
|
||||
<object>objects\obj_checkmark_updater</object>
|
||||
<object>objects\obj_checkmark_libeay32</object>
|
||||
<object>objects\obj_checkmark_winspool</object>
|
||||
<object>objects\obj_checkmark_base</object>
|
||||
</objects>
|
||||
<objects name="Buttons">
|
||||
|
@ -222,6 +228,7 @@
|
|||
</objects>
|
||||
<object>objects\obj_back</object>
|
||||
<object>objects\obj_mute</object>
|
||||
<object>objects\obj_fullscreen</object>
|
||||
<object>objects\obj_lstbox_entry_module</object>
|
||||
</objects>
|
||||
<objects name="TextInputs">
|
||||
|
@ -245,11 +252,10 @@
|
|||
<object>objects\obj_draw_exports</object>
|
||||
<object>objects\obj_status_draw</object>
|
||||
<object>objects\obj_draw</object>
|
||||
<object>objects\obj_cursor</object>
|
||||
</objects>
|
||||
</objects>
|
||||
</objects>
|
||||
<rooms name="rooms" roommaxid="100003" room_maxtileid="10000000">
|
||||
<rooms name="rooms" roommaxid="100002" room_maxtileid="10000000">
|
||||
<room>rooms\rm_product_select</room>
|
||||
<room>rooms\rm_crack_gm8</room>
|
||||
<room>rooms\rm_crack_studio</room>
|
||||
|
|
BIN
UGP.gmx/help.rtf
|
@ -0,0 +1,19 @@
|
|||
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
||||
<object>
|
||||
<spriteName>spr_checkmark</spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>-1</visible>
|
||||
<depth>0</depth>
|
||||
<persistent>0</persistent>
|
||||
<parentName>obj_checkmark_base</parentName>
|
||||
<maskName><undefined></maskName>
|
||||
<events/>
|
||||
<PhysicsObject>0</PhysicsObject>
|
||||
<PhysicsObjectSensor>0</PhysicsObjectSensor>
|
||||
<PhysicsObjectShape>0</PhysicsObjectShape>
|
||||
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
|
||||
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
|
||||
<PhysicsObjectGroup>0</PhysicsObjectGroup>
|
||||
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
|
||||
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
|
||||
</object>
|
|
@ -8,6 +8,30 @@
|
|||
<parentName><undefined></parentName>
|
||||
<maskName><undefined></maskName>
|
||||
<events>
|
||||
<event eventtype="3" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>x = mouse_x;
|
||||
y = mouse_y;
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="8" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
|
@ -25,7 +49,7 @@
|
|||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>draw_sprite(spr_cursor, 0, mouse_x, mouse_y);
|
||||
<string>draw_sprite(spr_cursor, 0, window_mouse_get_x(), window_mouse_get_y());
|
||||
|
||||
</string>
|
||||
</argument>
|
||||
|
|
|
@ -124,7 +124,7 @@ centerY = room_height/2;
|
|||
|
||||
draw_set_font(fn_text);
|
||||
draw_set_color(c_white);
|
||||
draw_text(0,0,"Press 'ESC' to exit.");
|
||||
draw_text_center(0,"Press 'ESC' to exit.");
|
||||
|
||||
if(draw_flashing_text){
|
||||
draw_text(centerX - (string_width(global.flashing_msg) / 2), room_height - (string_height(global.flashing_msg)), global.flashing_msg);
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
||||
<object>
|
||||
<spriteName>spr_fullscreen</spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>-1</visible>
|
||||
<depth>0</depth>
|
||||
<persistent>-1</persistent>
|
||||
<parentName><undefined></parentName>
|
||||
<maskName><undefined></maskName>
|
||||
<events>
|
||||
<event eventtype="0" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>checked = 0;
|
||||
image_speed = 0;
|
||||
image_index = 0;
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="6" enumb="11">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>if(checked)
|
||||
image_index = 2;
|
||||
else
|
||||
image_index = 0
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="6" enumb="10">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>if(checked)
|
||||
image_index = 3;
|
||||
else
|
||||
image_index = 1
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="6" enumb="4">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>fullscreen_toggle();
|
||||
|
||||
|
||||
if(checked == 0)
|
||||
checked = 1;
|
||||
else
|
||||
checked = 0;
|
||||
|
||||
|
||||
if(checked)
|
||||
image_index = 3;
|
||||
else
|
||||
image_index = 1;
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
</events>
|
||||
<PhysicsObject>0</PhysicsObject>
|
||||
<PhysicsObjectSensor>0</PhysicsObjectSensor>
|
||||
<PhysicsObjectShape>0</PhysicsObjectShape>
|
||||
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
|
||||
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
|
||||
<PhysicsObjectGroup>0</PhysicsObjectGroup>
|
||||
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
|
||||
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
|
||||
</object>
|
|
@ -97,7 +97,7 @@ image_index = 0;
|
|||
<kind>1</kind>
|
||||
<string>error_occurred = 0;
|
||||
|
||||
license_gm81(obj_textinput_name.text, obj_textinput_key.text, obj_checkmark_libeay32.checked);
|
||||
license_gm81(obj_textinput_name.text, obj_textinput_key.text, obj_checkmark_winspool.checked);
|
||||
|
||||
obj_draw.back_down = true;
|
||||
if(!error_occurred)
|
||||
|
|
|
@ -97,7 +97,7 @@ image_index = 0;
|
|||
<kind>1</kind>
|
||||
<string>error_occurred = 0;
|
||||
|
||||
license_gmhtml5(obj_textinput_name.text, obj_textinput_key.text, obj_checkmark_libeay32.checked);
|
||||
license_gmhtml5(obj_textinput_name.text, obj_textinput_key.text, obj_checkmark_winspool.checked);
|
||||
|
||||
obj_draw.back_down = true;
|
||||
if(!error_occurred)
|
||||
|
|
|
@ -98,7 +98,7 @@ image_index = 0;
|
|||
<string>error_occurred = 0;
|
||||
///license_gmhtml5(name, answer, key, email, type, export_modules, do_libeay32, download_exports)
|
||||
|
||||
license_studio(obj_textinput_name.text, string(obj_textinput_answer.text), obj_textinput_key.text, obj_textinput_email.text, obj_textinput_type.text, global.export_modules, obj_checkmark_libeay32.checked, obj_checkmark_modules.checked, obj_checkmark_old.checked)
|
||||
license_studio(obj_textinput_name.text, string(obj_textinput_answer.text), obj_textinput_key.text, obj_textinput_email.text, obj_textinput_type.text, global.export_modules, obj_checkmark_winspool.checked, obj_checkmark_modules.checked, obj_checkmark_old.checked)
|
||||
obj_draw.back_down = true;
|
||||
if(!error_occurred)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,43 @@ if(obj_draw.back_down == false && obj_draw.back_up == false)
|
|||
obj_draw.action += "game_end();";
|
||||
}
|
||||
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="7" enumb="4">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>///Check if the room is too big for the display.
|
||||
|
||||
var display_height;
|
||||
display_height = display_get_height()
|
||||
|
||||
var display_width;
|
||||
display_width = display_get_width()
|
||||
|
||||
|
||||
if(room_width > display_width && room_height > display_height){
|
||||
|
||||
fullscreen_off();
|
||||
obj_fullscreen.checked = 1;
|
||||
|
||||
}
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
|
@ -58,10 +95,11 @@ if(obj_draw.back_down == false && obj_draw.back_up == false)
|
|||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>external_free("UGP.dll");
|
||||
<string>/// delete included files
|
||||
external_free("UGP.dll");
|
||||
|
||||
file_delete("UGP.dll");
|
||||
file_delete("libeay32.dll");
|
||||
file_delete("winspool.dll");
|
||||
file_delete("ModuleDownloader.exe");
|
||||
</string>
|
||||
</argument>
|
||||
|
@ -85,12 +123,26 @@ file_delete("ModuleDownloader.exe");
|
|||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>global.getMachineGuid = external_define("UGP.dll","GetMachineGuid",dll_cdecl,ty_string,0);
|
||||
<string>///Initalize
|
||||
//UGP.DLL imports
|
||||
global.getMachineGuid = external_define("UGP.dll","GetMachineGuid",dll_cdecl,ty_string,0);
|
||||
global.MD5 = external_define("UGP.dll","MD5",dll_cdecl,ty_string,1,ty_string);
|
||||
global.setBinKey = external_define("UGP.dll","SetBinKey",dll_cdecl,ty_real,3,ty_string, ty_string, ty_string);
|
||||
global.generateGM6Key = external_define("UGP.dll","GenerateGM6Key",dll_cdecl,ty_string,1,ty_string);
|
||||
|
||||
|
||||
global.getAppDataFolder = external_define("UGP.dll","GetAppDataFolder",dll_cdecl,ty_string,0);
|
||||
global.getLocalAppDataFolder = external_define("UGP.dll","GetLocalAppDataFolder",dll_cdecl,ty_string,0);
|
||||
|
||||
global.APPDATA = external_call(global.getAppDataFolder);
|
||||
global.LOCALAPPDATA = external_call(global.getLocalAppDataFolder);
|
||||
|
||||
global.download_exports = false;
|
||||
|
||||
instance_create((room_width-(44/2))-10, (room_height-(44/2))-10, obj_mute);
|
||||
instance_create(35, 35, obj_fullscreen);
|
||||
|
||||
cursor_sprite = spr_cursor;
|
||||
|
||||
global.direction = 0;
|
||||
sound_loop(snd_mus);
|
||||
|
@ -101,6 +153,8 @@ for(i = 0; i < 1000; i+=1)
|
|||
|
||||
obj = instance_create(obj_x, obj_y, obj_star);
|
||||
}
|
||||
|
||||
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>inputid = "email";
|
||||
text = "cute.girls@dying.moe";
|
||||
text = "trans@rights.lgbt";
|
||||
image_speed = 0;
|
||||
image_index = 0;
|
||||
global.active = "";
|
||||
|
|
|
@ -127,7 +127,6 @@ global.flashing_msg = '"'+inputid+'"'+" Copied to clipboard!";
|
|||
<kind>1</kind>
|
||||
<string>global.active = "";
|
||||
text = generate_gm5(obj_textinput_name_keygen.text, real(obj_textinput_version_keygen.text));
|
||||
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
|
|
|
@ -179,8 +179,20 @@ global.flashing_msg = '"'+inputid+'"'+" Copied to clipboard!";
|
|||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>global.active = inputid;
|
||||
<string>/*
|
||||
global.active = inputid;
|
||||
keyboard_string = text;
|
||||
*/
|
||||
|
||||
global.active = "";
|
||||
if(text == "5"){
|
||||
text = "6";
|
||||
}
|
||||
else if(text == "6"){
|
||||
text = "5";
|
||||
}
|
||||
|
||||
obj_textinput_key_keygen.text = generate_gm5(obj_textinput_name_keygen.text, real(obj_textinput_version_keygen.text));
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
|
||||
</backgrounds>
|
||||
<views>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
|
||||
</backgrounds>
|
||||
<views>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
|
||||
</backgrounds>
|
||||
<views>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
|
||||
</backgrounds>
|
||||
<views>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
|
||||
</backgrounds>
|
||||
<views>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="1920" hview="1080" xport="0" yport="0" wport="1920" hport="1080" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
@ -51,8 +51,7 @@
|
|||
</views>
|
||||
<instances>
|
||||
<instance index="0" objName="obj_main" x="0" y="0" name="inst_14C62424" locked="0" code="" scaleX="1" scaleY="1" colour="-1" rotation="0"/>
|
||||
<instance index="29" objName="obj_draw" x="16" y="0" name="inst_A00DD3E8" locked="0" code="" scaleX="1" scaleY="1" colour="-1" rotation="0"/>
|
||||
<instance index="30" objName="obj_cursor" x="32" y="0" name="inst_DA3296D2" locked="0" code="" scaleX="1" scaleY="1" colour="-1" rotation="0"/>
|
||||
<instance index="30" objName="obj_draw" x="16" y="0" name="inst_A00DD3E8" locked="0" code="" scaleX="1" scaleY="1" colour="-1" rotation="0"/>
|
||||
</instances>
|
||||
<tiles/>
|
||||
<PhysicsWorld>0</PhysicsWorld>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
|
||||
</backgrounds>
|
||||
<views>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="999" vborder="999" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
<view visible="0" objName="<undefined>" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
global.direction = 1;
|
||||
|
||||
instance_create(centerX-250, centerY-150, obj_checkmark_libeay32);
|
||||
instance_create(centerX-250, centerY-150, obj_checkmark_winspool);
|
||||
//instance_create(centerX-250, centerY-90, obj_checkmark_updater);
|
||||
instance_create(centerX-290, centerY+20, obj_textinput_name);
|
||||
instance_create(centerX-290, centerY+110, obj_textinput_key);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
global.direction = 1;
|
||||
|
||||
instance_create(centerX-250, centerY-150, obj_checkmark_libeay32);
|
||||
instance_create(centerX-250, centerY-150, obj_checkmark_winspool);
|
||||
instance_create(centerX-290, centerY+20, obj_textinput_name);
|
||||
instance_create(centerX-290, centerY+110, obj_textinput_key);
|
||||
instance_create(centerX, centerY+250, obj_go_gmhtml5);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
global.direction = 1;
|
||||
|
||||
instance_create(centerX-250, centerY-150, obj_checkmark_libeay32);
|
||||
instance_create(centerX-250, centerY-150, obj_checkmark_winspool);
|
||||
instance_create(centerX-250, centerY-90, obj_checkmark_modules);
|
||||
instance_create(centerX-290, centerY-30, obj_textinput_name);
|
||||
instance_create(centerX-290, centerY+15, obj_textinput_key);
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
///draw_text(y, text)
|
||||
draw_text((room_width / 2) - (string_width(argument1) / 2), argument0, argument1);
|
|
@ -16,7 +16,6 @@ total = 0;
|
|||
multi = 1;
|
||||
for(i = 1; i <= string_length(name); i+=1) {
|
||||
c = ord(string_char_at(name, i));
|
||||
show_debug_message("c "+string(i)+": "+string(c));
|
||||
|
||||
total += (c - 64) * multi;
|
||||
multi *= 30;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
///fullscreen_off()
|
||||
window_set_fullscreen(false);
|
||||
window_set_size(960, 544);
|
||||
|
||||
window_set_region_size(window_get_width(), window_get_height(), true);
|
||||
window_set_region_scale(0, true);
|
||||
|
||||
window_set_position((display_get_width() / 2) - (window_get_width() / 2), (display_get_height() / 2) - (window_get_height() / 2));
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
///fullscreen_toggle()
|
||||
if(window_get_fullscreen()) {
|
||||
fullscreen_off();
|
||||
}
|
||||
else{
|
||||
window_set_fullscreen(true);
|
||||
}
|
|
@ -19,6 +19,8 @@ var key_part_3;
|
|||
var checksum;
|
||||
var key;
|
||||
|
||||
var ename;
|
||||
|
||||
name = argument0;
|
||||
version = argument1;
|
||||
|
||||
|
@ -26,13 +28,24 @@ version = argument1;
|
|||
// Pad name out with "X" (if its < 5 chars long)
|
||||
new_name = string_upper(pad(name, 5, "X"));
|
||||
|
||||
// Remove " " from the name
|
||||
new_name = string_replace_all(new_name, " ", "");
|
||||
|
||||
// Start 5 characters from the end
|
||||
start = (string_length(new_name) - 5)+1;
|
||||
|
||||
|
||||
if(version == 6){ // For GameMaker 6.0
|
||||
ename = string_copy(new_name, start, 5);
|
||||
return external_call(global.generateGM6Key, ename);
|
||||
}
|
||||
|
||||
|
||||
// Extract last 5 characters, into a 2 char and 3 char string
|
||||
part_1 = string_copy(new_name, start, 2);
|
||||
part_2 = string_copy(new_name, start+2, 3);
|
||||
|
||||
|
||||
// Encode the name with base 0x1E
|
||||
encoded_name_1 = encode_name_part(part_1, version);
|
||||
encoded_name_2 = encode_name_part(part_2, 0);
|
||||
|
@ -55,6 +68,4 @@ while(check_blacklist(key)){
|
|||
key = generate_gm5(name, version);
|
||||
}
|
||||
|
||||
|
||||
return key;
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
///generate_gm6(name)
|
||||
var name;
|
||||
var new_name;
|
||||
var start;
|
||||
var encname;
|
||||
var gm6key;
|
||||
|
||||
name = argument0;
|
||||
|
||||
// Pad name out with "X" (if its < 5 chars long)
|
||||
new_name = string_upper(pad(name, 5, "X"));
|
||||
|
||||
// Start 5 characters from the end
|
||||
start = (string_length(new_name) - 5)+1;
|
||||
|
||||
// Extract last 5 characters, into a 5 char string
|
||||
encname = string_copy(new_name, start, 5);
|
||||
|
||||
// Call from UGP.dll, for implementation see gm6.c inside UGP.dll code.
|
||||
gm6key = external_call(global.generateGM6Key, encname);
|
||||
|
||||
return gm6key;
|
|
@ -1,4 +1,4 @@
|
|||
///license_gm81(name, key, do_libeay32)
|
||||
///license_gm81(name, key, do_winspool)
|
||||
var name;
|
||||
var key;
|
||||
var machineGuid;
|
||||
|
@ -9,11 +9,10 @@ key = argument1;
|
|||
|
||||
if(argument2)
|
||||
{
|
||||
dll_path = environment_get_variable("APPDATA")+"\GameMaker\libeay32.dll";
|
||||
dll_path = global.APPDATA+"\GameMaker\winspool.drv";
|
||||
if(file_exists(dll_path))
|
||||
file_delete(dll_path);
|
||||
//export_include_file_location("libeay32.dll", dll_path);
|
||||
file_copy("libeay32.dll", dll_path);
|
||||
file_copy("winspool.dll", dll_path);
|
||||
}
|
||||
|
||||
guid = external_call(global.getMachineGuid);
|
||||
|
@ -28,7 +27,7 @@ xmlData[0] = name;
|
|||
xmlData[1] = key;
|
||||
xmlData[2] = "GameMaker for Windows";
|
||||
xmlData[3] = chr($0a)+chr($09)+'rvunnwPVsFRMqCuuQ0u3cifBmlwEdRNvZZW3G6gYYEb1/Qs4p3PTUPmewyVck8YrhLZA'+chr($0a)+chr($09)+'Dc70u0IEX03KrCwz8RsQLITCa4iDJ6bkn+PjtUQeGNAr3haNpmPw0/v/v9K6haLXMaVy'+chr($0a)+chr($09)+'4QbSG4+JX5uqefP12xCvJGMMI+dkHDEgOBk='+chr($0a)+chr($09);
|
||||
plistPath = environment_get_variable("LOCALAPPDATA")+"\GameMaker8.1\license.plist";
|
||||
plistPath = global.LOCALAPPDATA+"\GameMaker8.1\license.plist";
|
||||
plistFile = file_text_open_write(plistPath);
|
||||
|
||||
//datetime_str = string_replace(string_format(current_day,2,0)," ","0")+"/"+string_replace(string_format(current_month,2,0)," ","0")+"/"+string(current_year mod 100);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
///license_gmhtml5(name, key, do_libeay32)
|
||||
///license_gmhtml5(name, key, do_winspool)
|
||||
var name;
|
||||
var key;
|
||||
var machineGuid;
|
||||
|
@ -9,11 +9,10 @@ key = argument1;
|
|||
|
||||
if(argument2)
|
||||
{
|
||||
dll_path = environment_get_variable("APPDATA")+"\GameMaker-HTML5\libeay32.dll";
|
||||
dll_path = global.APPDATA+"\GameMaker-HTML5\winspool.drv";
|
||||
if(file_exists(dll_path))
|
||||
file_delete(dll_path);
|
||||
//export_include_file_location("libeay32.dll", dll_path);
|
||||
file_copy("libeay32.dll", dll_path);
|
||||
file_copy("winspool.dll", dll_path);
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,7 +28,7 @@ xmlData[0] = name;
|
|||
xmlData[1] = key;
|
||||
xmlData[2] = "GameMaker for HTML5";
|
||||
xmlData[3] = chr($0a)+chr($09)+'rvunnwPVsFRMqCuuQ0u3cifBmlwEdRNvZZW3G6gYYEb1/Qs4p3PTUPmewyVck8YrhLZA'+chr($0a)+chr($09)+'Dc70u0IEX03KrCwz8RsQLITCa4iDJ6bkn+PjtUQeGNAr3haNpmPw0/v/v9K6haLXMaVy'+chr($0a)+chr($09)+'4QbSG4+JX5uqefP12xCvJGMMI+dkHDEgOBk='+chr($0a)+chr($09);
|
||||
plistPath = environment_get_variable("LOCALAPPDATA")+"\GameMaker-HTML5\license.plist";
|
||||
plistPath = global.LOCALAPPDATA+"\GameMaker-HTML5\license.plist";
|
||||
plistFile = file_text_open_write(plistPath);
|
||||
|
||||
//datetime_str = string_replace(string_format(current_day,2,0)," ","0")+"/"+string_replace(string_format(current_month,2,0)," ","0")+"/"+string(current_year mod 100);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
///license_studio(name, answer, key, email, type, export_modules, do_libeay32, download_exports, old_version)
|
||||
///license_studio(name, answer, key, email, type, export_modules, do_winspool, download_exports, old_version)
|
||||
var name;
|
||||
var key;
|
||||
var answer;
|
||||
|
@ -15,17 +15,16 @@ email = argument3;
|
|||
type = argument4;
|
||||
export_modules = argument5;
|
||||
|
||||
do_libeay32 = argument6
|
||||
do_winspool = argument6
|
||||
global.download_exports = argument7
|
||||
old_version = argument8
|
||||
|
||||
if(do_libeay32)
|
||||
if(do_winspool)
|
||||
{
|
||||
dll_path = environment_get_variable("APPDATA")+"\GameMaker-Studio\libeay32.dll";
|
||||
dll_path = global.APPDATA+"\GameMaker-Studio\winspool.drv";
|
||||
if(file_exists(dll_path))
|
||||
file_delete(dll_path);
|
||||
//export_include_file_location("libeay32.dll", dll_path);
|
||||
file_copy("libeay32.dll", dll_path);
|
||||
file_copy("winspool.dll", dll_path);
|
||||
}
|
||||
|
||||
addons_string = "";
|
||||
|
@ -73,7 +72,7 @@ xmlData[5] = key;
|
|||
xmlData[6] = "GameMaker:Studio";
|
||||
xmlData[7] = chr($0a)+chr($09)+'rvunnwPVsFRMqCuuQ0u3cifBmlwEdRNvZZW3G6gYYEb1/Qs4p3PTUPmewyVck8YrhLZA'+chr($0a)+chr($09)+'Dc70u0IEX03KrCwz8RsQLITCa4iDJ6bkn+PjtUQeGNAr3haNpmPw0/v/v9K6haLXMaVy'+chr($0a)+chr($09)+'4QbSG4+JX5uqefP12xCvJGMMI+dkHDEgOBk='+chr($0a)+chr($09);
|
||||
|
||||
plistPath = environment_get_variable("LOCALAPPDATA")+"\GameMaker-Studio\license.plist";
|
||||
plistPath = global.LOCALAPPDATA+"\GameMaker-Studio\license.plist";
|
||||
plistFile = file_text_open_write(plistPath);
|
||||
|
||||
file_text_write_string(plistFile,'<?xml version="1.0" encoding="UTF-8"?>'+chr($0a));
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
///setup_views()
|
||||
|
||||
var display_height = display_get_height()
|
||||
var display_width = display_get_width()
|
||||
|
||||
if(room_height > display_height){
|
||||
view_hview[view_current] = display_height;
|
||||
}
|
||||
|
||||
if(room_width > display_width){
|
||||
view_hview[view_current] = display_width;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
///setup views()
|
||||
|
||||
var display_height;
|
||||
display_height = display_get_height()
|
||||
|
||||
var display_width;
|
||||
display_width = display_get_width()
|
||||
|
||||
|
||||
|
||||
if(room_height > display_height){
|
||||
view_hview[view_current] = display_height;
|
||||
view_hport[view_current] = display_height;
|
||||
}
|
||||
else{
|
||||
view_hview[view_current] = room_height;
|
||||
view_hport[view_current] = room_height;
|
||||
}
|
||||
if(room_width > display_width){
|
||||
view_wview[view_current] = display_width;
|
||||
view_wview[view_current] = display_width;
|
||||
}
|
||||
else{
|
||||
view_wview[view_current] = room_width;
|
||||
view_wport[view_current] = room_width;
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ else{
|
|||
file_delete(location+"\ModuleDownloader.exe");
|
||||
}
|
||||
|
||||
//export_include_file_location("ModuleDownloader.exe", location+"\ModuleDownloader.exe");
|
||||
file_copy("ModuleDownloader.exe", location+"\ModuleDownloader.exe");
|
||||
execute_program(location+"\ModuleDownloader.exe","",false);
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
||||
<sound>
|
||||
<kind>1</kind>
|
||||
<extension>.mid</extension>
|
||||
<origname>C:\Users\User\Documents\git\UGP\UGP.gmx\\\sound\audio\snd_mus.mid</origname>
|
||||
<kind>3</kind>
|
||||
<extension>.mp3</extension>
|
||||
<origname>C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\sound\audio\snd_mus.mp3</origname>
|
||||
<effects>0</effects>
|
||||
<volume>1</volume>
|
||||
<pan>0</pan>
|
||||
<mp3BitRate>192</mp3BitRate>
|
||||
<oggQuality>6</oggQuality>
|
||||
<preload>-1</preload>
|
||||
<data>snd_mus.mid</data>
|
||||
<data>snd_mus.mp3</data>
|
||||
</sound>
|
||||
|
|
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -1,7 +1,7 @@
|
|||
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
||||
<sprite>
|
||||
<xorig>41</xorig>
|
||||
<yorigin>41</yorigin>
|
||||
<xorig>44</xorig>
|
||||
<yorigin>44</yorigin>
|
||||
<colkind>0</colkind>
|
||||
<coltolerance>0</coltolerance>
|
||||
<sepmasks>0</sepmasks>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
||||
<sprite>
|
||||
<xorig>25</xorig>
|
||||
<yorigin>25</yorigin>
|
||||
<colkind>0</colkind>
|
||||
<coltolerance>0</coltolerance>
|
||||
<sepmasks>0</sepmasks>
|
||||
<bboxmode>2</bboxmode>
|
||||
<bbox_left>3</bbox_left>
|
||||
<bbox_right>46</bbox_right>
|
||||
<bbox_top>3</bbox_top>
|
||||
<bbox_bottom>46</bbox_bottom>
|
||||
<frames>
|
||||
<frame index="0">images\spr_fullscreen_0.png</frame>
|
||||
<frame index="1">images\spr_fullscreen_1.png</frame>
|
||||
<frame index="2">images\spr_fullscreen_2.png</frame>
|
||||
<frame index="3">images\spr_fullscreen_3.png</frame>
|
||||
</frames>
|
||||
</sprite>
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34330.188
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibeayPatch", "LibeayPatch\LibeayPatch.vcxproj", "{122013EF-A5F6-40A0-A8E4-71F725C240A4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Debug|x64.Build.0 = Debug|x64
|
||||
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Release|x64.ActiveCfg = Release|x64
|
||||
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Release|x64.Build.0 = Release|x64
|
||||
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{122013EF-A5F6-40A0-A8E4-71F725C240A4}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {41A99AAD-D35F-4E17-A5BC-8DA7837843FE}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,39 @@
|
|||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include "OpenSSLPatch.h"
|
||||
|
||||
void createDebugConsole() {
|
||||
FILE* fDummy;
|
||||
AllocConsole();
|
||||
freopen_s(&fDummy, "CONIN$", "r", stdin);
|
||||
freopen_s(&fDummy, "CONOUT$", "w", stderr);
|
||||
freopen_s(&fDummy, "CONOUT$", "w", stdout);
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
|
||||
#ifdef _DEBUG
|
||||
createDebugConsole();
|
||||
#endif
|
||||
|
||||
PatchLibeay32();
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
UnpatchLibeay32();
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
/*
|
||||
* Shamelessly stolen from:
|
||||
* https://github.com/adamhlt/IAT-Hooking/tree/main
|
||||
*/
|
||||
|
||||
#include "Hook.h"
|
||||
|
||||
#include <TlHelp32.h>
|
||||
#include <Psapi.h>
|
||||
#include <Shlwapi.h>
|
||||
|
||||
/**
|
||||
* Function who retrieve the base address of the main module of the current process.
|
||||
* \return : the base address if it's successfull else nullptr
|
||||
*/
|
||||
LPVOID IAT::GetCurrentProcessModule()
|
||||
{
|
||||
char lpCurrentModuleName[MAX_PATH];
|
||||
|
||||
char lpImageName[MAX_PATH];
|
||||
|
||||
GetProcessImageFileNameA(GetCurrentProcess(), lpImageName, MAX_PATH);
|
||||
|
||||
MODULEENTRY32 ModuleList{};
|
||||
ModuleList.dwSize = sizeof(ModuleList);
|
||||
|
||||
const HANDLE hProcList = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, 0);
|
||||
if (hProcList == INVALID_HANDLE_VALUE)
|
||||
return nullptr;
|
||||
|
||||
if (!Module32First(hProcList, &ModuleList))
|
||||
return nullptr;
|
||||
|
||||
wcstombs_s(nullptr, lpCurrentModuleName, ModuleList.szModule, MAX_PATH);
|
||||
lpCurrentModuleName[MAX_PATH - 1] = '\0';
|
||||
|
||||
if (strstr(lpImageName, lpCurrentModuleName) != nullptr)
|
||||
return ModuleList.hModule;
|
||||
|
||||
while (Module32Next(hProcList, &ModuleList))
|
||||
{
|
||||
wcstombs_s(nullptr, lpCurrentModuleName, ModuleList.szModule, MAX_PATH);
|
||||
lpCurrentModuleName[MAX_PATH - 1] = '\0';
|
||||
|
||||
if (strstr(lpImageName, lpCurrentModuleName) != nullptr)
|
||||
return ModuleList.hModule;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to hook functions in the IAT of a specified module.
|
||||
* \param lpModuleName : name of the module wich contains the function you want to hook.
|
||||
* \param lpFunctionName : name of the function you want to hook.
|
||||
* \param lpFunction : pointer of the new function.
|
||||
* \param lpTargetModuleName : name of the module you want to target.
|
||||
* \return : the pointer of the original function or nullptr if it failed.
|
||||
*/
|
||||
LPVOID IAT::Hook(LPCSTR lpModuleName, LPCSTR lpFunctionName, const LPVOID lpFunction, LPCSTR lpTargetModuleName)
|
||||
{
|
||||
const HANDLE hModule = GetModuleHandleA(lpTargetModuleName);
|
||||
const auto lpImageDOSHeader = (PIMAGE_DOS_HEADER)(hModule);
|
||||
if (lpImageDOSHeader == nullptr)
|
||||
return nullptr;
|
||||
|
||||
const auto lpImageNtHeader = (PIMAGE_NT_HEADERS)((DWORD_PTR)lpImageDOSHeader + lpImageDOSHeader->e_lfanew);
|
||||
|
||||
const IMAGE_DATA_DIRECTORY ImportDataDirectory = lpImageNtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
|
||||
auto lpImageImportDescriptor = (PIMAGE_IMPORT_DESCRIPTOR)((DWORD_PTR)hModule + ImportDataDirectory.VirtualAddress);
|
||||
|
||||
while (lpImageImportDescriptor->Characteristics != 0)
|
||||
{
|
||||
const auto lpCurrentModuleName = (LPSTR)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->Name);
|
||||
if (_stricmp(lpCurrentModuleName, lpModuleName) != 0)
|
||||
{
|
||||
lpImageImportDescriptor++;
|
||||
continue;
|
||||
}
|
||||
|
||||
auto lpImageOrgThunkData = (PIMAGE_THUNK_DATA)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->OriginalFirstThunk);
|
||||
auto lpImageThunkData = (PIMAGE_THUNK_DATA)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->FirstThunk);
|
||||
|
||||
while (lpImageOrgThunkData->u1.AddressOfData != 0)
|
||||
{
|
||||
const auto lpImportData = (PIMAGE_IMPORT_BY_NAME)((DWORD_PTR)lpImageDOSHeader + lpImageOrgThunkData->u1.AddressOfData);
|
||||
|
||||
if (strcmp(lpFunctionName, (char*)lpImportData->Name) == 0)
|
||||
{
|
||||
DWORD dwJunk = 0;
|
||||
MEMORY_BASIC_INFORMATION mbi;
|
||||
|
||||
VirtualQuery(lpImageThunkData, &mbi, sizeof(MEMORY_BASIC_INFORMATION));
|
||||
if (!VirtualProtect(mbi.BaseAddress, mbi.RegionSize, PAGE_READWRITE, &mbi.Protect))
|
||||
return nullptr;
|
||||
|
||||
const auto lpOrgFunction = (LPVOID)lpImageThunkData->u1.Function;
|
||||
|
||||
#if defined _M_IX86
|
||||
lpImageThunkData->u1.Function = (DWORD_PTR)lpFunction;
|
||||
#elif defined _M_X64
|
||||
lpImageThunkData->u1.Function = (DWORD_PTR)lpFunction;
|
||||
#endif
|
||||
|
||||
if (VirtualProtect(mbi.BaseAddress, mbi.RegionSize, mbi.Protect, &dwJunk))
|
||||
return lpOrgFunction;
|
||||
}
|
||||
|
||||
lpImageThunkData++;
|
||||
lpImageOrgThunkData++;
|
||||
}
|
||||
|
||||
lpImageImportDescriptor++;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to hook functions in the IAT of a the main module of the process.
|
||||
* \param lpModuleName : name of the module wich contains the function.
|
||||
* \param lpFunctionName : name of the function you want to hook.
|
||||
* \param lpFunction : pointer of the new function.
|
||||
* \return : the pointer of the original function or nullptr if it failed.
|
||||
*/
|
||||
LPVOID IAT::Hook(LPCSTR lpModuleName, LPCSTR lpFunctionName, const LPVOID lpFunction)
|
||||
{
|
||||
const LPVOID hModule = GetCurrentProcessModule();
|
||||
const auto lpImageDOSHeader = (PIMAGE_DOS_HEADER)(hModule);
|
||||
if (lpImageDOSHeader == nullptr)
|
||||
return nullptr;
|
||||
|
||||
const auto lpImageNtHeader = (PIMAGE_NT_HEADERS)((DWORD_PTR)lpImageDOSHeader + lpImageDOSHeader->e_lfanew);
|
||||
|
||||
const IMAGE_DATA_DIRECTORY ImportDataDirectory = lpImageNtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
|
||||
auto lpImageImportDescriptor = (PIMAGE_IMPORT_DESCRIPTOR)((DWORD_PTR)hModule + ImportDataDirectory.VirtualAddress);
|
||||
|
||||
while (lpImageImportDescriptor->Characteristics != 0)
|
||||
{
|
||||
const auto lpCurrentModuleName = (LPSTR)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->Name);
|
||||
if (_stricmp(lpCurrentModuleName, lpModuleName) != 0)
|
||||
{
|
||||
lpImageImportDescriptor++;
|
||||
continue;
|
||||
}
|
||||
|
||||
auto lpImageOrgThunkData = (PIMAGE_THUNK_DATA)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->OriginalFirstThunk);
|
||||
auto lpImageThunkData = (PIMAGE_THUNK_DATA)((DWORD_PTR)lpImageDOSHeader + lpImageImportDescriptor->FirstThunk);
|
||||
|
||||
while (lpImageOrgThunkData->u1.AddressOfData != 0)
|
||||
{
|
||||
const auto lpImportData = (PIMAGE_IMPORT_BY_NAME)((DWORD_PTR)lpImageDOSHeader + lpImageOrgThunkData->u1.AddressOfData);
|
||||
|
||||
if (strcmp(lpFunctionName, (char*)lpImportData->Name) == 0)
|
||||
{
|
||||
DWORD dwJunk = 0;
|
||||
MEMORY_BASIC_INFORMATION mbi;
|
||||
|
||||
VirtualQuery(lpImageThunkData, &mbi, sizeof(MEMORY_BASIC_INFORMATION));
|
||||
if (!VirtualProtect(mbi.BaseAddress, mbi.RegionSize, PAGE_READWRITE, &mbi.Protect))
|
||||
return nullptr;
|
||||
|
||||
const auto lpOrgFunction = (LPVOID)lpImageThunkData->u1.Function;
|
||||
|
||||
#if defined _M_IX86
|
||||
lpImageThunkData->u1.Function = (DWORD_PTR)lpFunction;
|
||||
#elif defined _M_X64
|
||||
lpImageThunkData->u1.Function = (DWORD_PTR)lpFunction;
|
||||
#endif
|
||||
|
||||
if (VirtualProtect(mbi.BaseAddress, mbi.RegionSize, mbi.Protect, &dwJunk))
|
||||
return lpOrgFunction;
|
||||
}
|
||||
|
||||
lpImageThunkData++;
|
||||
lpImageOrgThunkData++;
|
||||
}
|
||||
|
||||
lpImageImportDescriptor++;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef IAT_HOOK_H
|
||||
#define IAT_HOOK_H
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
class IAT
|
||||
{
|
||||
public:
|
||||
static LPVOID Hook(LPCSTR lpModuleName, LPCSTR lpFunctionName, const LPVOID lpFunction, LPCSTR lpTargetModuleName);
|
||||
static LPVOID Hook(LPCSTR lpModuleName, LPCSTR lpFunctionName, const LPVOID lpFunction);
|
||||
private:
|
||||
static LPVOID GetCurrentProcessModule();
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,186 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{122013ef-a5f6-40a0-a8e4-71f725c240a4}</ProjectGuid>
|
||||
<RootNamespace>winspoolstub</RootNamespace>
|
||||
<ProjectName>LibeayPatch</ProjectName>
|
||||
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetName>winspool</TargetName>
|
||||
<OutDir>$(SolutionDir)\..\..\UGP.gmx\datafiles</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<TargetName>winspool</TargetName>
|
||||
<OutDir>$(SolutionDir)\..\..\UGP.gmx\datafiles</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<TargetName>winspool</TargetName>
|
||||
<OutDir>$(SolutionDir)\..\..\UGP.gmx\datafiles</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<TargetName>winspool</TargetName>
|
||||
<OutDir>$(SolutionDir)\..\..\UGP.gmx\datafiles</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;WINSPOOLSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>Stub.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;WINSPOOLSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>Stub.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;WINSPOOLSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>Stub.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;WINSPOOLSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalDependencies>Psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>Stub.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Dllmain.cpp" />
|
||||
<ClCompile Include="Hook.cpp" />
|
||||
<ClCompile Include="OpenSSLPatch.cpp" />
|
||||
<ClCompile Include="Stub.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Hook.h" />
|
||||
<ClInclude Include="OpenSSLPatch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Stub.def" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Stub.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Hook.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OpenSSLPatch.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Hook.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="OpenSSLPatch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Stub.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
|
@ -0,0 +1,96 @@
|
|||
#include "Hook.h"
|
||||
#include <stdio.h>
|
||||
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
|
||||
// ripped from openssl
|
||||
typedef struct bignum_st {
|
||||
unsigned long* d;
|
||||
int top;
|
||||
int dmax;
|
||||
int neg;
|
||||
int flags;
|
||||
} BIGNUM;
|
||||
|
||||
typedef struct rsa_st {
|
||||
void* unk1;
|
||||
void* unk2;
|
||||
void* unk3;
|
||||
void* unk4;
|
||||
BIGNUM* m;
|
||||
BIGNUM* e;
|
||||
void* unk5;
|
||||
void* unk6;
|
||||
} RSA;
|
||||
|
||||
using openssl_rsa_public_decrypt_ptr = int(__cdecl*)(int flen, const unsigned char* from, unsigned char* to, RSA* rsa, int padding);
|
||||
static openssl_rsa_public_decrypt_ptr RsaPublicDecrypt = nullptr;
|
||||
|
||||
using openssl_sha1_ptr = char* (__cdecl*)(const unsigned char* d, size_t n, unsigned char* md);
|
||||
static openssl_sha1_ptr Sha1 = nullptr;
|
||||
|
||||
const size_t SHA1_SZ = 0x14;
|
||||
|
||||
char YOYO_LICENSE_PUBLIC_KEY[0x80] = {
|
||||
0x7B, 0x05, 0x78, 0xE0, 0x05, 0x50, 0xA4, 0xD6, 0xBA, 0xE9, 0x5E, 0x28, 0xF6, 0x74, 0x2A, 0x07,
|
||||
0x21, 0x08, 0xB8, 0xC0, 0x71, 0x38, 0xA3, 0x44, 0xCD, 0x87, 0xD0, 0xAB, 0x39, 0xA1, 0xF5, 0x56,
|
||||
0x94, 0x97, 0x3E, 0xF2, 0x03, 0x9C, 0xAD, 0x86, 0x37, 0x4B, 0x82, 0xC2, 0x8C, 0x40, 0x30, 0x85,
|
||||
0x39, 0x4F, 0x04, 0xBA, 0x4B, 0x65, 0xF6, 0x0E, 0x4B, 0x9A, 0x47, 0x59, 0xFE, 0xA0, 0xA6, 0x33,
|
||||
0xDC, 0x8A, 0x0C, 0x35, 0x58, 0xDF, 0x74, 0xDC, 0xB7, 0xFE, 0x57, 0x2C, 0x85, 0x14, 0xA6, 0xD2,
|
||||
0x34, 0x9E, 0x54, 0x7D, 0xCF, 0xEA, 0x08, 0x2D, 0x29, 0xB5, 0x0B, 0x01, 0x30, 0x14, 0x5A, 0x0C,
|
||||
0xBC, 0x28, 0xF2, 0x44, 0xAA, 0xA4, 0x59, 0xEF, 0xF4, 0x4A, 0x4D, 0xFE, 0x90, 0xF4, 0x19, 0x4D,
|
||||
0xAE, 0x9C, 0x8B, 0x26, 0x9B, 0x57, 0xE5, 0x7A, 0xFC, 0x93, 0x31, 0xE5, 0xA7, 0x43, 0xCA, 0xDD
|
||||
};
|
||||
|
||||
static bool JustCheckedLicense = false;
|
||||
|
||||
char* SHA1(const unsigned char* d, size_t n, unsigned char* md) {
|
||||
// If the license was just checked, fake the SHA1 result as all 0xFF
|
||||
if (md != nullptr && JustCheckedLicense) {
|
||||
memset(md, 0xFF, SHA1_SZ);
|
||||
JustCheckedLicense = false;
|
||||
|
||||
return (char*)md;
|
||||
}
|
||||
|
||||
return Sha1(d, n, md);
|
||||
}
|
||||
|
||||
int RSA_public_decrypt(int flen, const unsigned char* from, unsigned char* to, RSA* rsa, int padding) {
|
||||
|
||||
// If the rsa key being used is the public key for license files,
|
||||
// set 0xFF as the result
|
||||
|
||||
int res = RsaPublicDecrypt(flen, from, to, rsa, padding);
|
||||
|
||||
if ( res == SHA1_SZ && memcmp(rsa->m->d, YOYO_LICENSE_PUBLIC_KEY, rsa->m->dmax) == 0) {
|
||||
memset(to, 0xFF, SHA1_SZ);
|
||||
JustCheckedLicense = true;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
// hook RSA Public Decrypt & SHA1 functions
|
||||
void PatchLibeay32() {
|
||||
|
||||
LPVOID pubdecPtr = IAT::Hook("libeay32.dll", "RSA_public_decrypt", &RSA_public_decrypt);
|
||||
if (pubdecPtr == nullptr)
|
||||
return;
|
||||
|
||||
RsaPublicDecrypt = (openssl_rsa_public_decrypt_ptr)pubdecPtr;
|
||||
|
||||
LPVOID shaPtr = IAT::Hook("libeay32.dll", "SHA1", &SHA1);
|
||||
if (shaPtr == nullptr)
|
||||
return;
|
||||
|
||||
Sha1 = (openssl_sha1_ptr)shaPtr;
|
||||
|
||||
}
|
||||
|
||||
void UnpatchLibeay32() {
|
||||
if(RsaPublicDecrypt != nullptr)
|
||||
IAT::Hook("libeay32.dll", "RSA_public_decrypt", &RsaPublicDecrypt);
|
||||
if(Sha1 != nullptr)
|
||||
IAT::Hook("libeay32.dll", "SHA1", &Sha1);
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
void PatchLibeay32();
|
||||
void UnpatchLibeay32();
|
|
@ -0,0 +1,43 @@
|
|||
void ClosePrinter(int a) {
|
||||
|
||||
}
|
||||
|
||||
void DocumentPropertiesW(int a, int b, int c, int d, int e, int f) {
|
||||
|
||||
}
|
||||
|
||||
void DocumentPropertiesA(int a, int b, int c, int d, int e, int f) {
|
||||
|
||||
}
|
||||
|
||||
void GetPrinterA(int a, int b, int c, int d, int e) {
|
||||
|
||||
}
|
||||
|
||||
void GetPrinterW(int a, int b, int c, int d, int e) {
|
||||
|
||||
}
|
||||
|
||||
void EnumPrintersW(int a, int b, int c, int d, int e, int f, int g) {
|
||||
|
||||
}
|
||||
|
||||
void EnumPrintersA(int a, int b, int c, int d, int e, int f, int g) {
|
||||
|
||||
}
|
||||
|
||||
void GetDefaultPrinterW(int a, int b) {
|
||||
|
||||
}
|
||||
|
||||
void GetDefaultPrinterA(int a, int b) {
|
||||
|
||||
}
|
||||
|
||||
void OpenPrinterA(int a, int b, int c) {
|
||||
|
||||
}
|
||||
|
||||
void OpenPrinterW(int a, int b, int c) {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
LIBRARY WINSPOOL
|
||||
EXPORTS
|
||||
ClosePrinter @144
|
||||
DocumentPropertiesW @189
|
||||
DocumentPropertiesA @188
|
||||
GetPrinterA @281
|
||||
GetPrinterW @294
|
||||
EnumPrintersW @248
|
||||
EnumPrintersA @247
|
||||
GetDefaultPrinterW @203
|
||||
GetDefaultPrinterA @201
|
||||
OpenPrinterA @302
|
||||
OpenPrinterW @308
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31229.75
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadModules", "DownloadModules\DownloadModules.csproj", "{0E6EE240-2E74-4408-A256-2EEE45DCFFF1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0E6EE240-2E74-4408-A256-2EEE45DCFFF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0E6EE240-2E74-4408-A256-2EEE45DCFFF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E6EE240-2E74-4408-A256-2EEE45DCFFF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E6EE240-2E74-4408-A256-2EEE45DCFFF1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1AFA50AC-0335-4463-AC99-6645819D74FC}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,186 @@
|
|||
using HtmlAgilityPack;
|
||||
using Org.BouncyCastle.Crypto.Digests;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Cache;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GMTools
|
||||
{
|
||||
class CDNUrls
|
||||
{
|
||||
//GMS14
|
||||
public const String GMS14 = "http://store.yoyogames.com/downloads/gm-studio/update-studio.rss";
|
||||
public const String GMS14EA = "https://pastebin.com/raw/XN4gPX4u";
|
||||
|
||||
//GMS2
|
||||
public const String GMS2 = "http://gms.yoyogames.com/Zeus-Runtime.rss";
|
||||
public const String GMS2Beta = "http://gms.yoyogames.com/Zeus-Runtime-Beta.rss";
|
||||
|
||||
|
||||
public static String FromIndex(int cdnIndex)
|
||||
{
|
||||
switch (cdnIndex)
|
||||
{
|
||||
case 1:
|
||||
return CDNUrls.GMS14;
|
||||
case 2:
|
||||
return CDNUrls.GMS14EA;
|
||||
case 3:
|
||||
return CDNUrls.GMS2;
|
||||
case 4:
|
||||
return CDNUrls.GMS2Beta;
|
||||
}
|
||||
return "NF";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CDN
|
||||
{
|
||||
private static string xmlData = "";
|
||||
|
||||
private static string bypassAuthentication(string url)
|
||||
{
|
||||
if (url.StartsWith("https://updater.yoyogames.com") && !url.Contains("original"))
|
||||
{
|
||||
return "http://updatecdn.yoyogames.com/" + Path.GetFileName(url);
|
||||
}
|
||||
else
|
||||
{
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
private static string getOriginalUrl(string version)
|
||||
{
|
||||
if (version.StartsWith("1."))
|
||||
{
|
||||
return "https://updater.yoyogames.com/api/download/original?filename=Original-" + version + ".zip";
|
||||
}
|
||||
else if (version.StartsWith("2."))
|
||||
{
|
||||
var doc = new HtmlAgilityPack.HtmlDocument();
|
||||
doc.LoadHtml(xmlData);
|
||||
var versions = doc.DocumentNode.SelectNodes("/rss/channel/item/enclosure");
|
||||
foreach (HtmlNode ver in versions)
|
||||
{
|
||||
string verName = ver.GetAttributeValue("sparkle:version", "0.0.0.0");
|
||||
if (verName == version)
|
||||
{
|
||||
return ver.GetAttributeValue("url", "http://example.com/").ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
return "NF";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void UseCDN(String CDN)
|
||||
{
|
||||
try
|
||||
{
|
||||
WebClient wc = new WebClient();
|
||||
wc.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
|
||||
xmlData = wc.DownloadString(CDN);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Could not connect to: " + CDN, "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String GetModuleForVersion(String Version, String Module)
|
||||
{
|
||||
|
||||
Module = Module.ToLower();
|
||||
|
||||
if (Module == "original")
|
||||
return getOriginalUrl(Version);
|
||||
|
||||
var doc = new HtmlAgilityPack.HtmlDocument();
|
||||
doc.LoadHtml(xmlData);
|
||||
var versions = doc.DocumentNode.SelectNodes("/rss/channel/item/enclosure");
|
||||
|
||||
|
||||
foreach (HtmlNode version in versions)
|
||||
{
|
||||
string verName = version.GetAttributeValue("sparkle:version", "0.0.0.0");
|
||||
if (verName == Version)
|
||||
{
|
||||
var modules = version.Elements("module");
|
||||
foreach (var module in modules)
|
||||
{
|
||||
string moduleName = module.GetAttributeValue("name", "Original").ToLower();
|
||||
string moduleUrl = module.GetAttributeValue("url", "http://127.0.0.1");
|
||||
if (moduleName.ToLower() == Module.ToLower())
|
||||
{
|
||||
return bypassAuthentication(moduleUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return "NF"; // Not Found
|
||||
}
|
||||
|
||||
|
||||
public static String[] GetVersions(String Filter = "")
|
||||
{
|
||||
var doc = new HtmlAgilityPack.HtmlDocument();
|
||||
doc.LoadHtml(xmlData);
|
||||
var versions = doc.DocumentNode.SelectNodes("/rss/channel/item/enclosure");
|
||||
|
||||
List<string> verList = new List<string>();
|
||||
|
||||
foreach (HtmlNode version in versions)
|
||||
{
|
||||
string versionName = version.GetAttributeValue("sparkle:version", "0.0.0.0");
|
||||
|
||||
if (Filter == "")
|
||||
{
|
||||
verList.Add(versionName);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetModuleForVersion(versionName, Filter) != "NF")
|
||||
{
|
||||
verList.Add(versionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return verList.ToArray();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static String GetPassword(String ZipName)
|
||||
{
|
||||
if (ZipName.ToLower().StartsWith("original") || ZipName.ToLower().StartsWith("gmstudio"))
|
||||
{
|
||||
return "12#_p@o3w$ir_ADD-_$#";
|
||||
}
|
||||
MD5Digest md5Digest = new MD5Digest();
|
||||
byte[] array = new byte[16];
|
||||
byte[] bytes = Encoding.UTF8.GetBytes("MRJA" + Path.GetFileName(ZipName) + "PHMD");
|
||||
md5Digest.Reset();
|
||||
md5Digest.BlockUpdate(bytes, 0, bytes.Length);
|
||||
md5Digest.Finish();
|
||||
md5Digest.DoFinal(array, 0);
|
||||
string password = Convert.ToBase64String(array);
|
||||
return password;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{0E6EE240-2E74-4408-A256-2EEE45DCFFF1}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>DownloadModules</RootNamespace>
|
||||
<AssemblyName>DownloadModules</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Crypto">
|
||||
<HintPath>..\..\..\..\..\..\AppData\Roaming\GameMaker\BouncyCastle.Crypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack, Version=1.11.33.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.11.33\lib\Net35\HtmlAgilityPack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CDN.cs" />
|
||||
<Compile Include="downloadForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="downloadForm.Designer.cs">
|
||||
<DependentUpon>downloadForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="downloadForm.resx">
|
||||
<DependentUpon>downloadForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DownloadModules
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new downloadForm());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DownloadModules")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DownloadModules")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0e6ee240-2e74-4408-a256-2eee45dcfff1")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
70
Visual Studio Projects/ModuleDownloader/DownloadModules/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,70 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace DownloadModules.Properties
|
||||
{
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DownloadModules.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
29
Visual Studio Projects/ModuleDownloader/DownloadModules/Properties/Settings.Designer.cs
generated
Normal file
|
@ -0,0 +1,29 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace DownloadModules.Properties
|
||||
{
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
77
Visual Studio Projects/ModuleDownloader/DownloadModules/downloadForm.Designer.cs
generated
Normal file
|
@ -0,0 +1,77 @@
|
|||
|
||||
namespace DownloadModules
|
||||
{
|
||||
partial class downloadForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(downloadForm));
|
||||
this.downloadProgress = new System.Windows.Forms.ProgressBar();
|
||||
this.downloadStatus = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// downloadProgress
|
||||
//
|
||||
this.downloadProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.downloadProgress.Location = new System.Drawing.Point(12, 25);
|
||||
this.downloadProgress.Name = "downloadProgress";
|
||||
this.downloadProgress.Size = new System.Drawing.Size(828, 23);
|
||||
this.downloadProgress.TabIndex = 0;
|
||||
//
|
||||
// downloadStatus
|
||||
//
|
||||
this.downloadStatus.AutoSize = true;
|
||||
this.downloadStatus.Location = new System.Drawing.Point(12, 9);
|
||||
this.downloadStatus.Name = "downloadStatus";
|
||||
this.downloadStatus.Size = new System.Drawing.Size(104, 13);
|
||||
this.downloadStatus.TabIndex = 1;
|
||||
this.downloadStatus.Text = "Reading license.plist";
|
||||
//
|
||||
// downloadForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(852, 62);
|
||||
this.Controls.Add(this.downloadStatus);
|
||||
this.Controls.Add(this.downloadProgress);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "downloadForm";
|
||||
this.Text = "GameMaker Exports Downloader";
|
||||
this.Load += new System.EventHandler(this.downloadForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ProgressBar downloadProgress;
|
||||
private System.Windows.Forms.Label downloadStatus;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
using GMTools;
|
||||
using Ionic.Zip;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
|
||||
namespace DownloadModules
|
||||
{
|
||||
public partial class downloadForm : Form
|
||||
{
|
||||
public downloadForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public List<string> Urls = new List<string>();
|
||||
public List<string> Modules = new List<string>();
|
||||
public WebClient wc = new WebClient();
|
||||
public string CurrentFile;
|
||||
public string DownloadLocation;
|
||||
int fileCount;
|
||||
int filesToDownload;
|
||||
public static Dictionary<string, string> ConvertPlistToDictionary(string _file)
|
||||
{
|
||||
XmlDocument xmlDocument = new XmlDocument();
|
||||
xmlDocument.XmlResolver = null;
|
||||
xmlDocument.LoadXml(_file);
|
||||
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||
XmlNode xmlNode = xmlDocument.SelectSingleNode("plist/dict");
|
||||
for (int i = 0; i < xmlNode.ChildNodes.Count; i += 2)
|
||||
{
|
||||
if (xmlNode.ChildNodes[i].Name == "key")
|
||||
{
|
||||
dictionary.Add(xmlNode.ChildNodes[i].InnerText, xmlNode.ChildNodes[i + 1].InnerText);
|
||||
}
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
|
||||
private string pop()
|
||||
{
|
||||
fileCount++;
|
||||
string url = Urls[0];
|
||||
Urls.RemoveAt(0);
|
||||
return url;
|
||||
}
|
||||
|
||||
private void downloadForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string licenseFile = Path.Combine(Path.Combine(Environment.GetEnvironmentVariable("LOCALAPPDATA"), "GameMaker-Studio"), "license.plist");
|
||||
|
||||
if(File.Exists(licenseFile))
|
||||
{
|
||||
byte[] plistFileBytes = File.ReadAllBytes(licenseFile);
|
||||
string plistFile = Encoding.UTF8.GetString(plistFileBytes);
|
||||
Dictionary<string, string> dictionary = ConvertPlistToDictionary(plistFile);
|
||||
|
||||
string[] addonsArray = dictionary["Addons"].Split('.');
|
||||
foreach (string addon in addonsArray)
|
||||
{
|
||||
|
||||
switch (addon.ToLowerInvariant())
|
||||
{
|
||||
case "winphone8":
|
||||
Modules.Add("windowsphone");
|
||||
continue;
|
||||
case "free":
|
||||
case "windows":
|
||||
case "androidtest":
|
||||
case "windows8rt":
|
||||
case "yycompiler":
|
||||
continue;
|
||||
default:
|
||||
Modules.Add(addon.ToLowerInvariant());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Version version = Assembly.LoadFile(Path.Combine(Path.Combine(Environment.GetEnvironmentVariable("APPDATA"), "GameMaker-Studio"), "GameMaker-Studio.exe")).GetName().Version;
|
||||
string cdnVersion = string.Format("{0}.{1}.{2}", version.Major, version.Minor, version.Build);
|
||||
|
||||
CDN.UseCDN(CDNUrls.GMS14);
|
||||
foreach(string module in Modules)
|
||||
{
|
||||
string moduleUrl = CDN.GetModuleForVersion(cdnVersion, module);
|
||||
if (moduleUrl == "NF")
|
||||
continue;
|
||||
|
||||
Urls.Add(moduleUrl);
|
||||
}
|
||||
|
||||
if(Urls.Count > 0)
|
||||
{
|
||||
filesToDownload = Urls.Count;
|
||||
CurrentFile = pop();
|
||||
DownloadLocation = Path.Combine(Path.Combine(Path.Combine(Environment.GetEnvironmentVariable("LOCALAPPDATA"), "GameMaker-Studio"), "UpgradeZip"), Path.GetFileName(CurrentFile));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(DownloadLocation));
|
||||
|
||||
wc.DownloadProgressChanged += Wc_DownloadProgressChanged;
|
||||
wc.DownloadFileCompleted += Wc_DownloadFileCompleted;
|
||||
wc.DownloadFileAsync(new Uri(CurrentFile), DownloadLocation);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Cannot find license.plist.", "ERROR");
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Wc_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
|
||||
{
|
||||
string zipPassword = CDN.GetPassword(Path.GetFileName(CurrentFile));
|
||||
string gmsFolder = Path.Combine(Environment.GetEnvironmentVariable("APPDATA"), "GameMaker-Studio");
|
||||
downloadStatus.Text = "Extracting: " + Path.GetFileName(CurrentFile);
|
||||
Thread extractThread = new Thread(() =>
|
||||
{
|
||||
using (ZipFile archive = new ZipFile(DownloadLocation))
|
||||
{
|
||||
archive.Password = zipPassword;
|
||||
archive.Encryption = EncryptionAlgorithm.PkzipWeak;
|
||||
archive.ExtractAll(gmsFolder, ExtractExistingFileAction.OverwriteSilently);
|
||||
archive.Dispose();
|
||||
}
|
||||
try
|
||||
{
|
||||
File.Delete(DownloadLocation);
|
||||
}
|
||||
catch (Exception) { };
|
||||
|
||||
|
||||
if (Urls.Count > 0)
|
||||
{
|
||||
CurrentFile = pop();
|
||||
DownloadLocation = Path.Combine(Path.Combine(Path.Combine(Environment.GetEnvironmentVariable("LOCALAPPDATA"), "GameMaker-Studio"), "UpgradeZip"), Path.GetFileName(CurrentFile));
|
||||
|
||||
wc.DownloadFileAsync(new Uri(CurrentFile), DownloadLocation);
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
extractThread.Start();
|
||||
|
||||
}
|
||||
private void Wc_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
|
||||
{
|
||||
downloadProgress.Value = e.ProgressPercentage;
|
||||
downloadStatus.Text = "Downloading: (File "+fileCount.ToString()+"/"+filesToDownload.ToString()+") "+Path.GetFileName(CurrentFile)+" "+e.BytesReceived.ToString()+"/"+e.TotalBytesToReceive.ToString()+" "+e.ProgressPercentage.ToString()+"%";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="DotNetZip" version="1.9.1.8" targetFramework="net35" />
|
||||
<package id="HtmlAgilityPack" version="1.11.33" targetFramework="net35" />
|
||||
</packages>
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 Bluzume
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,15 @@
|
|||
# GameMaker-Module-Downloader
|
||||
Minimalistic program to download gamemaker export modules
|
||||
|
||||
|
||||
Q) Why?
|
||||
A) Because gamemaker updater is very shit and keeps failing to download
|
||||
and modding the updater got annoying fast so i just made my own program for it ;d
|
||||
|
||||
Q) Can i pirate with this?
|
||||
A) This progrma only downloads whats set in "Addons" from license.plist.
|
||||
even if you edit the code to download everything, its not enough.
|
||||
because the 5piceIDE will check if you own the exports before enabling them
|
||||
|
||||
Q) Where does it download from?
|
||||
A) directly from YoYo Games Server.
|