├── .ci ├── azure.yml ├── package.ps1 └── prepare.ps1 ├── .github └── ISSUE_TEMPLATE │ └── bug_report.md ├── .gitignore ├── .logo └── tsunamods.png ├── .vsconfig ├── 7thHeaven.Code ├── 7thHeaven.Code.csproj ├── AvailableUpdate.cs ├── Catalog.cs ├── ColumnSettings.cs ├── ConfigSettings.cs ├── DownloadItem.cs ├── DuplicateModException.cs ├── FF7FileLister.cs ├── FFNxConfigManager.cs ├── FileDownloadTask.cs ├── FileUtils.cs ├── GDrive.cs ├── ImageCache.cs ├── Install.cs ├── LaunchSettings.cs ├── Library.cs ├── Mod.cs ├── ModImporter.cs ├── ModLoadOrder.cs ├── ModVersion.cs ├── Profile.cs ├── Properties │ └── AssemblyInfo.cs ├── RegistryHelper.cs ├── Resources │ ├── 294.gif │ └── Loader.gif ├── Settings.cs ├── StringKey.cs ├── Sys.cs ├── Workshop.Designer.cs └── Workshop.resx ├── 7thHeaven.sln ├── 7thWorkshop ├── 7H.ico ├── 7H.png ├── 7thHeaven.csproj ├── 7thHeaven.var ├── App.config ├── CommonMark.dll ├── ConfigSpec-FF7OpenGL.xml ├── Downloader.cs ├── EasyHook.dll ├── FPrompt.cs ├── FPrompt.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── 010_LowPriority_16x16_72.png │ ├── 010_LowPriority_16x16_72_Flip.png │ ├── 1385_Disable_16x16_72.png │ ├── 294.gif │ ├── ClosePreviewHS.bmp │ ├── Critical.bmp │ ├── Loader.gif │ ├── SearchFolderHS.png │ ├── Tent_FF7.png │ ├── browse.png │ └── startwithoutdebugging_6556.png ├── Transitions.dll ├── app.manifest ├── cryptopp.dll ├── fChunks.Designer.cs ├── fChunks.cs ├── fChunks.resx ├── fConfigSettings.Designer.cs ├── fConfigSettings.cs ├── fConfigSettings.resx ├── fDownloads.Designer.cs ├── fDownloads.cs ├── fDownloads.resx ├── fErr.Designer.cs ├── fErr.cs ├── fErr.resx ├── fImportMod.Designer.cs ├── fImportMod.cs ├── fImportMod.resx ├── fLibrary.Designer.cs ├── fLibrary.cs ├── fLibrary.resx ├── fMakeMod.Designer.cs ├── fMakeMod.cs ├── fMakeMod.resx ├── fModConfig.Designer.cs ├── fModConfig.cs ├── fModConfig.resx ├── fNewVer.Designer.cs ├── fNewVer.cs ├── fNewVer.resx ├── fPack.Designer.cs ├── fPack.cs ├── fPack.resx ├── fProfile.Designer.cs ├── fProfile.cs ├── fProfile.resx ├── fProfiles.Designer.cs ├── fProfiles.cs ├── fProfiles.resx ├── fReadme.Designer.cs ├── fReadme.cs ├── fReadme.resx ├── fSettings.Designer.cs ├── fSettings.cs ├── fSettings.resx ├── fTextEdit.Designer.cs ├── fTextEdit.cs ├── fTextEdit.resx ├── mega.dll ├── pMessage.Designer.cs ├── pMessage.cs ├── pMessage.resx ├── pMod.Designer.cs ├── pMod.cs ├── pMod.resx ├── pTags.Designer.cs ├── pTags.cs └── pTags.resx ├── 7thWrapperLib ├── 7HPlugin.cs ├── 7thWrapperLib.csproj ├── Bytes.cs ├── Data.cs ├── DebugLogger.cs ├── FieldFile.cs ├── HexPatch.cs ├── IrosArc.cs ├── LGP.cs ├── Lzs.cs ├── Overrides.cs ├── Profile.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Settings.Designer.cs │ └── Settings.settings ├── RuntimeVar.cs ├── Util.cs ├── VFile.cs ├── VStreamFile.cs ├── Win32.cs └── Wrap.cs ├── Installer ├── App.config ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── 7H.ico │ └── 7thheaven.png ├── Classes │ ├── EmbeddedZip.cs │ └── FolderPicker.cs ├── Installer.csproj ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Registry │ ├── RegistryHelper.cs │ └── Uninstall.cs ├── Resources │ ├── 7thHeaven.zip │ └── FFNx.zip ├── Uninstall.xaml └── Uninstall.xaml.cs ├── IrosArc ├── App.config ├── IrosArc.csproj ├── Program.cs └── Properties │ └── AssemblyInfo.cs ├── IrosMega ├── Base64.cs ├── IrosMega.csproj ├── MegaIros.cs └── Properties │ └── AssemblyInfo.cs ├── LICENSE.txt ├── README.md ├── SeventhHeavenUI ├── 7H.ico ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo1.cs ├── Classes │ ├── BoolWithMessage.cs │ ├── ButtonWithImage.cs │ ├── Constraint.cs │ ├── ControlConfiguration.cs │ ├── ControlInputSetting.cs │ ├── ControlMapper.cs │ ├── ControllerInterceptor.cs │ ├── DS4ControllerService.cs │ ├── DateTimeComparer.cs │ ├── FileDialogHelper.cs │ ├── GameController.cs │ ├── GameConverter.cs │ ├── GameDiscMounter.cs │ ├── GameLauncher.cs │ ├── KeyboardInputSender.cs │ ├── OpenFolderDialog.cs │ ├── PrimaryScreen.cs │ ├── ReloadListOption.cs │ ├── ResourceHelper.cs │ ├── SilenceWaveProvider.cs │ ├── SupportedResolution.cs │ ├── Themes │ │ ├── Classic7HTheme.cs │ │ ├── DarkTheme.cs │ │ ├── DarkThemeWithBackground.cs │ │ ├── ITheme.cs │ │ ├── LightTheme.cs │ │ ├── LightThemeWithBackground.cs │ │ ├── ThemeSettings.cs │ │ └── TsunamodsTheme.cs │ └── WCF │ │ └── ServiceHost.cs ├── DS4WindowsCore.dll ├── EasyHook.dll ├── LICENSE ├── NLog.config ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── README.md ├── Resources │ ├── 7H_GameDriver_UI.xml │ ├── 7thHeaven.var │ ├── Controls │ │ ├── 1998 KB+PlayStation (Stock).cfg │ │ ├── 1998 KB+PlayStation (Swap AB-XO).cfg │ │ ├── [Default-Alt] Steam KB+PlayStation (Swap AB-XO).cfg │ │ ├── [Default] Steam KB+PlayStation (Stock).cfg │ │ ├── unab0mb's Choice+PlayStation (Stock).cfg │ │ └── unab0mb's Choice+PlayStation (Swap AB-XO).cfg │ ├── FF7DISC1.ISO │ ├── FF7_1.02_Eng_Patch │ │ ├── FF7Config.exe │ │ ├── ff7.exe │ │ ├── readme.doc │ │ ├── readme.rtf │ │ └── readme.txt │ ├── Help │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── getstarted.html │ │ ├── images │ │ │ ├── buttons │ │ │ │ ├── appbar.add.png │ │ │ │ ├── appbar.arrow.down.png │ │ │ │ ├── appbar.arrow.up.png │ │ │ │ ├── appbar.cabinet.in.png │ │ │ │ ├── appbar.cancel.png │ │ │ │ ├── appbar.cd.png │ │ │ │ ├── appbar.checkmark.thick.png │ │ │ │ ├── appbar.chevron.down.png │ │ │ │ ├── appbar.chevron.up.png │ │ │ │ ├── appbar.cloud.delete.png │ │ │ │ ├── appbar.cloud.pause.png │ │ │ │ ├── appbar.cloud.play.png │ │ │ │ ├── appbar.control.play.png │ │ │ │ ├── appbar.copy.png │ │ │ │ ├── appbar.delete.png │ │ │ │ ├── appbar.download.png │ │ │ │ ├── appbar.edit.png │ │ │ │ ├── appbar.eye.png │ │ │ │ ├── appbar.folder.ellipsis.png │ │ │ │ ├── appbar.folder.png │ │ │ │ ├── appbar.layout.header.png │ │ │ │ ├── appbar.minus.png │ │ │ │ ├── appbar.question.png │ │ │ │ ├── appbar.refresh.png │ │ │ │ ├── appbar.reset.png │ │ │ │ ├── appbar.save.png │ │ │ │ ├── appbar.search.filter.png │ │ │ │ ├── appbar.settings.png │ │ │ │ ├── appbar.sort.numeric.png │ │ │ │ ├── appbar.sound.left.right.png │ │ │ │ ├── appbar.sound.png │ │ │ │ ├── slider.png │ │ │ │ ├── toggle.off.png │ │ │ │ └── toggle.on.png │ │ │ ├── installs │ │ │ │ ├── 1998-01.png │ │ │ │ ├── 1998-02.png │ │ │ │ ├── 1998-03.png │ │ │ │ ├── 1998-04.png │ │ │ │ ├── 1998-05.png │ │ │ │ ├── 1998-05b.png │ │ │ │ ├── 1998-05c.png │ │ │ │ ├── 1998-05d.png │ │ │ │ ├── 1998-06.png │ │ │ │ ├── 1998-07.png │ │ │ │ ├── 1998-08.png │ │ │ │ ├── 1998-runsetup.png │ │ │ │ ├── 7H-01.png │ │ │ │ ├── 7H-02.png │ │ │ │ ├── 7H-03.png │ │ │ │ ├── 7H-04.png │ │ │ │ ├── 7H-05.png │ │ │ │ ├── 7H-06.png │ │ │ │ ├── 7H-07.png │ │ │ │ ├── 7H-08.png │ │ │ │ ├── Steam-01.png │ │ │ │ ├── Steam-02.png │ │ │ │ ├── Steam-03.png │ │ │ │ ├── Steam-04.png │ │ │ │ ├── Steam-05.png │ │ │ │ ├── Steam-06.png │ │ │ │ ├── Steam-07.png │ │ │ │ ├── Steam-08.png │ │ │ │ └── Steam-09.png │ │ │ ├── logo.png │ │ │ └── screens │ │ │ │ ├── catalog.downloader.png │ │ │ │ ├── catalog.view.png │ │ │ │ ├── catalogmodcreation.tool.png │ │ │ │ ├── command.line.png │ │ │ │ ├── config.gamedriver.png │ │ │ │ ├── config.mod.png │ │ │ │ ├── controls.png │ │ │ │ ├── game.launcher.png │ │ │ │ ├── game.launcher.settings.png │ │ │ │ ├── import.movies.png │ │ │ │ ├── importmod.png │ │ │ │ ├── infobar.png │ │ │ │ ├── irotools.pack.png │ │ │ │ ├── language.png │ │ │ │ ├── launcher.settings.audiodevice.png │ │ │ │ ├── launcher.settings.options.png │ │ │ │ ├── main_overview.png │ │ │ │ ├── menubar.png │ │ │ │ ├── modinfo.panel.png │ │ │ │ ├── mymods.category.png │ │ │ │ ├── mymods.view.png │ │ │ │ ├── profiles.details.png │ │ │ │ ├── profiles.png │ │ │ │ ├── search.box.png │ │ │ │ ├── search.filters.png │ │ │ │ ├── settings.catalogs.png │ │ │ │ ├── settings.general.png │ │ │ │ ├── settings.monitorfolders.png │ │ │ │ ├── settings.options.png │ │ │ │ ├── settings.paths.png │ │ │ │ ├── settings.programstorun.png │ │ │ │ ├── settings.shell.png │ │ │ │ ├── shell.integration.png │ │ │ │ ├── shell.integration.shortcut.png │ │ │ │ ├── tab.browsecatalog.png │ │ │ │ ├── tab.mymods.png │ │ │ │ ├── themes.png │ │ │ │ └── tool.chunk.png │ │ ├── index.html │ │ ├── modhelp.html │ │ ├── troubleshooting.html │ │ └── userhelp.html │ ├── Icons │ │ ├── IconResourceDictionary.xaml │ │ └── PS_Xbox_Icons │ │ │ ├── Circle_B.png │ │ │ ├── Cross_A.png │ │ │ ├── L1_LB.png │ │ │ ├── L2_LT.png │ │ │ ├── LS_DPad_Down.png │ │ │ ├── LS_DPad_Left.png │ │ │ ├── LS_DPad_Right.png │ │ │ ├── LS_DPad_Up.png │ │ │ ├── Options_Start.png │ │ │ ├── R1_RB.png │ │ │ ├── R2_RT.png │ │ │ ├── Share_Back.png │ │ │ ├── Square_X.png │ │ │ ├── Triangle_Y.png │ │ │ ├── XBOne_DPad_Down.png │ │ │ ├── XBOne_DPad_Left.png │ │ │ ├── XBOne_DPad_Right.png │ │ │ ├── XBOne_DPad_Up.png │ │ │ ├── XB_LS_Click.png │ │ │ ├── XB_LS_Down.png │ │ │ ├── XB_LS_Left.png │ │ │ ├── XB_LS_Right.png │ │ │ ├── XB_LS_Up.png │ │ │ └── XB_RS_Click.png │ ├── Languages │ │ ├── 7H_GameDriver_UI.br.xml │ │ ├── 7H_GameDriver_UI.de.xml │ │ ├── 7H_GameDriver_UI.es.xml │ │ ├── 7H_GameDriver_UI.fr.xml │ │ ├── 7H_GameDriver_UI.gr.xml │ │ ├── 7H_GameDriver_UI.it.xml │ │ ├── 7H_GameDriver_UI.ja.xml │ │ ├── Condor_Tran │ │ │ ├── ehelp1_pal.tga │ │ │ └── ehelp_pal.tga │ │ ├── StringResources.br.xaml │ │ ├── StringResources.de.xaml │ │ ├── StringResources.es.xaml │ │ ├── StringResources.fr.xaml │ │ ├── StringResources.gr.xaml │ │ ├── StringResources.it.xaml │ │ └── StringResources.ja.xaml │ ├── LatestAvailableUpdate.xml │ ├── Licenses │ │ ├── icons_license.txt │ │ └── naudio_LICENSE │ ├── SharedStyles.xaml │ ├── StringResources.xaml │ ├── VBusDriver │ │ ├── DIFxAPI │ │ │ ├── amd64 │ │ │ │ └── DIFxAPI.dll │ │ │ └── x86 │ │ │ │ └── DIFxAPI.dll │ │ ├── ScpDriver.exe │ │ └── System │ │ │ ├── ScpVBus.cat │ │ │ ├── ScpVBus.inf │ │ │ ├── amd64 │ │ │ └── ScpVBus.sys │ │ │ └── x86 │ │ │ └── ScpVBus.sys │ ├── WinCDEmu │ │ ├── LICENSE.txt │ │ └── PortableWinCDEmu.exe │ ├── audio_test_file.ogg │ ├── circleLoader.gif │ └── ulgp_v1.3.2 │ │ └── ulgp.exe ├── SeventhHeavenUI.csproj ├── UserControls │ ├── CatalogUserControl.xaml │ ├── CatalogUserControl.xaml.cs │ ├── CreateCatalogUserControl.xaml │ ├── CreateCatalogUserControl.xaml.cs │ ├── CreateModUserControl.xaml │ ├── CreateModUserControl.xaml.cs │ ├── MegaLinkGenUserControl.xaml │ ├── MegaLinkGenUserControl.xaml.cs │ ├── MyModsUserControl.xaml │ ├── MyModsUserControl.xaml.cs │ ├── PackIroUserControl.xaml │ ├── PackIroUserControl.xaml.cs │ ├── PatchIroAdvancedUserControl.xaml │ ├── PatchIroAdvancedUserControl.xaml.cs │ ├── PatchIroUserControl.xaml │ ├── PatchIroUserControl.xaml.cs │ ├── UnpackIroUserControl.xaml │ └── UnpackIroUserControl.xaml.cs ├── ViewModels │ ├── AllowModToRunViewModel.cs │ ├── CatalogCreationViewModel.cs │ ├── CatalogModItemViewModel.cs │ ├── CatalogViewModel.cs │ ├── ChunkToolViewModel.cs │ ├── ConfigureModViewModel.cs │ ├── ControlMappingViewModel.cs │ ├── DownloadItemViewModel.cs │ ├── DownloadLinkViewModel.cs │ ├── FilterItemViewModel.cs │ ├── GLSettingViewModel.cs │ ├── GameLaunchSettingsViewModel.cs │ ├── GameLaunchViewModel.cs │ ├── GeneralSettingsViewModel.cs │ ├── ImportModViewModel.cs │ ├── InputTextViewModel.cs │ ├── InstalledModViewModel.cs │ ├── MainWindowViewModel.cs │ ├── MegaLinkGenViewModel.cs │ ├── MessageDialogViewModel.cs │ ├── ModCreationViewModel.cs │ ├── MovieImportViewModel.cs │ ├── MyModsViewModel.cs │ ├── OpenProfileViewModel.cs │ ├── PackIroViewModel.cs │ ├── PatchIroViewModel.cs │ ├── ProgramToRunViewModel.cs │ ├── SetLanguageViewModel.cs │ ├── SubscriptionSettingViewModel.cs │ ├── ThemeSettingsViewModel.cs │ ├── UnpackIroViewModel.cs │ └── ViewModelBase.cs ├── Windows │ ├── AboutWindow.xaml │ ├── AboutWindow.xaml.cs │ ├── AllowModToRunWindow.xaml │ ├── AllowModToRunWindow.xaml.cs │ ├── CatalogCreationToolWindow.xaml │ ├── CatalogCreationToolWindow.xaml.cs │ ├── ChunkToolWindow.xaml │ ├── ChunkToolWindow.xaml.cs │ ├── ConfigureGLWindow.xaml │ ├── ConfigureGLWindow.xaml.cs │ ├── ConfigureModWindow.xaml │ ├── ConfigureModWindow.xaml.cs │ ├── ControlMappingWindow.xaml │ ├── ControlMappingWindow.xaml.cs │ ├── GameLaunchSettingsWindow.xaml │ ├── GameLaunchSettingsWindow.xaml.cs │ ├── GameLaunchWindow.xaml │ ├── GameLaunchWindow.xaml.cs │ ├── GeneralSettingsWindow.xaml │ ├── GeneralSettingsWindow.xaml.cs │ ├── ImportModWindow.xaml │ ├── ImportModWindow.xaml.cs │ ├── InputTextWindow.xaml │ ├── InputTextWindow.xaml.cs │ ├── IroCreateWindow.xaml │ ├── IroCreateWindow.xaml.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── MessageDialogWindow.xaml │ ├── MessageDialogWindow.xaml.cs │ ├── MovieImportWindow.xaml │ ├── MovieImportWindow.xaml.cs │ ├── OpenProfileWindow.xaml │ ├── OpenProfileWindow.xaml.cs │ ├── SetLanguageWindow.xaml │ ├── SetLanguageWindow.xaml.cs │ ├── ThemeSettingsWindow.xaml │ ├── ThemeSettingsWindow.xaml.cs │ ├── UnhandledErrorWindow.xaml │ └── UnhandledErrorWindow.xaml.cs ├── app.manifest └── sign.ps1 ├── TestPlugin ├── Properties │ └── AssemblyInfo.cs ├── TestPlugin.cs └── TestPlugin.csproj └── TurBoLog ├── DbMon.NET.build ├── DbMon.NET.xml ├── DebugMonitor.cs ├── Properties └── AssemblyInfo.cs ├── TurBoLog.csproj ├── UI ├── FMonitor.cs ├── FMonitor.resx ├── FPrompt.cs └── FPrompt.resx ├── app.config ├── debug.ico └── icon.svg /.ci/package.ps1: -------------------------------------------------------------------------------- 1 | mkdir ${env:buildPath}\.dist | Out-Null 2 | 3 | Set-Location ${env:buildPath}\SeventhHeavenUI\bin\Release 4 | 7z a "${env:buildPath}\.dist\${env:_RELEASE_NAME}-${env:_RELEASE_VERSION}_${env:_RELEASE_CONFIGURATION}.zip" ".\*" 5 | -------------------------------------------------------------------------------- /.ci/prepare.ps1: -------------------------------------------------------------------------------- 1 | if ($env:_BUILD_BRANCH -eq "refs/heads/master" -Or $env:_BUILD_BRANCH -eq "refs/tags/canary") { 2 | $env:_IS_BUILD_CANARY = "true" 3 | } 4 | elseif ($env:_BUILD_BRANCH -like "refs/tags/*") { 5 | $env:_BUILD_VERSION = $env:_BUILD_VERSION.Substring(0, $env:_BUILD_VERSION.LastIndexOf('.')) + ".0" 6 | } 7 | $env:_RELEASE_VERSION = "v${env:_BUILD_VERSION}" 8 | 9 | Write-Output "--------------------------------------------------" 10 | Write-Output "BUILD CONFIGURATION: $env:_RELEASE_CONFIGURATION" 11 | Write-Output "RELEASE VERSION: $env:_RELEASE_VERSION" 12 | Write-Output "--------------------------------------------------" 13 | 14 | Write-Host "##vso[task.setvariable variable=_BUILD_VERSION;]${env:_BUILD_VERSION}" 15 | Write-Host "##vso[task.setvariable variable=_RELEASE_VERSION;]${env:_RELEASE_VERSION}" 16 | Write-Host "##vso[task.setvariable variable=_IS_BUILD_CANARY;]${env:_IS_BUILD_CANARY}" 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | ** Versions ** 14 | [ ] Tested on latest stable version 15 | [ ] Pre-release only bug 16 | 17 | **To Reproduce** 18 | Steps to reproduce the behavior: 19 | 1. Go to '...' 20 | 2. Click on '....' 21 | 3. Scroll down to '....' 22 | 4. See error 23 | 24 | **Expected behavior** 25 | A clear and concise description of what you expected to happen. 26 | 27 | **Screenshots** 28 | If applicable, add screenshots to help explain your problem. 29 | 30 | **Desktop (please complete the following information):** 31 | - OS: [e.g. iOS] 32 | - Version: [e.g. 22] 33 | - Build: [e.g. 19042] 34 | 35 | **Additional context** 36 | Add any other context about the problem here. 37 | -------------------------------------------------------------------------------- /.logo/tsunamods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/.logo/tsunamods.png -------------------------------------------------------------------------------- /7thHeaven.Code/AvailableUpdate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace _7thHeaven.Code 4 | { 5 | public class AvailableUpdate 6 | { 7 | public AvailableUpdate() 8 | { 9 | Version = "0.0.0.0"; 10 | } 11 | 12 | public string Version { get; set; } 13 | 14 | public string ReleaseDate { get; set; } 15 | 16 | public string ReleaseNotes { get; set; } 17 | 18 | /// 19 | /// Link to open in browser (is not direct download) 20 | /// 21 | public string ReleaseDownloadLink { get; set; } 22 | 23 | public List PreviousVersions { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /7thHeaven.Code/ColumnSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace _7thHeaven.Code 5 | { 6 | public class ColumnSettings 7 | { 8 | public string SortColumn { get; set; } 9 | public int SortDirection { get; set; } 10 | public List MyModsColumns { get; set; } 11 | public List BrowseCatalogColumns { get; set; } 12 | 13 | public ColumnSettings() 14 | { 15 | MyModsColumns = new List(); 16 | BrowseCatalogColumns = new List(); 17 | } 18 | 19 | public static ColumnSettings GetDefaultSettings() 20 | { 21 | ColumnSettings defaults = new ColumnSettings(); 22 | 23 | defaults.MyModsColumns.Add(new ColumnInfo("Name", 0, true)); 24 | defaults.MyModsColumns.Add(new ColumnInfo("Author", 0, true)); 25 | defaults.MyModsColumns.Add(new ColumnInfo("Category", 140)); 26 | defaults.MyModsColumns.Add(new ColumnInfo("Active", 80)); 27 | 28 | defaults.BrowseCatalogColumns.Add(new ColumnInfo("Name", 0, true)); 29 | defaults.BrowseCatalogColumns.Add(new ColumnInfo("Author", 0, true)); 30 | defaults.BrowseCatalogColumns.Add(new ColumnInfo("Released", 90)); 31 | defaults.BrowseCatalogColumns.Add(new ColumnInfo("Category", 100)); 32 | defaults.BrowseCatalogColumns.Add(new ColumnInfo("Size", 60)); 33 | defaults.BrowseCatalogColumns.Add(new ColumnInfo("Inst.", 40)); 34 | 35 | return defaults; 36 | } 37 | } 38 | 39 | public class ColumnInfo 40 | { 41 | public string Name { get; set; } 42 | public double Width { get; set; } 43 | /// 44 | /// When set to true, the Width property is ignored and the column width will be calculated at run-time to auto size into remaining space 45 | /// 46 | public bool AutoResize { get; set; } 47 | 48 | public ColumnInfo() 49 | { 50 | Name = ""; 51 | Width = 0; 52 | AutoResize = false; 53 | } 54 | 55 | public ColumnInfo(string name, double width, bool resize = false) 56 | { 57 | Name = name; 58 | Width = width; 59 | AutoResize = resize; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /7thHeaven.Code/DuplicateModException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace _7thHeaven.Code 5 | { 6 | [Serializable] 7 | public class DuplicateModException : Exception 8 | { 9 | public DuplicateModException() 10 | { 11 | } 12 | 13 | public DuplicateModException(string message) : base(message) 14 | { 15 | } 16 | 17 | public DuplicateModException(string message, Exception innerException) : base(message, innerException) 18 | { 19 | } 20 | 21 | protected DuplicateModException(SerializationInfo info, StreamingContext context) : base(info, context) 22 | { 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /7thHeaven.Code/ModVersion.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | 9 | namespace Iros._7th.Workshop 10 | { 11 | public class ModVersion 12 | { 13 | public ModVersion() 14 | { 15 | // ensure lists are not null on creation 16 | PatchLinks = new List(); 17 | Links = new List(); 18 | } 19 | 20 | public int DownloadSize { get; set; } 21 | [System.Xml.Serialization.XmlElement("Link")] 22 | public List Links { get; set; } 23 | [System.Xml.Serialization.XmlElement("ApplyPatch")] 24 | public List PatchLinks { get; set; } 25 | public string ExtractSubFolder { get; set; } 26 | public string ExtractInto { get; set; } 27 | 28 | public decimal Version { get; set; } 29 | public DateTime ReleaseDate { get; set; } 30 | public GameVersions CompatibleGameVersions { get; set; } 31 | 32 | public string PreviewImage { get; set; } 33 | public string ReleaseNotes { get; set; } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /7thHeaven.Code/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System.Reflection; 7 | using System.Runtime.CompilerServices; 8 | using System.Runtime.InteropServices; 9 | 10 | // General Information about an assembly is controlled through the following 11 | // set of attributes. Change these attribute values to modify the information 12 | // associated with an assembly. 13 | [assembly: AssemblyTitle("7thHeaven.Code")] 14 | [assembly: AssemblyDescription("")] 15 | [assembly: AssemblyConfiguration("")] 16 | [assembly: AssemblyCompany("")] 17 | [assembly: AssemblyProduct("7thHeaven.Code")] 18 | [assembly: AssemblyCopyright("Tsunamods © 2021")] 19 | [assembly: AssemblyTrademark("")] 20 | [assembly: AssemblyCulture("")] 21 | 22 | // Setting ComVisible to false makes the types in this assembly not visible 23 | // to COM components. If you need to access a type in this assembly from 24 | // COM, set the ComVisible attribute to true on that type. 25 | [assembly: ComVisible(false)] 26 | 27 | // The following GUID is for the ID of the typelib if this project is exposed to COM 28 | [assembly: Guid("b89eecfe-a265-44ff-adea-d397ed008a92")] 29 | 30 | // Version information for an assembly consists of the following four values: 31 | // 32 | // Major Version 33 | // Minor Version 34 | // Build Number 35 | // Revision 36 | // 37 | // You can specify all the values or you can default the Build and Revision Numbers 38 | // by using the '*' as shown below: 39 | // [assembly: AssemblyVersion("1.0.*")] 40 | -------------------------------------------------------------------------------- /7thHeaven.Code/Resources/294.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thHeaven.Code/Resources/294.gif -------------------------------------------------------------------------------- /7thHeaven.Code/Resources/Loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thHeaven.Code/Resources/Loader.gif -------------------------------------------------------------------------------- /7thWorkshop/7H.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/7H.ico -------------------------------------------------------------------------------- /7thWorkshop/7H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/7H.png -------------------------------------------------------------------------------- /7thWorkshop/7thHeaven.var: -------------------------------------------------------------------------------- 1 | FieldID=Short:0xCC15D0 2 | PPV=Short:0xDC08DC 3 | KeyItems1=Int:0xDC091C 4 | KeyItems2=Int:0xDC0920 5 | CloudWeapon=Byte:0xDBFDA8 6 | BarretWeapon=Byte:0xDBFE2C 7 | TifaWeapon=Byte:0xDBFEB0 8 | AerisWeapon=Byte:0xDBFF34 9 | RedWeapon=Byte:0xDBFFB8 10 | YuffieWeapon=Byte:0xDC003C 11 | CaitSithWeapon=Byte:0xDC00C0 12 | VincentWeapon=Byte:0xDC0144 13 | CidWeapon=Byte:0xDC01C8 14 | KeyItem_CottonDress=Int:0xDC091C:0x1 15 | KeyItem_SatinDress=Int:0xDC091C:0x2 16 | KeyItem_SilkDress=Int:0xDC091C:0x4 17 | KeyItem_Wig=Int:0xDC091C:0x8 18 | KeyItem_DyedWig=Int:0xDC091C:0x10 19 | KeyItem_BlondeWig=Int:0xDC091C:0x20 20 | KeyItem_GlassTiara=Int:0xDC091C:0x40 21 | KeyItem_RubyTiara=Int:0xDC091C:0x80 22 | KeyItem_DiamondTiara=Int:0xDC091C:0x100 23 | KeyItem_Cologne=Int:0xDC091C:0x200 24 | KeyItem_FlowerCologne=Int:0xDC091C:0x400 25 | KeyItem_SexyCologne=Int:0xDC091C:0x800 26 | KeyItem_MembersCard=Int:0xDC091C:0x1000 27 | KeyItem_Lingerie=Int:0xDC091C:0x2000 28 | KeyItem_MysteryPanties=Int:0xDC091C:0x4000 29 | KeyItem_BikiniBriefs=Int:0xDC091C:0x8000 30 | KeyItem_PharmacyCoupons=Int:0xDC091C:0x10000 31 | KeyItem_Disinfectant=Int:0xDC091C:0x20000 32 | KeyItem_Deoderant=Int:0xDC091C:0x40000 33 | KeyItem_Digestive=Int:0xDC091C:0x80000 34 | KeyItem_HM_Condor=Int:0xDC091C:0x100000 35 | KeyItem_HM_Corel=Int:0xDC091C:0x200000 36 | KeyItem_HM_Underwater=Int:0xDC091C:0x400000 37 | KeyItem_HM_Rocket=Int:0xDC091C:0x800000 38 | KeyItem_AncientsKey=Int:0xDC091C:0x1000000 39 | KeyItem_LetterDaughter=Int:0xDC091C:0x2000000 40 | KeyItem_LetterWife=Int:0xDC091C:0x4000000 41 | KeyItem_LunarHarp=Int:0xDC091C:0x8000000 42 | KeyItem_BasementKey=Int:0xDC091C:0x10000000 43 | KeyItem_S5Key=Int:0xDC091C:0x20000000 44 | KeyItem_Keycard60=Int:0xDC091C:0x40000000 45 | KeyItem_Keycard62=Int:0xDC091C:0x80000000 46 | KeyItem_Keycard65=Int:0xDC0920:0x1 47 | KeyItem_Keycard66=Int:0xDC0920:0x2 48 | KeyItem_Keycard68=Int:0xDC0920:0x4 49 | KeyItem_MidgarPart1=Int:0xDC0920:0x8 50 | KeyItem_MidgarPart2=Int:0xDC0920:0x10 51 | KeyItem_MidgarPart3=Int:0xDC0920:0x20 52 | KeyItem_MidgarPart4=Int:0xDC0920:0x40 53 | KeyItem_MidgarPart5=Int:0xDC0920:0x80 54 | KeyItem_PHS=Int:0xDC0920:0x100 55 | KeyItem_GoldTicket=Int:0xDC0920:0x200 56 | KeyItem_Keystone=Int:0xDC0920:0x400 57 | KeyItem_LeviathanScales=Int:0xDC0920:0x800 58 | KeyItem_GlacierMap=Int:0xDC0920:0x1000 59 | KeyItem_ACoupon=Int:0xDC0920:0x2000 60 | KeyItem_BCoupon=Int:0xDC0920:0x4000 61 | KeyItem_CCoupon=Int:0xDC0920:0x8000 62 | KeyItem_BlackMateria=Int:0xDC0920:0x10000 63 | KeyItem_Mythril=Int:0xDC0920:0x20000 64 | KeyItem_Snowboard=Int:0xDC0920:0x40000 65 | PartyLeader=Byte:0xDC09E5 66 | -------------------------------------------------------------------------------- /7thWorkshop/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /7thWorkshop/CommonMark.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/CommonMark.dll -------------------------------------------------------------------------------- /7thWorkshop/Downloader.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | 11 | namespace Iros._7th.Workshop { 12 | class Downloader { 13 | } 14 | 15 | public class PendingDownload { 16 | public string Source { get; set; } 17 | public string Destination { get; set; } 18 | public long Complete { get; set; } 19 | public long Size { get; set; } 20 | public string Name { get; set; } 21 | 22 | public void Start() { 23 | //System.Net.WebClient 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /7thWorkshop/EasyHook.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/EasyHook.dll -------------------------------------------------------------------------------- /7thWorkshop/Program.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Threading; 10 | using System.Windows.Forms; 11 | 12 | namespace Iros._7th.Workshop { 13 | static class Program { 14 | /// 15 | /// The main entry point for the application. 16 | /// 17 | [STAThread] 18 | static void Main() { 19 | bool result; 20 | var mutex = new System.Threading.Mutex(true, "UniqueAppId", out result); 21 | if (!result) 22 | { 23 | MessageBox.Show("Sorry, only one instance of 7thHeaven can be run at a time! Please first close all instances of 7thHeaven if you are trying to import an IRO."); 24 | return; 25 | } 26 | Application.EnableVisualStyles(); 27 | Application.SetCompatibleTextRenderingDefault(false); 28 | Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); 29 | Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); 30 | AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); 31 | Application.Run(new fLibrary()); 32 | GC.KeepAlive(mutex); 33 | } 34 | 35 | static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { 36 | fErr.Display((Exception)e.ExceptionObject); 37 | } 38 | 39 | static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { 40 | fErr.Display(e.Exception); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /7thWorkshop/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System.Reflection; 7 | using System.Runtime.CompilerServices; 8 | using System.Runtime.InteropServices; 9 | 10 | // General Information about an assembly is controlled through the following 11 | // set of attributes. Change these attribute values to modify the information 12 | // associated with an assembly. 13 | [assembly: AssemblyTitle("7thWorkshop")] 14 | [assembly: AssemblyDescription("")] 15 | [assembly: AssemblyConfiguration("")] 16 | [assembly: AssemblyCompany("")] 17 | [assembly: AssemblyProduct("7thWorkshop")] 18 | [assembly: AssemblyCopyright("Copyright © 2019")] 19 | [assembly: AssemblyTrademark("")] 20 | [assembly: AssemblyCulture("")] 21 | 22 | // Setting ComVisible to false makes the types in this assembly not visible 23 | // to COM components. If you need to access a type in this assembly from 24 | // COM, set the ComVisible attribute to true on that type. 25 | [assembly: ComVisible(false)] 26 | 27 | // The following GUID is for the ID of the typelib if this project is exposed to COM 28 | [assembly: Guid("d20b5a11-754b-45c7-b33d-7c079a8e1f9c")] 29 | 30 | // Version information for an assembly consists of the following four values: 31 | // 32 | // Major Version 33 | // Minor Version 34 | // Build Number 35 | // Revision 36 | // 37 | // You can specify all the values or you can default the Build and Revision Numbers 38 | // by using the '*' as shown below: 39 | // [assembly: AssemblyVersion("1.0.*")] 40 | -------------------------------------------------------------------------------- /7thWorkshop/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Iros._7th.Workshop.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /7thWorkshop/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /7thWorkshop/Resources/010_LowPriority_16x16_72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/010_LowPriority_16x16_72.png -------------------------------------------------------------------------------- /7thWorkshop/Resources/010_LowPriority_16x16_72_Flip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/010_LowPriority_16x16_72_Flip.png -------------------------------------------------------------------------------- /7thWorkshop/Resources/1385_Disable_16x16_72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/1385_Disable_16x16_72.png -------------------------------------------------------------------------------- /7thWorkshop/Resources/294.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/294.gif -------------------------------------------------------------------------------- /7thWorkshop/Resources/ClosePreviewHS.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/ClosePreviewHS.bmp -------------------------------------------------------------------------------- /7thWorkshop/Resources/Critical.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/Critical.bmp -------------------------------------------------------------------------------- /7thWorkshop/Resources/Loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/Loader.gif -------------------------------------------------------------------------------- /7thWorkshop/Resources/SearchFolderHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/SearchFolderHS.png -------------------------------------------------------------------------------- /7thWorkshop/Resources/Tent_FF7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/Tent_FF7.png -------------------------------------------------------------------------------- /7thWorkshop/Resources/browse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/browse.png -------------------------------------------------------------------------------- /7thWorkshop/Resources/startwithoutdebugging_6556.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Resources/startwithoutdebugging_6556.png -------------------------------------------------------------------------------- /7thWorkshop/Transitions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/Transitions.dll -------------------------------------------------------------------------------- /7thWorkshop/cryptopp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/cryptopp.dll -------------------------------------------------------------------------------- /7thWorkshop/fConfigSettings.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.ComponentModel; 9 | using System.Data; 10 | using System.Drawing; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows.Forms; 14 | 15 | namespace Iros._7th.Workshop { 16 | public partial class fConfigSettings : Form { 17 | public fConfigSettings() { 18 | InitializeComponent(); 19 | } 20 | 21 | private ConfigSettings.Settings _settings; 22 | private ConfigSettings.ConfigSpec _spec; 23 | private string _file; 24 | 25 | public void Init(string cfgSpec, string cfgFile) { 26 | _settings = new ConfigSettings.Settings(System.IO.File.ReadAllLines(cfgFile)); 27 | _spec = Util.Deserialize(cfgSpec); 28 | _file = cfgFile; 29 | 30 | foreach (var items in _spec.Settings.GroupBy(s => s.Group)) { 31 | tcSettings.TabPages.Add(items.Key); 32 | var tc = tcSettings.TabPages[tcSettings.TabPages.Count - 1]; 33 | tcSettings.PerformLayout(); 34 | int y = 0; 35 | foreach (var setting in items) { 36 | Panel p = new Panel(); 37 | tc.Controls.Add(p); 38 | p.SetBounds(0, y, tc.ClientSize.Width, 60); 39 | p.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; 40 | setting.Load(p, _settings); 41 | y += p.Height; 42 | } 43 | } 44 | } 45 | 46 | private void bOK_Click(object sender, EventArgs e) { 47 | foreach (var item in _spec.Settings) item.Save(_settings); 48 | try { 49 | System.IO.File.WriteAllLines(_file, _settings.GetOutput()); 50 | MessageBox.Show("OpenGL settings saved."); 51 | } catch(System.UnauthorizedAccessException) { 52 | MessageBox.Show("Could not write the ff7_opengl.cfg file. Check that it is not set to read only, and that FF7 is installed in a folder you have full write access to."); 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /7thWorkshop/fErr.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.ComponentModel; 9 | using System.Data; 10 | using System.Drawing; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows.Forms; 14 | 15 | namespace Iros._7th.Workshop { 16 | public partial class fErr : Form { 17 | public fErr() { 18 | InitializeComponent(); 19 | } 20 | 21 | public static void Display(Exception ex) { 22 | foreach (Form f in Application.OpenForms) 23 | f.Hide(); 24 | fErr form = new fErr(); 25 | form.txtErr.Text = ex.ToString(); 26 | form.ShowDialog(); 27 | } 28 | 29 | private void fErr_FormClosed(object sender, FormClosedEventArgs e) { 30 | Application.Exit(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /7thWorkshop/fNewVer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.ComponentModel; 9 | using System.Data; 10 | using System.Drawing; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows.Forms; 14 | 15 | namespace Iros._7th.Workshop { 16 | public partial class fNewVer : Form { 17 | public fNewVer() { 18 | InitializeComponent(); 19 | } 20 | 21 | public void Init(decimal ver) { 22 | lNewVer.Text = "New version available: " + ver.ToString(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /7thWorkshop/fProfile.Designer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | namespace Iros._7th.Workshop 7 | { 8 | partial class fProfile 9 | { 10 | /// 11 | /// Required designer variable. 12 | /// 13 | private System.ComponentModel.IContainer components = null; 14 | 15 | /// 16 | /// Clean up any resources being used. 17 | /// 18 | /// true if managed resources should be disposed; otherwise, false. 19 | protected override void Dispose(bool disposing) 20 | { 21 | if (disposing && (components != null)) 22 | { 23 | components.Dispose(); 24 | } 25 | base.Dispose(disposing); 26 | } 27 | 28 | #region Windows Form Designer generated code 29 | 30 | /// 31 | /// Required method for Designer support - do not modify 32 | /// the contents of this method with the code editor. 33 | /// 34 | private void InitializeComponent() 35 | { 36 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fProfile)); 37 | this.SuspendLayout(); 38 | // 39 | // fProfile 40 | // 41 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 42 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 43 | this.ClientSize = new System.Drawing.Size(627, 351); 44 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 45 | this.Name = "fProfile"; 46 | this.ShowInTaskbar = false; 47 | this.Text = "Profile"; 48 | this.ResumeLayout(false); 49 | 50 | } 51 | 52 | #endregion 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /7thWorkshop/fProfile.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.IO; 8 | using System.Collections.Generic; 9 | using System.ComponentModel; 10 | using System.Data; 11 | using System.Drawing; 12 | using System.Linq; 13 | using System.Text; 14 | using System.Windows.Forms; 15 | 16 | namespace Iros._7th.Workshop { 17 | public partial class fProfile : Form { 18 | public fProfile() { 19 | //InitializeComponent(); 20 | } 21 | 22 | public static void Display(string text, string caption = null) { 23 | fReadme form = new fReadme(); 24 | //form.textBox.DocumentText = text.ToString(); 25 | if (!String.IsNullOrWhiteSpace(caption)) form.Text = caption; 26 | form.ShowDialog(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /7thWorkshop/fProfiles.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.ComponentModel; 9 | using System.Data; 10 | using System.Drawing; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows.Forms; 14 | 15 | namespace Iros._7th.Workshop { 16 | public partial class fProfiles : Form { 17 | public fProfiles() { 18 | InitializeComponent(); 19 | } 20 | 21 | public string SelectedProfile { get { return lbProfiles.SelectedItem as string; } } 22 | 23 | private void deleteToolStripMenuItem_Click(object sender, EventArgs e) { 24 | if (lbProfiles.SelectedIndex >= 0) { 25 | string file = System.IO.Path.Combine(Sys.SysFolder, "profiles", lbProfiles.SelectedItem.ToString()) + ".xml"; 26 | System.IO.File.Delete(file); 27 | lbProfiles.Items.RemoveAt(lbProfiles.SelectedIndex); 28 | } 29 | } 30 | 31 | private void copyToolStripMenuItem_Click(object sender, EventArgs e) { 32 | if (lbProfiles.SelectedIndex >= 0) { 33 | string file = System.IO.Path.Combine(Sys.SysFolder, "profiles", lbProfiles.SelectedItem.ToString()) + ".xml"; 34 | string name = Microsoft.VisualBasic.Interaction.InputBox("Profile name:", "Enter new Profile name", "New Profile"); 35 | System.IO.File.Copy(file, System.IO.Path.Combine(Sys.SysFolder, "profiles", name) + ".xml"); 36 | lbProfiles.Items.Add(name); 37 | } 38 | } 39 | 40 | private void fProfiles_Load(object sender, EventArgs e) { 41 | foreach (string file in System.IO.Directory.GetFiles(System.IO.Path.Combine(Sys.SysFolder, "profiles"), "*.xml")) { 42 | lbProfiles.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file)); 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /7thWorkshop/fReadme.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.IO; 8 | using System.Collections.Generic; 9 | using System.ComponentModel; 10 | using System.Data; 11 | using System.Drawing; 12 | using System.Linq; 13 | using System.Text; 14 | using System.Windows.Forms; 15 | using System.Diagnostics; 16 | 17 | namespace Iros._7th.Workshop { 18 | public partial class fReadme : Form { 19 | public fReadme() { 20 | InitializeComponent(); 21 | } 22 | 23 | public static void Display(string text, string caption = null) { 24 | fReadme form = new fReadme(); 25 | form.webBrowser1.DocumentText = text.ToString(); 26 | if (!String.IsNullOrWhiteSpace(caption)) form.Text = caption; 27 | form.ShowDialog(); 28 | } 29 | public void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) 30 | { 31 | if (e.Url.ToString() != "about:blank") 32 | { 33 | //cancel the current event 34 | e.Cancel = true; 35 | 36 | //this opens the URL in the user's default browser 37 | Process.Start(e.Url.ToString()); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /7thWorkshop/fTextEdit.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.ComponentModel; 9 | using System.Data; 10 | using System.Drawing; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows.Forms; 14 | 15 | namespace Iros._7th.Workshop { 16 | public partial class fTextEdit : Form { 17 | public fTextEdit() { 18 | InitializeComponent(); 19 | } 20 | 21 | public static bool Edit(string caption, ref string text) { 22 | fTextEdit t = new fTextEdit() { Text = caption }; 23 | t.txtText.Text = text; 24 | if (t.ShowDialog() == DialogResult.OK) { 25 | text = t.txtText.Text; 26 | return true; 27 | } 28 | return false; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /7thWorkshop/mega.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/7thWorkshop/mega.dll -------------------------------------------------------------------------------- /7thWorkshop/pMessage.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.ComponentModel; 9 | using System.Drawing; 10 | using System.Data; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows.Forms; 14 | 15 | namespace Iros._7th.Workshop { 16 | partial class pMessage : UserControl { 17 | public event EventHandler Close; 18 | 19 | public pMessage() { 20 | InitializeComponent(); 21 | } 22 | 23 | public void Init(WMessage msg, int width) { 24 | label1.Text = msg.Text; 25 | if (!String.IsNullOrWhiteSpace(msg.Link)) { 26 | label1.Font = new System.Drawing.Font(label1.Font, FontStyle.Underline); 27 | label1.ForeColor = Color.Blue; 28 | label1.Tag = msg.Link; 29 | label1.Cursor = Cursors.Hand; 30 | } 31 | this.Width = width; 32 | using (var g = Graphics.FromHwnd(label1.Handle)) { 33 | var size = g.MeasureString(label1.Text, label1.Font, label1.ClientSize.Width, StringFormat.GenericDefault); 34 | this.Height = Math.Max((int)(size.Height + label1.Padding.Vertical), bClose.Height + bClose.Margin.Vertical) + 1 + this.Padding.Vertical; 35 | } 36 | } 37 | 38 | private void bClose_Click(object sender, EventArgs e) { 39 | Close(this, e); 40 | } 41 | 42 | private void label1_Click(object sender, EventArgs e) { 43 | if (label1.Tag != null) { 44 | string link = label1.Tag.ToString(); 45 | if (!String.IsNullOrEmpty(link)) Sys.TriggerLink(link); 46 | /* 47 | if (link.StartsWith("iros://", StringComparison.InvariantCultureIgnoreCase)) 48 | Sys.TriggerGotoMod(Guid.Parse(link.Substring(7))); 49 | else 50 | System.Diagnostics.Process.Start(link); 51 | */ 52 | } 53 | } 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /7thWorkshop/pTags.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.ComponentModel; 9 | using System.Drawing; 10 | using System.Data; 11 | using System.Linq; 12 | using System.Text; 13 | using System.Windows.Forms; 14 | 15 | namespace Iros._7th.Workshop { 16 | public partial class pTags : UserControl { 17 | 18 | public event EventHandler SelectionChanged; 19 | 20 | private HashSet _selected; 21 | 22 | public IEnumerable Selected { get { return _selected; } } 23 | 24 | public void Init() { 25 | if (Sys.Catalog == null) return; 26 | clTags.Items.Clear(); 27 | foreach (string tag in Sys.Catalog.Mods.SelectMany(m => m.Tags).Concat(Sys.Library.Items.SelectMany(i => i.CachedDetails.Tags)).Distinct(StringComparer.InvariantCultureIgnoreCase)) 28 | clTags.Items.Add(tag); 29 | _selected = new HashSet(StringComparer.InvariantCultureIgnoreCase); 30 | } 31 | 32 | public pTags() { 33 | InitializeComponent(); 34 | Init(); 35 | } 36 | 37 | private void bClear_Click(object sender, EventArgs e) { 38 | for (int i = 0; i < clTags.Items.Count; i++) 39 | clTags.SetItemChecked(i, false); 40 | SelectionChanged(this, EventArgs.Empty); 41 | } 42 | 43 | private void clTags_ItemCheck(object sender, ItemCheckEventArgs e) { 44 | if (e.NewValue == CheckState.Checked) 45 | _selected.Add((string)clTags.Items[e.Index]); 46 | else 47 | _selected.Remove((string)clTags.Items[e.Index]); 48 | SelectionChanged(this, EventArgs.Empty); 49 | } 50 | 51 | private void bAll_Click(object sender, EventArgs e) { 52 | for (int i = 0; i < clTags.Items.Count; i++) 53 | clTags.SetItemChecked(i, true); 54 | SelectionChanged(this, EventArgs.Empty); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /7thWrapperLib/7HPlugin.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Windows.Forms; 8 | 9 | namespace Iros._7th.Workshop 10 | { 11 | public abstract class _7HPlugin { 12 | public abstract void Start(_7thWrapperLib.RuntimeMod mod); 13 | public abstract void Stop(); 14 | } 15 | 16 | /// 17 | /// Class to implement IWin32Window interface so WPF Window handle can be used as an Owner handle for Winform plugins 18 | /// 19 | /// 20 | /// reference: https://stackoverflow.com/questions/7822164/winform-dialog-with-wpf-window-as-parent 21 | /// 22 | public class Wpf32Window : IWin32Window 23 | { 24 | public IntPtr Handle { get; private set; } 25 | 26 | public Wpf32Window(IntPtr wpfHandle) 27 | { 28 | Handle = wpfHandle; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /7thWrapperLib/Bytes.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | 11 | namespace _7thWrapperLib { 12 | static class Bytes { 13 | public static void WriteInt(byte[] data, int offset, int value) { 14 | data[offset + 0] = (byte)(value & 0xff); 15 | data[offset + 1] = (byte)((value >> 8) & 0xff); 16 | data[offset + 2] = (byte)((value >> 16) & 0xff); 17 | data[offset + 3] = (byte)((value >> 24) & 0xff); 18 | } 19 | public static void WriteUInt(byte[] data, int offset, uint value) { 20 | data[offset + 0] = (byte)(value & 0xff); 21 | data[offset + 1] = (byte)((value >> 8) & 0xff); 22 | data[offset + 2] = (byte)((value >> 16) & 0xff); 23 | data[offset + 3] = (byte)((value >> 24) & 0xff); 24 | } 25 | public static void WriteUShort(byte[] data, int offset, ushort value) { 26 | data[offset + 0] = (byte)(value & 0xff); 27 | data[offset + 1] = (byte)((value >> 8) & 0xff); 28 | } 29 | public static long ReadLong(this System.IO.Stream s) { 30 | byte[] data = new byte[8]; 31 | s.Read(data, 0, 8); 32 | return BitConverter.ToInt64(data, 0); 33 | } 34 | public static int ReadInt(this System.IO.Stream s) { 35 | byte[] data = new byte[4]; 36 | s.Read(data, 0, 4); 37 | return BitConverter.ToInt32(data, 0); 38 | } 39 | public static ushort ReadUShort(this System.IO.Stream s) { 40 | byte[] data = new byte[2]; 41 | s.Read(data, 0, 2); 42 | return BitConverter.ToUInt16(data, 0); 43 | } 44 | 45 | public static void WriteInt(this System.IO.Stream s, int i) { 46 | var data = BitConverter.GetBytes(i); 47 | s.Write(data, 0, 4); 48 | } 49 | public static void WriteLong(this System.IO.Stream s, long L) { 50 | var data = BitConverter.GetBytes(L); 51 | s.Write(data, 0, 8); 52 | } 53 | public static void WriteUInt(this System.IO.Stream s, uint i) { 54 | var data = BitConverter.GetBytes(i); 55 | s.Write(data, 0, 4); 56 | } 57 | public static void WriteUShort(this System.IO.Stream s, ushort us) { 58 | var data = BitConverter.GetBytes(us); 59 | s.Write(data, 0, 2); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /7thWrapperLib/DebugLogger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace _7thWrapperLib 9 | { 10 | public static class DebugLogger 11 | { 12 | private static object _fileLock = new object(); 13 | 14 | public static bool IsLogging { get; set; } 15 | 16 | public static bool IsDetailedLogging { get; set; } 17 | 18 | public static string PathToLogFile { get; set; } 19 | 20 | private static StreamWriter LogFile { get; set; } 21 | 22 | public static void Init(string path) 23 | { 24 | PathToLogFile = path; 25 | IsLogging = !string.IsNullOrEmpty(path); 26 | 27 | CloseLogFile(); // make sure existing log file is closed before initializing new streamwriter 28 | if (IsLogging) 29 | { 30 | LogFile = File.AppendText(path); 31 | } 32 | } 33 | 34 | public static void CloseLogFile() 35 | { 36 | try 37 | { 38 | if (LogFile != null) 39 | { 40 | LogFile.Close(); 41 | } 42 | 43 | LogFile = null; 44 | } 45 | catch (Exception) 46 | { 47 | } 48 | } 49 | 50 | public static void WriteLine(string message) 51 | { 52 | try 53 | { 54 | #if DEBUG 55 | System.Diagnostics.Debug.WriteLine(message); // always print message to debug console if compiled for debugging 56 | #endif 57 | 58 | if (!IsLogging || string.IsNullOrEmpty(PathToLogFile) || LogFile == null) 59 | { 60 | return; 61 | } 62 | 63 | lock (_fileLock) 64 | { 65 | LogFile.WriteLine(message); 66 | } 67 | } 68 | catch (Exception) 69 | { 70 | } 71 | } 72 | 73 | public static void DetailedWriteLine(string message) 74 | { 75 | if (!IsDetailedLogging) 76 | { 77 | return; 78 | } 79 | 80 | WriteLine(message); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /7thWrapperLib/FieldFile.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | 11 | namespace _7thWrapperLib { 12 | public static class FieldFile { 13 | 14 | public static List Unchunk(byte[] input) { 15 | var ms = new System.IO.MemoryStream(); 16 | var min = new System.IO.MemoryStream(input); 17 | min.Position = 4; 18 | Lzs.Decode(min, ms); 19 | DebugLogger.WriteLine($"FF:Unchunk:LZS expanded {input.Length} bytes to {ms.Length} bytes"); 20 | byte[] scratch = new byte[4]; 21 | ms.Position = 2; 22 | ms.Read(scratch, 0, 4); 23 | int numsection = BitConverter.ToInt32(scratch, 0); 24 | DebugLogger.WriteLine($"FF:Unchunk:{numsection} sections"); 25 | List sections = new List(); 26 | foreach (int i in Enumerable.Range(0, numsection)) { 27 | ms.Position = 6 + i * 4; 28 | ms.Read(scratch, 0, 4); 29 | ms.Position = BitConverter.ToInt32(scratch, 0); 30 | ms.Read(scratch, 0, 4); 31 | int len = BitConverter.ToInt32(scratch, 0); 32 | byte[] s = new byte[len]; 33 | ms.Read(s, 0, len); 34 | sections.Add(s); 35 | } 36 | return sections; 37 | } 38 | 39 | public static byte[] Chunk(List input) { 40 | var ms = new System.IO.MemoryStream(); 41 | byte[] scratch = new byte[4]; 42 | ms.Write(scratch, 0, 2); 43 | ms.Write(BitConverter.GetBytes(input.Count), 0, 4); 44 | int offset = 0x2A; 45 | foreach (var s in input) { 46 | Bytes.WriteInt(ms, offset); 47 | offset += 4; 48 | offset += s.Length; 49 | } 50 | foreach (var s in input) { 51 | Bytes.WriteInt(ms, s.Length); 52 | ms.Write(s, 0, s.Length); 53 | } 54 | ms.Position = 0; 55 | var compress = new System.IO.MemoryStream(); 56 | Lzs.Encode(ms, compress); 57 | byte[] data = new byte[compress.Length + 4]; 58 | compress.Position = 0; 59 | compress.Read(data, 4, (int)compress.Length); 60 | Bytes.WriteInt(data, 0, (int)compress.Length); 61 | return data; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /7thWrapperLib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System.Reflection; 7 | using System.Runtime.CompilerServices; 8 | using System.Runtime.InteropServices; 9 | 10 | // General Information about an assembly is controlled through the following 11 | // set of attributes. Change these attribute values to modify the information 12 | // associated with an assembly. 13 | [assembly: AssemblyTitle("7thWrapperLib")] 14 | [assembly: AssemblyDescription("")] 15 | [assembly: AssemblyConfiguration("")] 16 | [assembly: AssemblyCompany("")] 17 | [assembly: AssemblyProduct("7thWrapperLib")] 18 | [assembly: AssemblyCopyright("Tsunamods © 2021")] 19 | [assembly: AssemblyTrademark("")] 20 | [assembly: AssemblyCulture("")] 21 | 22 | // Setting ComVisible to false makes the types in this assembly not visible 23 | // to COM components. If you need to access a type in this assembly from 24 | // COM, set the ComVisible attribute to true on that type. 25 | [assembly: ComVisible(false)] 26 | 27 | // The following GUID is for the ID of the typelib if this project is exposed to COM 28 | [assembly: Guid("243e30d2-cd6a-424b-bd58-5356dfbe0e12")] 29 | 30 | // Version information for an assembly consists of the following four values: 31 | // 32 | // Major Version 33 | // Minor Version 34 | // Build Number 35 | // Revision 36 | // 37 | // You can specify all the values or you can default the Build and Revision Numbers 38 | // by using the '*' as shown below: 39 | // [assembly: AssemblyVersion("1.0.*")] 40 | -------------------------------------------------------------------------------- /7thWrapperLib/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace _7thWrapperLib.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /7thWrapperLib/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /7thWrapperLib/Util.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | 11 | namespace Iros._7th { 12 | public static class Util { 13 | public static T Deserialize(System.IO.Stream s) { 14 | var ser = new System.Xml.Serialization.XmlSerializer(typeof(T)); 15 | return (T)ser.Deserialize(s); 16 | } 17 | public static T Deserialize(string file) { 18 | using (var fs = new System.IO.FileStream(file, System.IO.FileMode.Open, System.IO.FileAccess.Read)) 19 | { 20 | return Deserialize(fs); 21 | } 22 | } 23 | public static T DeserializeString(string data) { 24 | var ser = new System.Xml.Serialization.XmlSerializer(typeof(T)); 25 | return (T)ser.Deserialize(new System.IO.StringReader(data)); 26 | } 27 | 28 | public static void SerializeBinary(object o, System.IO.Stream s) { 29 | System.Runtime.Serialization.Formatters.Binary.BinaryFormatter fmt = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); 30 | fmt.Serialize(s, o); 31 | } 32 | 33 | public static T DeserializeBinary(System.IO.Stream s) { 34 | System.Runtime.Serialization.Formatters.Binary.BinaryFormatter fmt = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); 35 | return (T)fmt.Deserialize(s); 36 | } 37 | 38 | public static string Serialize(object o) { 39 | var ser = new System.Xml.Serialization.XmlSerializer(o.GetType()); 40 | var sw = new System.IO.StringWriter(); 41 | ser.Serialize(sw, o); 42 | return sw.ToString(); 43 | } 44 | public static void Serialize(object o, System.IO.Stream s) { 45 | var ser = new System.Xml.Serialization.XmlSerializer(o.GetType()); 46 | ser.Serialize(s, o); 47 | } 48 | } 49 | 50 | public static class XmlUtil { 51 | public static string NodeTextS(this System.Xml.XmlNode node) { 52 | return node == null ? String.Empty : node.InnerText; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /7thWrapperLib/VStreamFile.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | 11 | namespace _7thWrapperLib { 12 | class VStreamFile { 13 | private byte[] _source; 14 | private long _position; 15 | 16 | public VStreamFile(byte[] source) { 17 | _source = source; 18 | } 19 | 20 | public long SetPosition(long pos, Wrap.EMoveMethod type) { 21 | switch (type) { 22 | case Wrap.EMoveMethod.Begin: 23 | _position = pos; 24 | break; 25 | case Wrap.EMoveMethod.Current: 26 | _position += pos; 27 | break; 28 | case Wrap.EMoveMethod.End: 29 | _position = _source.Length + pos; 30 | break; 31 | } 32 | //DebugLogger.DetailedWriteLine("Moving VStream position to {_position}"); 33 | return _position; 34 | } 35 | 36 | public int Read(IntPtr buffer, uint toRead, ref uint read) { 37 | int willRead = Math.Min((int)toRead, _source.Length - (int)_position); 38 | if (willRead == 0) { 39 | read = 0; return 1; 40 | } 41 | System.Runtime.InteropServices.Marshal.Copy(_source, (int)_position, buffer, willRead); 42 | _position += willRead; 43 | //DebugLogger.DetailedWriteLine("VStream reading {willRead} bytes, new position {_position}"); 44 | read = (uint)willRead; 45 | return 1; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /7thWrapperLib/Win32.cs: -------------------------------------------------------------------------------- 1 | /* 2 | This source is subject to the Microsoft Public License. See LICENSE.TXT for details. 3 | The original developer is Iros 4 | */ 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Runtime.InteropServices; 10 | using System.Text; 11 | 12 | namespace _7thWrapperLib { 13 | static class Win32 { 14 | [DllImport("kernel32.dll", SetLastError = true)] 15 | [return: MarshalAs(UnmanagedType.Bool)] 16 | internal static extern bool DuplicateHandle(IntPtr hSourceProcessHandle, 17 | IntPtr hSourceHandle, IntPtr hTargetProcessHandle, out IntPtr lpTargetHandle, 18 | uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, uint dwOptions); 19 | [DllImport("kernel32.dll")] 20 | internal static extern IntPtr GetCurrentProcess(); 21 | 22 | 23 | internal struct OVERLAPPED { 24 | public UIntPtr Internal; 25 | public UIntPtr InternalHigh; 26 | public uint Offset; 27 | public uint OffsetHigh; 28 | public IntPtr EventHandle; 29 | } 30 | 31 | [DllImport("kernel32.dll", SetLastError = true)] 32 | static internal extern unsafe int ReadFile(IntPtr handle, IntPtr bytes, uint numBytesToRead, ref uint numBytesRead, IntPtr overlapped); 33 | [DllImport("kernel32.dll", SetLastError = true)] 34 | static internal extern unsafe int ReadFile(IntPtr handle, IntPtr bytes, uint numBytesToRead, ref uint numBytesRead, ref OVERLAPPED overlapped); 35 | [DllImport("kernel32.dll", SetLastError = true)] 36 | [return: MarshalAs(UnmanagedType.Bool)] 37 | static internal extern bool WriteFile(IntPtr hFile, IntPtr lpBuffer, uint nNumberOfBytesToWrite, 38 | out uint lpNumberOfBytesWritten, [In] ref System.Threading.NativeOverlapped lpOverlapped); 39 | [DllImport("kernel32.dll", SetLastError = true)] 40 | [return: MarshalAs(UnmanagedType.Bool)] 41 | static internal extern bool CloseHandle(IntPtr hObject); 42 | [UnmanagedFunctionPointer(CallingConvention.StdCall, CharSet = CharSet.Unicode)] 43 | internal delegate void ReadFileCompletionDelegate(int dwErrorCode, int dwNumBytesTransferred, ref OVERLAPPED lpOverlapped); 44 | 45 | [DllImport("kernel32.dll")] 46 | static extern bool ReadFileEx(IntPtr hFile, [Out] byte[] lpBuffer, 47 | uint nNumberOfBytesToRead, [In] ref System.Threading.NativeOverlapped lpOverlapped, 48 | ReadFileCompletionDelegate lpCompletionRoutine); 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /Installer/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Installer/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Installer/Assets/7H.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/Installer/Assets/7H.ico -------------------------------------------------------------------------------- /Installer/Assets/7thheaven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/Installer/Assets/7thheaven.png -------------------------------------------------------------------------------- /Installer/Classes/EmbeddedZip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Installer.Classes 9 | { 10 | public static class EmbeddedZip 11 | { 12 | public static string tempPath 13 | { 14 | get 15 | { 16 | return Environment.GetEnvironmentVariable("TEMP") + "\\"; 17 | } 18 | } 19 | /// 20 | /// Extracts the contents of a zip file to the 21 | /// Temp Folder 22 | /// 23 | public static void ExtractZip(string resName, string extractTo) 24 | { 25 | try 26 | { 27 | //write the resource zip file to the temp directory 28 | using (Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Installer.Resources." + resName + ".zip")) 29 | { 30 | using (FileStream bw = new FileStream(extractTo, FileMode.Create)) 31 | { 32 | //read until we reach the end of the file 33 | while (stream.Position < stream.Length) 34 | { 35 | //byte array to hold file bytes 36 | byte[] bits = new byte[stream.Length]; 37 | //read in the bytes 38 | stream.Read(bits, 0, (int)stream.Length); 39 | //write out the bytes 40 | bw.Write(bits, 0, (int)stream.Length); 41 | } 42 | } 43 | stream.Close(); 44 | } 45 | 46 | } 47 | catch (Exception e) 48 | { 49 | //handle the error 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Installer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("7th Heaven Installer")] 11 | [assembly: AssemblyDescription("Installed 7th heaven and FFNx Drivers")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Tsunamods")] 14 | [assembly: AssemblyProduct("Installer")] 15 | [assembly: AssemblyCopyright("Copyright © 2021")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("2.3.3.0")] 55 | [assembly: AssemblyFileVersion("2.3.3.0")] 56 | -------------------------------------------------------------------------------- /Installer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Installer.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Installer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Installer/Resources/7thHeaven.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/Installer/Resources/7thHeaven.zip -------------------------------------------------------------------------------- /Installer/Resources/FFNx.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TurBoss/7h/d92e0d906b1cc954fe24aeccac5e9c71b473355d/Installer/Resources/FFNx.zip -------------------------------------------------------------------------------- /Installer/Uninstall.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 |