mirror of
https://github.com/modmii/modmii.github.io.git
synced 2025-01-25 22:51:28 +01:00
This commit is contained in:
parent
85c73be250
commit
4290512474
62
ModMii Installer__SOURCE.au3
Normal file
62
ModMii Installer__SOURCE.au3
Normal file
@ -0,0 +1,62 @@
|
||||
#cs ----------------------------------------------------------------------------
|
||||
|
||||
AutoIt Version: 3.3.8.0
|
||||
Author: person66
|
||||
|
||||
Script Function:
|
||||
Move the ModMii skin window.
|
||||
|
||||
Script Version: 1.4
|
||||
|
||||
#ce ----------------------------------------------------------------------------
|
||||
|
||||
#include <Process.au3>
|
||||
|
||||
AutoItSetOption("TrayIconHide", 1)
|
||||
dim $WinPos, $WinPosBak, $WaitTime, $AlreadyOpen = 0, $ProcessName, $ProcessList, $run, $args, $HasArgs = "True"
|
||||
|
||||
;--------------------------------------------------------------
|
||||
$WaitTime = 10 ;Time to wait for next ModMii window (in seconds)
|
||||
;--------------------------------------------------------------
|
||||
|
||||
;Check and kill other instances of this script (skips if other ModMii windows are open)
|
||||
if $AlreadyOpen = 0 then
|
||||
$ProcessName = _ProcessGetName(@AutoItPID)
|
||||
$ProcessList = ProcessList($ProcessName)
|
||||
For $i = 1 To $ProcessList[0][0]
|
||||
if $ProcessList[$i][1] <> @AutoItPID then
|
||||
ProcessClose($ProcessList[$i][1])
|
||||
endif
|
||||
Next
|
||||
EndIf
|
||||
|
||||
;Main part
|
||||
ShellExecute(@ComSpec, '/c call "' & @ScriptDir & '\ModMii Installer.bat"')
|
||||
|
||||
$run = WinWait("ModMii Installer", "by XFlak", $WaitTime)
|
||||
if $run = 0 then
|
||||
exit
|
||||
endif
|
||||
|
||||
While 1
|
||||
While 1
|
||||
if WinExists($run) <> 1 then
|
||||
exitloop
|
||||
else
|
||||
$WinPos = WinGetPos($run)
|
||||
if $WinPos <> 0 then
|
||||
$WinPosBak = $WinPos
|
||||
else
|
||||
$WinPos = $WinPosBak
|
||||
exitloop
|
||||
endif
|
||||
endif
|
||||
WEnd
|
||||
$run = WinWait("ModMii Installer", "by XFlak", $WaitTime)
|
||||
if $run = 0 then
|
||||
exit
|
||||
else
|
||||
WinMove($run, "", $WinPos[0], $WinPos[1])
|
||||
WinActivate($run)
|
||||
endif
|
||||
WEnd
|
99
ModMiiSkin__SOURCE.au3
Normal file
99
ModMiiSkin__SOURCE.au3
Normal file
@ -0,0 +1,99 @@
|
||||
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
|
||||
#AutoIt3Wrapper_icon=D:\ModMii\Support\icon.ico
|
||||
#AutoIt3Wrapper_outfile=ModMiiSkin.exe
|
||||
#AutoIt3Wrapper_UseX64=N
|
||||
#AutoIt3Wrapper_Res_Description=ModMii Skin Launcher
|
||||
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
|
||||
#AutoIt3Wrapper_Res_LegalCopyright=ModMii by XFlak, Launcher by person66
|
||||
#AutoIt3Wrapper_Res_Field=ProductName|ModMii Skin Launcher
|
||||
#AutoIt3Wrapper_Res_Field=ProductVersion|1.0.0.0
|
||||
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
|
||||
#cs ----------------------------------------------------------------------------
|
||||
|
||||
AutoIt Version: 3.3.8.1
|
||||
Author: person66
|
||||
|
||||
Script Function:
|
||||
Move the ModMii skin window.
|
||||
|
||||
Script Version: 1.8
|
||||
|
||||
#ce ----------------------------------------------------------------------------
|
||||
|
||||
;REMEMBER TO COMPILE WITH AUTOIT3WRAPPER.EXE
|
||||
;(http://www.autoitscript.com/autoit3/scite/download/AutoIt3Wrapper.exe)
|
||||
;AND CHANGE THE LINES BELOW TO MEET YOUR NEEDS
|
||||
|
||||
#AutoIt3Wrapper_Autoit3Dir="C:\Program Files (x86)\AutoIt3"
|
||||
|
||||
#include <Process.au3>
|
||||
|
||||
AutoItSetOption("TrayIconHide", 1)
|
||||
dim $WinPos, $WinPosBak, $WaitTime, $AlreadyOpen = 0, $ProcessName, $ProcessList, $run, $args, $HasArgs = "True"
|
||||
|
||||
;--------------------------------------------------------------
|
||||
$WaitTime = 10 ;Time to wait for next ModMii window (in seconds)
|
||||
;--------------------------------------------------------------
|
||||
|
||||
;Check for args, and run ModMii Classic if there are
|
||||
if $CMDLINE[0] = 0 then $HasArgs = "False"
|
||||
if $HasArgs = "True" then
|
||||
for $i = 1 To $CMDLINE[0]
|
||||
$args = $args & $CMDLINE[$I] & " "
|
||||
next
|
||||
ShellExecuteWait(@ScriptDir & "\ModMii.exe", $args)
|
||||
exit
|
||||
endif
|
||||
|
||||
;Check if other ModMii windows are open
|
||||
if WinExists("[CLASS:WizAppWindow; TITLE:ModMii Skin]", "by XFlak") <> 0 OR WinExists("[CLASS:ConsoleWindowClass; TITLE:ModMii]", "") <> 0 then
|
||||
$AlreadyOpen = MsgBox(52, "WARNING", "It appears as if you already have a ModMii Window open." & @CRLF & @CRLF & "Running more than one instance of ModMii at a time is not" & @CRLF & "recommended and may get buggy." & @CRLF & @CRLF & "Are you sure you wish to continue?")
|
||||
if $AlreadyOpen <> 6 then
|
||||
exit
|
||||
endif
|
||||
endif
|
||||
|
||||
;Check and kill other instances of this script (skips if other ModMii windows are open)
|
||||
if $AlreadyOpen = 0 then
|
||||
$ProcessName = _ProcessGetName(@AutoItPID)
|
||||
$ProcessList = ProcessList($ProcessName)
|
||||
for $i = 1 To $ProcessList[0][0]
|
||||
if $ProcessList[$i][1] <> @AutoItPID then
|
||||
ProcessClose($ProcessList[$i][1])
|
||||
endif
|
||||
next
|
||||
endif
|
||||
|
||||
;Main part
|
||||
ShellExecute(@ComSpec, '/c call "' & @ScriptDir & '\Support\ModMiiSkin.bat"', "", "", @SW_HIDE)
|
||||
|
||||
$run = WinWait("ModMii Skin", "by XFlak", $WaitTime)
|
||||
if $run = 0 then
|
||||
exit
|
||||
else
|
||||
$WinPos = WinGetPos($run)
|
||||
endif
|
||||
|
||||
while 1
|
||||
while 1
|
||||
if WinExists($run) <> 1 then
|
||||
exitloop
|
||||
else
|
||||
$WinPos = WinGetPos($run)
|
||||
if $WinPos <> 0 then
|
||||
$WinPosBak = $WinPos
|
||||
else
|
||||
$WinPos = $WinPosBak
|
||||
exitloop
|
||||
endif
|
||||
endif
|
||||
sleep(10)
|
||||
wend
|
||||
$run = WinWait("ModMii Skin", "by XFlak", $WaitTime)
|
||||
if $run = 0 then
|
||||
exit
|
||||
else
|
||||
WinMove($run, "", $WinPos[0], $WinPos[1])
|
||||
WinActivate($run)
|
||||
endif
|
||||
wend
|
4
ModMii_Launcher/readme.txt
Normal file
4
ModMii_Launcher/readme.txt
Normal file
@ -0,0 +1,4 @@
|
||||
Script by person66 for XFlak
|
||||
|
||||
|
||||
To compile you can use Microsoft Visual C# Express. If you want to change the icon go in to Source\ModMii_Launcher and replace the icon.ico with the new one and recompile. Feel free to edit however you want.
|
20
ModMii_Launcher/source/ModMii_Launcher.sln
Normal file
20
ModMii_Launcher/source/ModMii_Launcher.sln
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C# Express 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModMii_Launcher", "ModMii_Launcher\ModMii_Launcher.csproj", "{75A1E231-C7EB-4C42-B8AE-3FAA0874E7A0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{75A1E231-C7EB-4C42-B8AE-3FAA0874E7A0}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{75A1E231-C7EB-4C42-B8AE-3FAA0874E7A0}.Debug|x86.Build.0 = Debug|x86
|
||||
{75A1E231-C7EB-4C42-B8AE-3FAA0874E7A0}.Release|x86.ActiveCfg = Release|x86
|
||||
{75A1E231-C7EB-4C42-B8AE-3FAA0874E7A0}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{75A1E231-C7EB-4C42-B8AE-3FAA0874E7A0}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ModMii_Launcher</RootNamespace>
|
||||
<AssemblyName>ModMii_Launcher</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</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|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
68
ModMii_Launcher/source/ModMii_Launcher/Program.cs
Normal file
68
ModMii_Launcher/source/ModMii_Launcher/Program.cs
Normal file
@ -0,0 +1,68 @@
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
//Launcher written by person66
|
||||
|
||||
namespace ModMii_Launcher
|
||||
{
|
||||
class Program
|
||||
{
|
||||
[DllImport("kernel32.dll")]
|
||||
static extern bool FreeConsole();
|
||||
[DllImport("kernel32.dll")]
|
||||
static extern bool AllocConsole();
|
||||
[DllImport("kernel32.dll")]
|
||||
static extern bool AttachConsole(uint dwProcessId);
|
||||
[DllImport("User32.dll")]
|
||||
public static extern Int32 SetForegroundWindow(int hWnd);
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length <= 0)
|
||||
{
|
||||
Process[] processes = Process.GetProcessesByName("cmd");
|
||||
foreach (Process x in processes)
|
||||
{
|
||||
FreeConsole();
|
||||
AttachConsole(Convert.ToUInt16(x.Id));
|
||||
if (Console.Title == "ModMii")
|
||||
AlreadyOpen(args);
|
||||
}
|
||||
processes = Process.GetProcessesByName("WizApp");
|
||||
foreach (Process x in processes)
|
||||
{
|
||||
if (x.MainWindowTitle == "ModMii Skin")
|
||||
AlreadyOpen(args);
|
||||
}
|
||||
}
|
||||
FreeConsole();
|
||||
AllocConsole();
|
||||
SetForegroundWindow(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle.ToInt32());
|
||||
RunApp(args);
|
||||
}
|
||||
|
||||
private static void AlreadyOpen(string[] args)
|
||||
{
|
||||
DialogResult msg = MessageBox.Show("It appears as if you already have a ModMii Window open.\n\nRunning more than one instance of ModMii at a time is not\nrecommended and may get buggy.\n\nAre you sure you wish to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
|
||||
if (msg == DialogResult.No)
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
private static void RunApp(string[] args)
|
||||
{
|
||||
Console.Title = "ModMii";
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = Environment.GetEnvironmentVariable("COMSPEC");
|
||||
p.StartInfo.Arguments = " /c call " + "\"" + Application.StartupPath + "/Support/ModMii.bat\" " + string.Join(" ", args);
|
||||
p.StartInfo.WorkingDirectory = Application.StartupPath + "/Support/";
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.Start();
|
||||
if (args.Length > 0)
|
||||
{
|
||||
p.WaitForExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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("ModMii Launcher")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ModMii Launcher")]
|
||||
[assembly: AssemblyCopyright("ModMii by XFlak, Launcher by person66")]
|
||||
[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("2c726ad6-2c29-430f-9e44-92d025160689")]
|
||||
|
||||
// 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")]
|
3
ModMii_Launcher/source/ModMii_Launcher/app.config
Normal file
3
ModMii_Launcher/source/ModMii_Launcher/app.config
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
Binary file not shown.
BIN
ModMii_Launcher/source/ModMii_Launcher/icon.ico
Normal file
BIN
ModMii_Launcher/source/ModMii_Launcher/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
Binary file not shown.
@ -0,0 +1 @@
|
||||
C:\ModMii\tests\ModMii_Launcher\bin\Debug\ModMii_Launcher.exe.config
|
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
C:\ModMii\tests\ModMii_Launcher\bin\Release\ModMii_Launcher.exe.config
|
||||
C:\ModMii\tests\ModMii_Launcher\bin\Release\ModMii_Launcher.exe
|
||||
C:\ModMii\tests\ModMii_Launcher\bin\Release\ModMii_Launcher.pdb
|
||||
C:\ModMii\tests\ModMii_Launcher\obj\x86\Release\ResolveAssemblyReference.cache
|
||||
C:\ModMii\tests\ModMii_Launcher\obj\x86\Release\ModMii_Launcher.exe
|
||||
C:\ModMii\tests\ModMii_Launcher\obj\x86\Release\ModMii_Launcher.pdb
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user