├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ ├── betarelease.yml │ └── release.yml ├── .gitignore ├── .idea └── .gitignore ├── App ├── App.config └── smxdasm.dll ├── Deploy ├── AssemblyInfo_Template.cs ├── Compress_Beta.ps1 ├── Compress_Stable.ps1 ├── DotNetChecker.nsh ├── FileAssociation.nsh ├── GPLv3.txt ├── SPCode_Beta.nsi ├── SPCode_Stable.nsi ├── SpcodeUpdater │ ├── App.config │ ├── FodyWeavers.xml │ ├── FodyWeavers.xsd │ ├── Icon.ico │ ├── Program.cs │ ├── Properties │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── Res │ │ ├── Icon.ico │ │ └── IconPng.png │ ├── Resources │ │ └── iconRes.bmp │ ├── SpcodeUpdater.csproj │ ├── SpeditUpdater.sln │ ├── UpdateMarquee.Designer.cs │ ├── UpdateMarquee.af-ZA.resx │ ├── UpdateMarquee.cs │ ├── UpdateMarquee.resx │ └── packages.config ├── envsubst.exe ├── icon_beta.ico ├── icon_stable.ico ├── nsis-plugins │ └── DotNetChecker.dll ├── postbuild.bat └── prebuild.bat ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── GPLv3.txt ├── Interop ├── ConfigControl.cs ├── HotkeyControl.cs ├── LoggingControl.cs ├── OptionsControl.cs ├── PipeInteropClient.cs ├── PipeInteropServer.cs ├── TranslationProvider.cs └── Updater │ ├── UpdateCheck.cs │ ├── UpdateInfo.cs │ ├── UpdateWindow.xaml │ └── UpdateWindow.xaml.cs ├── Program.cs ├── Properties ├── Resources.Designer.cs └── Resources.resx ├── README.md ├── Resources ├── AboutImages │ ├── AdoptOpenJDK.jpg │ ├── AvalonDock.png │ ├── IconMonstr.png │ ├── MahAppsMetro.png │ ├── SharpDevelop.png │ ├── alliedmodders.png │ ├── license.png │ ├── peace-maker.jpg │ ├── smlib.png │ └── sourcemod.png ├── Icons │ ├── IconTemplates │ │ ├── Icon.ico │ │ ├── Icon256x.png │ │ ├── Icon_Beta.ico │ │ └── icon256xbeta.png │ ├── empty-box.png │ ├── icon-add.png │ ├── icon-collapse.png │ ├── icon-duplicate.png │ ├── icon-error.png │ ├── icon-expand.png │ ├── icon-folder.png │ ├── icon-gear.png │ ├── icon-include.png │ ├── icon-pawn.png │ ├── icon-plugin.png │ ├── icon-reload.png │ ├── icon-smx.png │ ├── icon-trash.png │ ├── icon-txt.png │ └── icon-warning.png ├── License.txt ├── Misc │ ├── Configurations │ │ ├── Configs.xml │ │ └── sm_1_10_0_6509 │ │ │ ├── include │ │ │ ├── admin.inc │ │ │ ├── adminmenu.inc │ │ │ ├── adt.inc │ │ │ ├── adt_array.inc │ │ │ ├── adt_stack.inc │ │ │ ├── adt_trie.inc │ │ │ ├── banning.inc │ │ │ ├── basecomm.inc │ │ │ ├── bitbuffer.inc │ │ │ ├── clientprefs.inc │ │ │ ├── clients.inc │ │ │ ├── commandfilters.inc │ │ │ ├── commandline.inc │ │ │ ├── console.inc │ │ │ ├── convars.inc │ │ │ ├── core.inc │ │ │ ├── cstrike.inc │ │ │ ├── datapack.inc │ │ │ ├── dbi.inc │ │ │ ├── entity.inc │ │ │ ├── entity_prop_stocks.inc │ │ │ ├── events.inc │ │ │ ├── files.inc │ │ │ ├── float.inc │ │ │ ├── functions.inc │ │ │ ├── geoip.inc │ │ │ ├── halflife.inc │ │ │ ├── handles.inc │ │ │ ├── helpers.inc │ │ │ ├── keyvalues.inc │ │ │ ├── lang.inc │ │ │ ├── logging.inc │ │ │ ├── mapchooser.inc │ │ │ ├── menus.inc │ │ │ ├── nextmap.inc │ │ │ ├── profiler.inc │ │ │ ├── protobuf.inc │ │ │ ├── regex.inc │ │ │ ├── sdkhooks.inc │ │ │ ├── sdktools.inc │ │ │ ├── sdktools_client.inc │ │ │ ├── sdktools_engine.inc │ │ │ ├── sdktools_entinput.inc │ │ │ ├── sdktools_entoutput.inc │ │ │ ├── sdktools_functions.inc │ │ │ ├── sdktools_gamerules.inc │ │ │ ├── sdktools_hooks.inc │ │ │ ├── sdktools_sound.inc │ │ │ ├── sdktools_stocks.inc │ │ │ ├── sdktools_stringtables.inc │ │ │ ├── sdktools_tempents.inc │ │ │ ├── sdktools_tempents_stocks.inc │ │ │ ├── sdktools_trace.inc │ │ │ ├── sdktools_variant_t.inc │ │ │ ├── sdktools_voice.inc │ │ │ ├── sorting.inc │ │ │ ├── sourcemod.inc │ │ │ ├── string.inc │ │ │ ├── testing.inc │ │ │ ├── textparse.inc │ │ │ ├── tf2.inc │ │ │ ├── tf2_stocks.inc │ │ │ ├── timers.inc │ │ │ ├── topmenus.inc │ │ │ ├── usermessages.inc │ │ │ ├── vector.inc │ │ │ ├── version.inc │ │ │ └── version_auto.inc │ │ │ └── spcomp.exe │ ├── Icon.pdn │ ├── Lysis │ │ ├── IKVM.OpenJDK.Core.dll │ │ ├── IKVM.OpenJDK.Util.dll │ │ ├── IKVM.Runtime.dll │ │ ├── LysisDecompiler.exe │ │ └── lysis-java.dll │ └── Templates │ │ ├── ExtensionIncludeTemplate.inc │ │ ├── IncludeTemplate.inc │ │ ├── NativeIncludeTemplate.inc │ │ ├── OldSyntaxTemplate_CSGO.sp │ │ ├── OldSyntaxTemplate_CSS.sp │ │ ├── OldSyntaxTemplate_Generic.sp │ │ ├── OldSyntaxTemplate_TF2.sp │ │ ├── Template_CSGO.sp │ │ ├── Template_CSS.sp │ │ ├── Template_Generic.sp │ │ ├── Template_TF2.sp │ │ └── Templates.xml └── icon256xbeta.ico ├── SourcepawnCondenser ├── CondenserTest │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── CondenserTest.csproj │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ └── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings ├── SourcepawnCondenser.sln └── SourcepawnCondenser │ ├── App.config │ ├── Condenser.cs │ ├── CondenserFunctions │ ├── SMClasslike.cs │ ├── SMConstantConsumer.cs │ ├── SMEnumConsumer.cs │ ├── SMEnumStructConsumer.cs │ ├── SMFunctionConsumer.cs │ ├── SMMethodmapConsumer.cs │ ├── SMPPDirectiveConsumer.cs │ ├── SMStructConsumer.cs │ ├── SMTypedefConsumer.cs │ └── SMVariableConsumer.cs │ ├── SourcemodDefinition │ ├── SMBaseDefinition.cs │ ├── SMConstant.cs │ ├── SMDefine.cs │ ├── SMDefinition.cs │ ├── SMEnum.cs │ ├── SMEnumStruct.cs │ ├── SMFunction.cs │ ├── SMMethodmap.cs │ ├── SMStruct.cs │ ├── SMTypedef.cs │ └── SMVariable.cs │ ├── SourcepawnCondenser.csproj │ ├── SourcepawnCondenser.csproj.DotSettings │ └── Tokenizer │ ├── Token.cs │ ├── TokenKind.cs │ └── Tokenizer.cs ├── Spcode.csproj ├── Spcode.sln ├── Spcode.sln.DotSettings ├── UI ├── Components │ ├── ColorChangeControl │ │ ├── ColorChangeControl.xaml │ │ └── ColorChangeControl.xaml.cs │ ├── DASMElement │ │ ├── DASMElement.xaml │ │ ├── DASMElement.xaml.cs │ │ └── DASMElementHighlighter.cs │ ├── EditorElement │ │ ├── EditorElement.xaml │ │ ├── EditorElement.xaml.cs │ │ ├── EditorElementBracketHighlighter.cs │ │ ├── EditorElementGoToDefinition.cs │ │ ├── EditorElementHighlighter.cs │ │ ├── EditorElementIntellisenseController.cs │ │ ├── Foldings │ │ │ └── EditorFoldingStrategy.cs │ │ ├── Highlighting │ │ │ ├── BracketHighlightHelpers.cs │ │ │ ├── BracketSearchResult.cs │ │ │ ├── ColorizeSection.cs │ │ │ └── SPBracketSearcher.cs │ │ └── Indentation │ │ │ └── EditorIndentation.cs │ └── HotkeyEditorControl │ │ ├── HotkeyEditorControl.xaml │ │ └── HotkeyEditorControl.xaml.cs ├── Interop │ ├── LanguageChooserWindow.xaml │ └── LanguageChooserWindow.xaml.cs ├── MainWindow │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── MainWindowCommands.cs │ ├── MainWindowConfigHandler.cs │ ├── MainWindowErrorResultGrid.cs │ ├── MainWindowErrorStatus.cs │ ├── MainWindowInputHandler.cs │ ├── MainWindowLogBox.cs │ ├── MainWindowMenuHandler.cs │ ├── MainWindowObjectBrowser.cs │ ├── MainWindowSPCompiler.cs │ ├── MainWindowServerQuery.cs │ └── MainWindowTranslations.cs ├── STheme │ ├── Brushes.xaml │ ├── Images │ │ ├── DockAnchorableBottom.png │ │ ├── DockAnchorableLeft.png │ │ ├── DockAnchorableRight.png │ │ ├── DockAnchorableTop.png │ │ ├── DockDocumentAsAnchorableBottom.png │ │ ├── DockDocumentAsAnchorableLeft.png │ │ ├── DockDocumentAsAnchorableRight.png │ │ ├── DockDocumentAsAnchorableTop.png │ │ ├── DockDocumentBottom.png │ │ ├── DockDocumentInside.png │ │ ├── DockDocumentLeft.png │ │ ├── DockDocumentRight.png │ │ ├── DockDocumentTop.png │ │ ├── DockPaneEmpty.png │ │ ├── DockPaneLargeEmpty.png │ │ ├── HTabGroup.png │ │ ├── Locked.png │ │ ├── PinAutoHide.png │ │ ├── PinAutoHide_Black.png │ │ ├── PinAutoHide_Dark.png │ │ ├── PinClose.png │ │ ├── PinClose_Black.png │ │ ├── PinClose_Dark.png │ │ ├── PinDocMenu.png │ │ ├── PinDocMenu_Black.png │ │ ├── PinMaximize.png │ │ ├── PinMaximize_Black.png │ │ ├── PinMaximize_Dark.png │ │ ├── PinMenu.png │ │ ├── PinMenu_Black.png │ │ ├── PinMenu_Dark.png │ │ ├── PinRestore.png │ │ ├── PinRestore_Black.png │ │ ├── PinRestore_Dark.png │ │ └── VTabGroup.png │ ├── SMetroTheme.cs │ └── STheme.xaml └── Windows │ ├── AboutWindow.xaml │ ├── AboutWindow.xaml.cs │ ├── ConfigWindow.xaml │ ├── ConfigWindow.xaml.cs │ ├── ConfigWindow │ └── ConfigWindowConfigsManager.cs │ ├── GoToLineWindow.xaml │ ├── GoToLineWindow.xaml.cs │ ├── NewFileWindow.xaml │ ├── NewFileWindow.xaml.cs │ ├── OptionsWindow.xaml │ ├── OptionsWindow.xaml.cs │ ├── OptionsWindow │ ├── OptionsWindowHighlighting.cs │ ├── OptionsWindowHotkeys.cs │ └── OptionsWindowOptionsManager.cs │ ├── RenameWindow.xaml │ ├── RenameWindow.xaml.cs │ ├── SPDefinitionWindow.xaml │ ├── SPDefinitionWindow.xaml.cs │ ├── SearchWindow.xaml │ └── SearchWindow.xaml.cs ├── Utils ├── Constants.cs ├── DecompileUtil.cs ├── DirHelper.cs ├── HotkeyUtils.cs ├── ManagedAES.cs ├── Models │ ├── ComboboxItem.cs │ ├── Config.cs │ ├── ErrorDataGridRow.cs │ ├── FTP.cs │ ├── Hotkey.cs │ ├── HotkeyInfo.cs │ └── TemplateInfo.cs ├── NamesHelper.cs ├── ObjectBrowserUtils.cs ├── PathsHelper.cs ├── RegexKeywordsHelper.cs ├── SPSyntaxTidy │ ├── SPSyntaxTidy.cs │ └── SPTokenizer.cs └── VersionHelper.cs ├── ValveQuery └── ValveQuery.dll └── app.config /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | 19 | # Language override for sourcemod files 20 | *.sp -linguist-detectable 21 | *.smx -linguist-detectable 22 | *.inc -linguist-detectable 23 | *.cpp -linguist-detectable 24 | *.dll -linguist-detectable 25 | *.nsi -linguist-detectable 26 | *.nsh -linguist-detectable 27 | *.ps1 -linguist-detectable 28 | *.bat -linguist-detectable 29 | Deploy/ -linguist-vendored 30 | -------------------------------------------------------------------------------- /.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 | Thank you for reporting a bug to help improve SPCode. Before issuing, please keep in mind the following recommendations: 11 | - Make sure you're on the latest version 12 | - Make sure your issue is reproducible in a clear manner so we can identify it and tackle it down quicker 13 | 14 | If you don't think you've followed the steps above, please think twice before issuing. Thank you! 15 | 16 | **Describe the bug** 17 | A clear and concise description of what the bug is. 18 | 19 | **To Reproduce** 20 | Steps to reproduce the behavior: 21 | 1. Go to '...' 22 | 2. Click on '....' 23 | 3. Scroll down to '....' 24 | 4. See error 25 | 26 | **Screenshots** 27 | If applicable, add screenshots to help explain your problem. 28 | -------------------------------------------------------------------------------- /.github/workflows/betarelease.yml: -------------------------------------------------------------------------------- 1 | name: Publish Beta Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - development 7 | 8 | jobs: 9 | 10 | # Build and release 11 | build: 12 | 13 | runs-on: windows-latest 14 | steps: 15 | 16 | # Checkout the repository 17 | - name: Checkout 18 | uses: actions/checkout@v2 19 | with: 20 | fetch-depth: 0 21 | 22 | # Fetch latest tag and rev number 23 | - name: Get tag and rev number 24 | id: get-tag-rev 25 | run: | 26 | echo "::set-output name=TAG::$(git describe --match "[0-9].[0-9].[0-9].[0-9]" --tags --abbrev=0)" 27 | echo "::set-output name=REV::$(git rev-list HEAD --count)" 28 | 29 | # Install the .NET Core workload 30 | - name: Install .NET Core 31 | uses: actions/setup-dotnet@v1 32 | with: 33 | dotnet-version: 6.0.100 34 | 35 | # Nuget 36 | - name: Restore NuGet packages 37 | uses: nuget/setup-nuget@v1 38 | with: 39 | nuget-version: '5.x' 40 | - run: nuget restore Spcode.sln 41 | 42 | # Setup MSBuild 43 | - name: Setup MSBuild 44 | uses: microsoft/setup-msbuild@v1.1 45 | 46 | # Build SPCode 47 | - name: Build SPCode 48 | run: msbuild Spcode.csproj /p:Configuration=Release-Beta /p:langversion=latest 49 | 50 | # Build Installer 51 | - name: Build Installer (NSIS) 52 | uses: joncloud/makensis-action@v1 53 | with: 54 | script-file: .\bin\Release-Beta\SPCode.nsi 55 | 56 | # Compress Beta Portable Version 57 | - name: Compress Portable Version 58 | run: .\bin\Release-Beta\Compress.ps1 59 | shell: powershell 60 | 61 | # Build Updater 62 | - name: Build Updater 63 | run: msbuild Deploy\SPCodeUpdater\SPCodeUpdater.csproj /p:Configuration=Release-Beta /p:langversion=latest 64 | 65 | # Create Release 66 | - name: Create Release 67 | id: create_release 68 | uses: actions/create-release@v1 69 | env: 70 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 71 | with: 72 | tag_name: ${{ steps.get-tag-rev.outputs.TAG }}.beta${{ steps.get-tag-rev.outputs.REV }} 73 | release_name: Release ${{ steps.get-tag-rev.outputs.TAG }}.beta${{ steps.get-tag-rev.outputs.REV }} 74 | draft: false 75 | prerelease: true 76 | 77 | # Upload Installer 78 | - name: Upload Installer 79 | id: upload-installer 80 | uses: actions/upload-release-asset@v1 81 | env: 82 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 83 | with: 84 | upload_url: ${{ steps.create_release.outputs.upload_url }} 85 | asset_path: .\bin\Release-Beta\SPCode.Beta.Installer.exe 86 | asset_name: SPCode.Beta.Installer.exe 87 | asset_content_type: application/octet-stream 88 | 89 | # Upload Portable 90 | - name: Upload Portable 91 | id: upload-portable 92 | uses: actions/upload-release-asset@v1 93 | env: 94 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 95 | with: 96 | upload_url: ${{ steps.create_release.outputs.upload_url }} 97 | asset_path: .\bin\Release-Beta\SPCode.Beta.Portable.zip 98 | asset_name: SPCode.Beta.Portable.zip 99 | asset_content_type: application/zip 100 | 101 | # Upload Updater 102 | - name: Upload Updater 103 | id: upload-updater 104 | uses: actions/upload-release-asset@v1 105 | env: 106 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 107 | with: 108 | upload_url: ${{ steps.create_release.outputs.upload_url }} 109 | asset_path: .\Deploy\SpcodeUpdater\bin\Release-Beta\SPCodeUpdater.exe 110 | asset_name: SPCodeUpdater.exe 111 | asset_content_type: application/octet-stream 112 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Publish Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | 10 | # Build and release 11 | build: 12 | 13 | runs-on: windows-latest 14 | steps: 15 | 16 | # Checkout the repository 17 | - name: Checkout 18 | uses: actions/checkout@v2 19 | with: 20 | fetch-depth: 0 21 | 22 | # Fetch latest tag 23 | - name: Get tag 24 | id: get-tag 25 | run: | 26 | echo "::set-output name=TAG::$(git describe --match "[0-9].[0-9].[0-9].[0-9]" --tags --abbrev=0)" 27 | 28 | # Install the .NET Core workload 29 | - name: Install .NET Core 30 | uses: actions/setup-dotnet@v1 31 | with: 32 | dotnet-version: 6.0.100 33 | 34 | # Nuget 35 | - name: Restore NuGet packages 36 | uses: nuget/setup-nuget@v1 37 | with: 38 | nuget-version: '5.x' 39 | - run: nuget restore Spcode.sln 40 | 41 | # Setup MSBuild 42 | - name: Setup MSBuild.exe 43 | uses: microsoft/setup-msbuild@v1.1 44 | 45 | # Build SPCode 46 | - name: Build SPCode 47 | run: msbuild Spcode.csproj /p:Configuration=Release /p:langversion=latest 48 | 49 | # Build Installer 50 | - name: Build Installer (NSIS) 51 | uses: joncloud/makensis-action@v1 52 | with: 53 | script-file: .\bin\Release\SPCode.nsi 54 | 55 | # Compress Portable Version 56 | - name: Compress Portable Version 57 | run: .\bin\Release\Compress.ps1 58 | shell: powershell 59 | 60 | # Build Updater 61 | - name: Build Updater 62 | run: msbuild Deploy\SPCodeUpdater\SPCodeUpdater.csproj /p:Configuration=Release /property:langversion=latest 63 | 64 | - name: Create Release 65 | id: create_release 66 | uses: actions/create-release@v1 67 | env: 68 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 69 | with: 70 | tag_name: ${{ steps.get-tag.outputs.TAG }} 71 | release_name: Release ${{ steps.get-tag.outputs.TAG }} 72 | draft: false 73 | prerelease: false 74 | 75 | 76 | - name: Upload Installer 77 | id: upload-installer 78 | uses: actions/upload-release-asset@v1 79 | env: 80 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 81 | with: 82 | upload_url: ${{ steps.create_release.outputs.upload_url }} 83 | asset_path: .\bin\Release\SPCode.Installer.exe 84 | asset_name: SPCode.Installer.exe 85 | asset_content_type: application/octet-stream 86 | 87 | - name: Upload Portable 88 | id: upload-portable 89 | uses: actions/upload-release-asset@v1 90 | env: 91 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 92 | with: 93 | upload_url: ${{ steps.create_release.outputs.upload_url }} 94 | asset_path: .\bin\Release\SPCode.Portable.zip 95 | asset_name: SPCode.Portable.zip 96 | asset_content_type: application/zip 97 | 98 | - name: Upload Updater 99 | id: upload-updater 100 | uses: actions/upload-release-asset@v1 101 | env: 102 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 103 | with: 104 | upload_url: ${{ steps.create_release.outputs.upload_url }} 105 | asset_path: .\Deploy\SpcodeUpdater\bin\Release\SPCodeUpdater.exe 106 | asset_name: SPCodeUpdater.exe 107 | asset_content_type: application/octet-stream 108 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/.idea/.gitignore -------------------------------------------------------------------------------- /App/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /App/smxdasm.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/App/smxdasm.dll -------------------------------------------------------------------------------- /Deploy/AssemblyInfo_Template.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("${PROGRAMNAME}")] 6 | [assembly: AssemblyDescription("SPCode - A lightweight SourcePawn editor")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("SPCode Organization")] 9 | [assembly: AssemblyProduct("${PROGRAMNAME}")] 10 | [assembly: AssemblyCopyright("Copyright © Julien Kluge 2015")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: NeutralResourcesLanguage("en-US")] 14 | [assembly: ComVisible(false)] 15 | [assembly: Guid("11db2f22-8d7c-4a10-a940-b103e4e3bdf2")] 16 | 17 | [assembly: AssemblyVersion("${TAG}")] 18 | [assembly: AssemblyInformationalVersion("${TAG}.beta${REV}")] -------------------------------------------------------------------------------- /Deploy/Compress_Beta.ps1: -------------------------------------------------------------------------------- 1 | $loc = Get-Location 2 | Set-Location 'bin\Release-Beta\' 3 | $compress = @{ 4 | LiteralPath= 5 | "sourcepawn/", 6 | "lysis/", 7 | "SPCode.exe", 8 | "GPLv3.txt", 9 | "License.txt" 10 | DestinationPath = "SPCode.Beta.Portable.zip" 11 | 12 | } 13 | Compress-Archive -Force @compress 14 | Set-Location $loc -------------------------------------------------------------------------------- /Deploy/Compress_Stable.ps1: -------------------------------------------------------------------------------- 1 | $loc = Get-Location 2 | Set-Location 'bin\Release\' 3 | $compress = @{ 4 | LiteralPath= 5 | "sourcepawn/", 6 | "lysis/", 7 | "SPCode.exe", 8 | "GPLv3.txt", 9 | "License.txt" 10 | DestinationPath = "SPCode.Portable.zip" 11 | 12 | } 13 | Compress-Archive -Force @compress 14 | Set-Location $loc -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/Deploy/SpcodeUpdater/Icon.ico -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Este código fue generado por una herramienta. 4 | // Versión de runtime:4.0.30319.42000 5 | // 6 | // Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si 7 | // se vuelve a generar el código. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SpcodeUpdater.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc. 17 | /// 18 | // StronglyTypedResourceBuilder generó automáticamente esta clase 19 | // a través de una herramienta como ResGen o Visual Studio. 20 | // Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen 21 | // con la opción /str o recompile su proyecto de VS. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SpcodeUpdater.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las 51 | /// búsquedas de recursos mediante esta clase de recurso fuertemente tipado. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Busca un recurso adaptado de tipo System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap IconPng { 67 | get { 68 | object obj = ResourceManager.GetObject("IconPng", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/Res/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/Deploy/SpcodeUpdater/Res/Icon.ico -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/Res/IconPng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/Deploy/SpcodeUpdater/Res/IconPng.png -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/Resources/iconRes.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/Deploy/SpcodeUpdater/Resources/iconRes.bmp -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/SpeditUpdater.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2013 for Windows Desktop 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeditUpdater", "SpeditUpdater.csproj", "{402651FB-269B-4858-8D2A-6DF7E0B9A36E}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {402651FB-269B-4858-8D2A-6DF7E0B9A36E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {402651FB-269B-4858-8D2A-6DF7E0B9A36E}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {402651FB-269B-4858-8D2A-6DF7E0B9A36E}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {402651FB-269B-4858-8D2A-6DF7E0B9A36E}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/UpdateMarquee.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SPCodeUpdater 2 | { 3 | partial class UpdateMarquee 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateMarquee)); 32 | this.progressBar1 = new System.Windows.Forms.ProgressBar(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.SuspendLayout(); 35 | // 36 | // progressBar1 37 | // 38 | this.progressBar1.ForeColor = System.Drawing.Color.DarkRed; 39 | resources.ApplyResources(this.progressBar1, "progressBar1"); 40 | this.progressBar1.MarqueeAnimationSpeed = 10; 41 | this.progressBar1.Name = "progressBar1"; 42 | this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee; 43 | this.progressBar1.UseWaitCursor = true; 44 | // 45 | // label1 46 | // 47 | resources.ApplyResources(this.label1, "label1"); 48 | this.label1.ForeColor = System.Drawing.Color.Black; 49 | this.label1.Name = "label1"; 50 | this.label1.UseWaitCursor = true; 51 | // 52 | // UpdateMarquee 53 | // 54 | resources.ApplyResources(this, "$this"); 55 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 56 | this.BackColor = System.Drawing.Color.White; 57 | this.Controls.Add(this.label1); 58 | this.Controls.Add(this.progressBar1); 59 | this.ForeColor = System.Drawing.Color.White; 60 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 61 | this.MaximizeBox = false; 62 | this.MinimizeBox = false; 63 | this.Name = "UpdateMarquee"; 64 | this.ShowIcon = false; 65 | this.ShowInTaskbar = false; 66 | this.UseWaitCursor = true; 67 | this.ResumeLayout(false); 68 | this.PerformLayout(); 69 | 70 | } 71 | private System.Windows.Forms.Label label1; 72 | private System.Windows.Forms.ProgressBar progressBar1; 73 | 74 | #endregion 75 | } 76 | } -------------------------------------------------------------------------------- /Deploy/SpcodeUpdater/UpdateMarquee.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace SPCodeUpdater 4 | { 5 | public partial class UpdateMarquee : Form 6 | { 7 | public UpdateMarquee() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Deploy/envsubst.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/Deploy/envsubst.exe -------------------------------------------------------------------------------- /Deploy/icon_beta.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/Deploy/icon_beta.ico -------------------------------------------------------------------------------- /Deploy/icon_stable.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/Deploy/icon_stable.ico -------------------------------------------------------------------------------- /Deploy/nsis-plugins/DotNetChecker.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SPCodeOrg/SPCode/a4fcb3df669ac96538b88cd7908e6c3d89294bd9/Deploy/nsis-plugins/DotNetChecker.dll -------------------------------------------------------------------------------- /Deploy/postbuild.bat: -------------------------------------------------------------------------------- 1 | md ".\sourcepawn" 2 | md ".\sourcepawn\templates" 3 | md ".\sourcepawn\configs" 4 | md ".\sourcepawn\temp" 5 | md ".\sourcepawn\errorfiles" 6 | md ".\nsis-plugins" 7 | md ".\lysis" 8 | C:\Windows\system32\xcopy ".\..\..\Resources\Misc\Templates\*.*" ".\sourcepawn\templates\*.*" /e /y /q 9 | C:\Windows\system32\xcopy ".\..\..\Resources\Misc\Configurations" ".\sourcepawn\configs" /e /y /q /d 10 | C:\Windows\system32\xcopy ".\..\..\Resources\Misc\Lysis\*.*" ".\lysis" /e /y /q 11 | copy ".\..\..\Resources\Translations\lang_0_spcode.xml" ".\lang_0_spcode.xml" /y 12 | copy ".\..\..\Resources\License.txt" ".\License.txt" /y 13 | copy ".\..\..\Deploy\DotNetChecker.nsh" ".\DotNetChecker.nsh" /y 14 | copy ".\..\..\Deploy\FileAssociation.nsh" ".\FileAssociation.nsh" /y 15 | copy ".\..\..\Deploy\GPLv3.txt" ".\GPLv3.txt" /y 16 | copy ".\..\..\Deploy\nsis-plugins\DotNetChecker.dll" ".\nsis-plugins\DotNetChecker.dll" /y 17 | 18 | set beta=0 19 | 20 | if "%1"=="Debug-Beta" set beta=1 21 | if "%1"=="Release-Beta" set beta=1 22 | 23 | if %beta%==1 ( 24 | copy ".\..\..\Deploy\SPCode_Beta.nsi" ".\SPCode.nsi" /y 25 | copy ".\..\..\Deploy\Compress_Beta.ps1" ".\Compress.ps1" /y 26 | copy ".\..\..\Deploy\icon_beta.ico" ".\icon.ico" /y 27 | 28 | ) else ( 29 | copy ".\..\..\Deploy\SPCode_Stable.nsi" ".\SPCode.nsi" /y 30 | copy ".\..\..\Deploy\Compress_Stable.ps1" ".\Compress.ps1" /y 31 | copy ".\..\..\Deploy\icon_stable.ico" ".\icon.ico" /y 32 | ) 33 | 34 | exit 0 -------------------------------------------------------------------------------- /Deploy/prebuild.bat: -------------------------------------------------------------------------------- 1 | REM // set beta status 2 | set beta=0 3 | if "%1"=="Debug-Beta" set beta=1 4 | if "%1"=="Release-Beta" set beta=1 5 | 6 | REM // fetch git count for beta rev 7 | for /f "tokens=*" %%A in ('git rev-list HEAD --count') do set "REV=%%A" 8 | 9 | REM // fetch latest tag 10 | for /f "tokens=*" %%B in ('git describe --match "[0-9].[0-9].[0-9].[0-9]" --tags --abbrev^=0') do set "TAG=%%B" 11 | 12 | REM // set program name 13 | set PROGRAMNAME=SPCode 14 | if "%1"=="Debug-Beta" set PROGRAMNAME=SPCode Beta 15 | if "%1"=="Release-Beta" set PROGRAMNAME=SPCode Beta 16 | 17 | REM // make assemblyinfo and installer from template 18 | envsubst -i AssemblyInfo_Template.cs -o ..\App\AssemblyInfo.cs 19 | 20 | REM // copy corresponding icons for version 21 | if %beta%==1 ( 22 | copy "..\Resources\Icons\IconTemplates\Icon_Beta.ico" "..\Resources\Icons\Icon.ico" /y 23 | copy "..\Resources\Icons\IconTemplates\icon256xbeta.png" "..\Resources\Icons\icon256x.png" /y 24 | ) else ( 25 | copy "..\Resources\Icons\IconTemplates\Icon.ico" "..\Resources\Icons\Icon.ico" /y 26 | copy "..\Resources\Icons\IconTemplates\icon256x.png" "..\Resources\Icons\icon256x.png" /y 27 | ) 28 | 29 | exit 0 -------------------------------------------------------------------------------- /FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /Interop/LoggingControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Controls; 3 | 4 | namespace SPCode.Interop 5 | { 6 | public static class LoggingControl 7 | { 8 | public static TextBox LogBox; 9 | public static void LogAction(string message, int newLines = 1) 10 | { 11 | try 12 | { 13 | LogBox.Text += $"[{DateTime.Now:HH:mm:ss}] {message} {new string('\n', newLines)}"; 14 | LogBox.CaretIndex = LogBox.Text.Length; 15 | LogBox.ScrollToEnd(); 16 | } 17 | catch (Exception) 18 | { 19 | 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Interop/PipeInteropClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.IO.Pipes; 4 | using System.Text; 5 | using SPCode.Utils; 6 | 7 | namespace SPCode.Interop 8 | { 9 | public static class PipeInteropClient 10 | { 11 | public static void ConnectToMasterPipeAndSendData(string data) 12 | { 13 | var stringData = Encoding.UTF8.GetBytes(data); 14 | var stringLength = stringData.Length; 15 | var array = new byte[sizeof(int) + stringLength]; 16 | using (var stream = new MemoryStream(array)) 17 | { 18 | var stringLengthData = BitConverter.GetBytes(stringLength); 19 | stream.Write(stringLengthData, 0, stringLengthData.Length); 20 | stream.Write(stringData, 0, stringData.Length); 21 | } 22 | using var pipeClient = new NamedPipeClientStream(".", NamesHelper.PipeServerName, PipeDirection.Out, PipeOptions.Asynchronous); 23 | pipeClient.Connect(5000); 24 | pipeClient.Write(array, 0, array.Length); 25 | pipeClient.Flush(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Interop/PipeInteropServer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO.Pipes; 3 | using System.Text; 4 | using SPCode.UI; 5 | using SPCode.Utils; 6 | 7 | namespace SPCode.Interop 8 | { 9 | public class PipeInteropServer : IDisposable 10 | { 11 | private NamedPipeServerStream pipeServer; 12 | private readonly MainWindow _window; 13 | 14 | public PipeInteropServer(MainWindow window) 15 | { 16 | _window = window; 17 | } 18 | 19 | public void Start() 20 | { 21 | StartInteropServer(); 22 | } 23 | 24 | public void Close() 25 | { 26 | pipeServer.Close(); 27 | } 28 | 29 | public void Dispose() 30 | { 31 | pipeServer.Close(); 32 | } 33 | 34 | private void StartInteropServer() 35 | { 36 | if (pipeServer != null) 37 | { 38 | pipeServer.Close(); 39 | pipeServer = null; 40 | } 41 | pipeServer = new NamedPipeServerStream(NamesHelper.PipeServerName, PipeDirection.In, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous); 42 | pipeServer.BeginWaitForConnection(new AsyncCallback(PipeConnection_MessageIn), null); 43 | } 44 | 45 | private void PipeConnection_MessageIn(IAsyncResult iar) 46 | { 47 | pipeServer.EndWaitForConnection(iar); 48 | var byteBuffer = new byte[4]; 49 | pipeServer.Read(byteBuffer, 0, sizeof(int)); 50 | var length = BitConverter.ToInt32(byteBuffer, 0); 51 | byteBuffer = new byte[length]; 52 | pipeServer.Read(byteBuffer, 0, length); 53 | var data = Encoding.UTF8.GetString(byteBuffer); 54 | var files = data.Split('|'); 55 | var SelectIt = true; 56 | for (var i = 0; i < files.Length; ++i) 57 | { 58 | _window.Dispatcher.Invoke(() => 59 | { 60 | if (_window.IsLoaded) 61 | { 62 | if (_window.TryLoadSourceFile(files[i], out _, SelectMe: SelectIt) && _window.WindowState == System.Windows.WindowState.Minimized) 63 | { 64 | _window.WindowState = System.Windows.WindowState.Normal; 65 | SelectIt = false; 66 | } 67 | } 68 | }); 69 | } 70 | StartInteropServer(); 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /Interop/Updater/UpdateInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Octokit; 4 | 5 | namespace SPCode.Interop.Updater 6 | { 7 | public class UpdateInfo 8 | { 9 | public string ExceptionMessage = string.Empty; 10 | public bool GotException = false; 11 | public bool IsAvailable = false; 12 | public List AllReleases; 13 | public bool SkipDialog = false; 14 | public bool WriteAble = true; 15 | public ReleaseAsset Updater => AllReleases[0].Assets.FirstOrDefault(e => e.Name == "SPCodeUpdater.exe"); 16 | public ReleaseAsset Portable => AllReleases[0].Assets.FirstOrDefault(e => e.Name.Contains("Portable")); 17 | } 18 | } -------------------------------------------------------------------------------- /Interop/Updater/UpdateWindow.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |