Skip to content

Commit

Permalink
Update for api4.
Browse files Browse the repository at this point in the history
  • Loading branch information
a08381 committed Sep 18, 2021
1 parent 4b7f7b7 commit 9eef1bd
Show file tree
Hide file tree
Showing 7 changed files with 23,282 additions and 2,274 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
# This workflow contains a single job called "build"
build:
runs-on: windows-latest

env:
MSBUILD_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -35,30 +32,30 @@ jobs:
run: nuget restore SkipCutscene.sln
- name: Build
run: |
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\SkipCutscene.sln /t:Build /p:Configuration=Release /p:DefineConstants=XL_NOAUTOUPDATE
dotnet build $Env:GITHUB_WORKSPACE\SkipCutscene.sln /p:Configuration=Release /p:DefineConstants=XL_NOAUTOUPDATE
- name: Protect
run: |
cd "$Env:GITHUB_WORKSPACE"
.\Lib\.NET_Reactor\dotNET_Reactor.Console.exe -file ".\SkipCutscene\bin\Release\SkipCutscene.dll" -antitamp 1 -hide_calls 1 -control_flow_obfuscation 1 -flow_level 9 -resourceencryption 1
Move-Item -Path .\SkipCutscene\bin\Release\SkipCutscene_Secure\* -Destination .\SkipCutscene\bin\Release -Force
Remove-Item -Path .\SkipCutscene\bin\Release\SkipCutscene_Secure\* -Force -Recurse
Remove-Item -Path .\SkipCutscene\bin\Release\SkipCutscene -Force -Recurse
.\Lib\.NET_Reactor\dotNET_Reactor.Console.exe -file ".\SkipCutscene\bin\Release\net5.0-windows\SkipCutscene.dll" -antitamp 1 -hide_calls 1 -control_flow_obfuscation 1 -flow_level 9 -resourceencryption 1
Move-Item -Path .\SkipCutscene\bin\Release\net5.0-windows\SkipCutscene_Secure\* -Destination .\SkipCutscene\bin\Release\net5.0-windows -Force
Remove-Item -Path .\SkipCutscene\bin\Release\net5.0-windows\SkipCutscene_Secure -Force -Recurse
Remove-Item -Path .\SkipCutscene\bin\Release\net5.0-windows\SkipCutscene -Force -Recurse
Remove-Item -Path .\SkipCutscene\bin\Release\net5.0-windows\SkipCutscene.deps.json -Force -Recurse
mkdir -Path .\SkipCutscene\bin\Package\
- name: Package
uses: papeloto/action-zip@v1
with:
files: SkipCutscene\bin\Release\SkipCutscene.dll SkipCutscene\bin\Release\SkipCutscene.json SkipCutscene\bin\Release\SkipCutscene.pdb
files: SkipCutscene\bin\Release\net5.0-windows\SkipCutscene.dll SkipCutscene\bin\Release\net5.0-windows\SkipCutscene.json SkipCutscene\bin\Release\net5.0-windows\SkipCutscene.pdb
dest: SkipCutscene\bin\Package\latest.zip
- name: Package
run: |
cd "$Env:GITHUB_WORKSPACE"
Copy-Item -Path .\SkipCutscene\bin\Release\SkipCutscene.json -Destination .\SkipCutscene\bin\Package\
Copy-Item -Path .\SkipCutscene\bin\Release\net5.0-windows\SkipCutscene.json -Destination .\SkipCutscene\bin\Package\
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: SkipCutscene
path: ${{ github.workspace }}\SkipCutscene\bin\Release\
path: ${{ github.workspace }}\SkipCutscene\bin\Release\net5.0-windows
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
Expand Down
Binary file modified Lib/Dalamud/Dalamud.dll
Binary file not shown.
25,439 changes: 23,252 additions & 2,187 deletions Lib/Dalamud/Dalamud.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions SkipCutscene/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
22 changes: 8 additions & 14 deletions SkipCutscene/SkipCutscene.cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
using Dalamud;
using Dalamud.Game;
using Dalamud.Game.Internal;
using Dalamud.IoC;
using Dalamud.Logging;
using Dalamud.Plugin;
using System;
using System.Reflection;
using System.Runtime.InteropServices;

namespace Plugins.a08381.SkipCutscene
{
public class SkipCutscene : IDalamudPlugin
public class SkipCutscene : IDalamudPlugin
{
public string Name => "SkipCutscene";

public CutsceneAddressResolver Address;

[PluginService]
public SigScanner SigScanner { get; private set; }

private DalamudPluginInterface pi;
public CutsceneAddressResolver Address;

public void Dispose()
{
if (Address.Offset1 != IntPtr.Zero)
SafeMemory.Write<short>(Address.Offset1, 13173);
if (Address.Offset2 != IntPtr.Zero)
SafeMemory.Write<short>(Address.Offset2, 6260);
pi.Dispose();
}

public void Initialize(DalamudPluginInterface pluginInterface)
public SkipCutscene(DalamudPluginInterface pluginInterface)
{
pi = pluginInterface;

Address = new CutsceneAddressResolver();

SigScanner sig = pluginInterface.TargetModuleScanner;

Address.Setup(sig);
Address.Setup(SigScanner);

if (Address.Offset1 != IntPtr.Zero && Address.Offset2 != IntPtr.Zero)
{
Expand Down
66 changes: 11 additions & 55 deletions SkipCutscene/SkipCutscene.csproj
Original file line number Diff line number Diff line change
@@ -1,67 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\DalamudPackager.1.2.1\build\DalamudPackager.props" Condition="Exists('..\packages\DalamudPackager.1.2.1\build\DalamudPackager.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F8DC279F-8EA0-4B3B-AEFB-93701C9F61F5}</ProjectGuid>
<TargetFramework>net5.0-windows</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SkipCutscene</RootNamespace>
<AssemblyName>SkipCutscene</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<Platforms>x64;AnyCPU</Platforms>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<Reference Include="Dalamud">
<HintPath>..\Lib\Dalamud\Dalamud.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="SkipCutscene.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="SkipCutscene.yaml" />
<PackageReference Include="DalamudPackager" Version="2.1.2" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.3.246501">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\DalamudPackager.1.2.1\build\DalamudPackager.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\DalamudPackager.1.2.1\build\DalamudPackager.props'))" />
<Error Condition="!Exists('..\packages\DalamudPackager.1.2.1\build\DalamudPackager.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\DalamudPackager.1.2.1\build\DalamudPackager.targets'))" />
</Target>
<Import Project="..\packages\DalamudPackager.1.2.1\build\DalamudPackager.targets" Condition="Exists('..\packages\DalamudPackager.1.2.1\build\DalamudPackager.targets')" />
</Project>
4 changes: 0 additions & 4 deletions SkipCutscene/packages.config

This file was deleted.

0 comments on commit 9eef1bd

Please sign in to comment.