From 6207a7d9a668f72a5e99ddf1e860f24e6916bded Mon Sep 17 00:00:00 2001 From: oOKexOo Date: Sun, 17 Jun 2018 13:27:29 +0200 Subject: [PATCH 1/8] move priv key folder to Achilles and ignore it --- .gitignore | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 01d45a51..01417d73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,10 @@ +@AresModAchillesExpansion/keys/private @Release/* -Tools/AchillesTestServer.bat *.bikey *.biprivatekey *.pbo *.bisign *.lnk .vscode/ - .idea -/*.iml *.ini -Tools/AddonBuilder/config.ini From dcfe4a389735fd3ca3492e81711a079a809c4349 Mon Sep 17 00:00:00 2001 From: oOKexOo Date: Sun, 17 Jun 2018 19:47:12 +0200 Subject: [PATCH 2/8] Reorganize Tools --- .travis.yml | 4 +- Tools/AddonBuilder.bat | 84 ------------------- .../GitBash.md} | 0 Tools/{ => cheatsheets}/util_command_lines.sh | 0 Tools/find_unsafe_rc.sh | 18 ---- Tools/{ => fixes}/SqfVisibilityFixer.groovy | 0 .../{ => fixes}/edit_custom_module_script.py | 2 +- Tools/fixes/list_unsafe_remote_exec.log | 1 + Tools/fixes/list_unsafe_remote_exec.sh | 15 ++++ Tools/git-bash.bat | 15 ---- Tools/markdown_changeLog_to_steam.py | 72 ---------------- Tools/markdown_test.txt | 11 --- Tools/markdown_test_steam.txt | 11 --- Tools/{ => travis}/config_style_checker.py | 0 Tools/{ => travis}/sqf_validator.py | 0 Tools/unsafe_rc.log | 0 ...teList.sh => updateRemoteExecWhiteList.sh} | 2 +- 17 files changed, 20 insertions(+), 215 deletions(-) delete mode 100644 Tools/AddonBuilder.bat rename Tools/{CheatSheet_GitBash.md => cheatsheets/GitBash.md} (100%) rename Tools/{ => cheatsheets}/util_command_lines.sh (100%) delete mode 100644 Tools/find_unsafe_rc.sh rename Tools/{ => fixes}/SqfVisibilityFixer.groovy (100%) rename Tools/{ => fixes}/edit_custom_module_script.py (98%) create mode 100644 Tools/fixes/list_unsafe_remote_exec.log create mode 100644 Tools/fixes/list_unsafe_remote_exec.sh delete mode 100644 Tools/git-bash.bat delete mode 100644 Tools/markdown_changeLog_to_steam.py delete mode 100644 Tools/markdown_test.txt delete mode 100644 Tools/markdown_test_steam.txt rename Tools/{ => travis}/config_style_checker.py (100%) rename Tools/{ => travis}/sqf_validator.py (100%) delete mode 100644 Tools/unsafe_rc.log rename Tools/{getRemoteExecWhiteList.sh => updateRemoteExecWhiteList.sh} (97%) diff --git a/.travis.yml b/.travis.yml index 6f0d5c8b..03562df8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ python: before_script: - pip3 install sqflint script: - - python3 Tools/sqf_validator.py - - python3 Tools/config_style_checker.py + - python3 Tools/travis/sqf_validator.py + - python3 Tools/travis/config_style_checker.py - sqflint -d @AresModAchillesExpansion/addons notifications: email: false diff --git a/Tools/AddonBuilder.bat b/Tools/AddonBuilder.bat deleted file mode 100644 index 299ae159..00000000 --- a/Tools/AddonBuilder.bat +++ /dev/null @@ -1,84 +0,0 @@ -@echo off -set startDir=%cd% - -REM /******************************************************************************/ -REM Addon Builder script for windows (by Kex) -REM /******************************************************************************/ -REM -REM Packs all folders in sourceDir and creates corresponding *.pbo in targetDir. -REM The script is parallelized and will create a window for each source folder. -REM -REM Arguments: -REM 1) (optional) version for bikey e.g. "0.0.1" ("dev" by default) -REM -REM Returns: -REM nothing (procedure) -REM -REM Examples: -REM 1) AddonBuilder.bat 0.0.1 -REM 2) AddonBuilder.bat -REM -REM /******************************************************************************/ - -REM optional argument: version of bikey: _.biprivatekey -set keyVersion=%1 - -REM Path for the folder where the source folders are located -set sourceDir=E:\Programme\GitHub\AresModAchillesExpansion\@AresModAchillesExpansion\addons -REM Path for the folder where the *.pbo's shall be moved -set targetDir=E:\Programme\GitHub\AresModAchillesExpansion\@AresModAchillesExpansion\addons -REM Prefix: you can access your addon files via \\\ -REM Prefix: if projPrefix is "" then \\ -set projPrefix=achilles -REM Prefix for your bikey: _.biprivatekey -set privKeyPrefix=achilles -REM Default version (if you don't specify the version as an argument): _dev.biprivatekey -set keyVersionDefault=dev -REM Folder where the biprivatekey is located -set privKeyDir=E:\Programme\Games\Steam\steamapps\common\Arma 3 Tools\DSSignFile\privateKeys -REM Temporary folder -set tmpDir=C:\Users\%username%\AppData\Local\Temp - -REM biprivatekey file name -if "%keyVersion%"=="" ( - set privKey=%privKeyPrefix%_%keyVersionDefault%.biprivatekey -) else ( - set privKey=%privKeyPrefix%_%keyVersion%.biprivatekey -) - -REM Check if given folders and biprivateky exist -if not exist "%privKeyDir%\%privKey%" ( - call:PERROR "Did not found %privKey% in %privKeyDir%!" - goto EOS -) -if not exist "%sourceDir%" ( - call:PERROR "%sourceDir% does not exist!" - goto EOS -) -if not exist "%targetDir%" ( - call:PERROR "%targetDir% does not exist!" - goto EOS -) -if not exist "%tmpDir%" ( - call:PERROR "%tmpDir% does not exist!" - goto EOS -) - -cd /d %sourceDir% -for /d %%D in (*) do ( - REM start "AddonBuilder: %%D" cmd /c "AddonBuilder "%sourceDir%\%%D" "%targetDir%" -packonly -temp="%tmpDir%" -sign="%privKeyDir%\%privKey%" -prefix="%projPrefix%\%%D" -binarizeFullLogs & echo. & pause" - start "AddonBuilder: %%D" cmd /c "AddonBuilder "%sourceDir%\%%D" "%targetDir%" -packonly -temp="%tmpDir%" -sign="%privKeyDir%\%privKey%" -prefix="%projPrefix%\%%D" -binarizeFullLogs" -) - -goto EOS - -:PERROR -echo. -%Windir%\System32\WindowsPowerShell\v1.0\Powershell.exe write-host -foregroundcolor Red "ERROR: %1" -echo. -pause -GOTO:EOF - -:EOS -cd /d %startDir% -@echo on diff --git a/Tools/CheatSheet_GitBash.md b/Tools/cheatsheets/GitBash.md similarity index 100% rename from Tools/CheatSheet_GitBash.md rename to Tools/cheatsheets/GitBash.md diff --git a/Tools/util_command_lines.sh b/Tools/cheatsheets/util_command_lines.sh similarity index 100% rename from Tools/util_command_lines.sh rename to Tools/cheatsheets/util_command_lines.sh diff --git a/Tools/find_unsafe_rc.sh b/Tools/find_unsafe_rc.sh deleted file mode 100644 index 8e1120d9..00000000 --- a/Tools/find_unsafe_rc.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -#makes sure that cygwin commands are used on windows -if [[ "$(uname -s)" == "CYGWIN"* ]]; then - PATH=/usr/bin:$PATH -fi - -> unsafe_rc.log - -cd "../@AresModAchillesExpansion/addons" -script_list=$(find . -type f -name "*.sqf") -for script in $script_list; do - echo Searching in $script... - keywords=($(grep remoteExec $script | grep -o -P "(?i)remoteExec(\s*|Call\s*)\[\s*[\"\']?(bis_fnc_call|bis_fnc_spawn|call|spawn)[\"\']?\s*,")) - if [[ ${#keywords[@]} -gt 0 ]]; then - printf "$script\r\n" >> ../../tools/unsafe_rc.log - fi -done diff --git a/Tools/SqfVisibilityFixer.groovy b/Tools/fixes/SqfVisibilityFixer.groovy similarity index 100% rename from Tools/SqfVisibilityFixer.groovy rename to Tools/fixes/SqfVisibilityFixer.groovy diff --git a/Tools/edit_custom_module_script.py b/Tools/fixes/edit_custom_module_script.py similarity index 98% rename from Tools/edit_custom_module_script.py rename to Tools/fixes/edit_custom_module_script.py index 16461efa..d89b2a3b 100644 --- a/Tools/edit_custom_module_script.py +++ b/Tools/fixes/edit_custom_module_script.py @@ -27,4 +27,4 @@ to_find = 'ares_zeusExtensions\\Ares' substitute = 'achilles\modules_f_ares' fnc_replace(file_path,to_find,substitute) -input('Done') \ No newline at end of file +input('Done') diff --git a/Tools/fixes/list_unsafe_remote_exec.log b/Tools/fixes/list_unsafe_remote_exec.log new file mode 100644 index 00000000..e5675fa4 --- /dev/null +++ b/Tools/fixes/list_unsafe_remote_exec.log @@ -0,0 +1 @@ +./functions_f_ares/features/fn_TeleportPlayers.sqf diff --git a/Tools/fixes/list_unsafe_remote_exec.sh b/Tools/fixes/list_unsafe_remote_exec.sh new file mode 100644 index 00000000..a48f4c0a --- /dev/null +++ b/Tools/fixes/list_unsafe_remote_exec.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +> list_unsafe_remote_exec.log +logFolder="$PWD" + +cd "../../@AresModAchillesExpansion/addons" +script_list=$(find . -type f -name "*.sqf" -printf '%p;') +IFS=$';' +for script in $script_list; do + echo Searching in $script... + keywords=($(grep remoteExec "$script" | grep -o -P "(?i)remoteExec(\s*|Call\s*)\[\s*[\"\']?(bis_fnc_call|bis_fnc_spawn|call|spawn)[\"\']?\s*,")) + if [[ ${#keywords[@]} -gt 0 ]]; then + printf "$script\r\n" >> "$logFolder/list_unsafe_remote_exec.log" + fi +done diff --git a/Tools/git-bash.bat b/Tools/git-bash.bat deleted file mode 100644 index 498c3df3..00000000 --- a/Tools/git-bash.bat +++ /dev/null @@ -1,15 +0,0 @@ -@ECHO OFF -WHICH git-bash.exe > NUL -IF %ERRORLEVEL% NEQ 0 ( - ECHO Error: git-bash.exe not found! - PAUSE - GOTO :EOF -) - -WHICH tmux.exe > NUL -IF %ERRORLEVEL% NEQ 1 ( - start "" git-bash.exe -c "tmux new-session \"bash -c 'cd ../@AresModAchillesExpansion/addons;$SHELL'\"\; split-window -v -t 0 \"bash -c 'cd ../@AresModAchillesExpansion/addons;$SHELL'\"\; split-window -v -t 1" -) else ( - start "" git-bash.exe -c "bash -c 'cd ../@AresModAchillesExpansion/addons;$SHELL'" -) -@ECHO ON diff --git a/Tools/markdown_changeLog_to_steam.py b/Tools/markdown_changeLog_to_steam.py deleted file mode 100644 index 10f452d7..00000000 --- a/Tools/markdown_changeLog_to_steam.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python3 - -''' -AUTHOR: Kex -DATE: 7/16/17 -VERSION: AMAE002 -DESCRIPTION: Converts given *.txt with markdown syntax to steam syntax - -ARGUMENTS: 1) *.txt file - -RETURNS: nothing - -EXAMPLE: python markdown_changeLog_to_steam.py markdown_test.txt -''' - -from __future__ import print_function -from sys import argv, exit -from os.path import basename -from time import sleep - -def get_and_check_file(extension): - ''' - function get and check file - - This function reads the passed file and checkes if it is valid or not - - input: extension (str) the valid file extension - output: file_path and file_name (str) if valid - ''' - extension_length = len(extension) - try: - # get arguments - file, file_path = argv - if file_path[1] == "'": - file_path = file_path[1:-1] - except ValueError: - print('\nMissing a valid file as argument! Drag and drop a *.{} file on {}! \n\n'.format(extension,basename(__file__))) - input('Close program with ENTER...') - exit() - file_name = basename(file_path) - if file_name[-extension_length:] != extension: - print('\nFile must be of type *.{}!\n\n'.format(extension)) - input('Close program with ENTER...') - exit() - return (file_path,file_name) - -if __name__ == "__main__": - file_path, file_name = get_and_check_file("txt") - print("\nConverting {}...".format(file_name)) - with open(file_path,"r") as old_file: - with open(file_path[:-4] + "_steam.txt","w") as new_file: - for line in old_file.readlines(): - #handle issue id's - start_index = line.find("see #") + 5 - if start_index > 4: - end_index = line.find(")",start_index) - issue_id = line[start_index:end_index] - line = line[:(start_index-1)] + "[url=https://github.com/oOKexOo/AresModAchillesExpansion/issues/{0}]#{0}[/url]".format(issue_id) + line [end_index:] - else: - #handle normal links - start_index = line.find("see [") + 5 - if start_index > 4: - end_index = line.find("]",start_index) - link_text = line[start_index:end_index] - new_line = line[:(start_index-1)] + "[url=" - start_index = end_index + 2 - end_index = line.find(")",start_index) - link = line[start_index:end_index] - new_line += link + "]" + link_text + "[/url]" + line[(end_index+1):] - line = new_line - new_file.write(line) - print("\nConversion completed!") \ No newline at end of file diff --git a/Tools/markdown_test.txt b/Tools/markdown_test.txt deleted file mode 100644 index e9fbf777..00000000 --- a/Tools/markdown_test.txt +++ /dev/null @@ -1,11 +0,0 @@ -* Change: Several critical modules can no longer be added to Zeus (prevents unintended deletion). -* Change: Specify position (spawn attribute) was improved (it is now a valuable tool for placing objects on a carrier). -* Feature: Dynamic loadout as a vehicle attribute (ammo button). -* Feature: Deep copy works for dynamic loadouts. -* Feature: Spawn USS Freedom. -* Fix: Specify position (spawn attribute): Did not work for "Recent" tab. -* Fix: Vehicle respawn system was broken after 1.70 update. -* Fix: Set Date module was broken after 1.70 update. -* Fix: CAS modules: Most planes did not show up after 1.70 update. -* Fix: CAS modules did not support planes with dynamic loadouts. -* Fix: Earthquake module: Missing text in dialog (by CreepPork) \ No newline at end of file diff --git a/Tools/markdown_test_steam.txt b/Tools/markdown_test_steam.txt deleted file mode 100644 index e9fbf777..00000000 --- a/Tools/markdown_test_steam.txt +++ /dev/null @@ -1,11 +0,0 @@ -* Change: Several critical modules can no longer be added to Zeus (prevents unintended deletion). -* Change: Specify position (spawn attribute) was improved (it is now a valuable tool for placing objects on a carrier). -* Feature: Dynamic loadout as a vehicle attribute (ammo button). -* Feature: Deep copy works for dynamic loadouts. -* Feature: Spawn USS Freedom. -* Fix: Specify position (spawn attribute): Did not work for "Recent" tab. -* Fix: Vehicle respawn system was broken after 1.70 update. -* Fix: Set Date module was broken after 1.70 update. -* Fix: CAS modules: Most planes did not show up after 1.70 update. -* Fix: CAS modules did not support planes with dynamic loadouts. -* Fix: Earthquake module: Missing text in dialog (by CreepPork) \ No newline at end of file diff --git a/Tools/config_style_checker.py b/Tools/travis/config_style_checker.py similarity index 100% rename from Tools/config_style_checker.py rename to Tools/travis/config_style_checker.py diff --git a/Tools/sqf_validator.py b/Tools/travis/sqf_validator.py similarity index 100% rename from Tools/sqf_validator.py rename to Tools/travis/sqf_validator.py diff --git a/Tools/unsafe_rc.log b/Tools/unsafe_rc.log deleted file mode 100644 index e69de29b..00000000 diff --git a/Tools/getRemoteExecWhiteList.sh b/Tools/updateRemoteExecWhiteList.sh similarity index 97% rename from Tools/getRemoteExecWhiteList.sh rename to Tools/updateRemoteExecWhiteList.sh index 51c8da49..aebea40b 100644 --- a/Tools/getRemoteExecWhiteList.sh +++ b/Tools/updateRemoteExecWhiteList.sh @@ -22,7 +22,7 @@ if [[ "$(uname -s)" == "CYGWIN"* ]]; then PATH=/usr/bin:$PATH fi -cd "../@AresModAchillesExpansion/addons" +cd "../../@AresModAchillesExpansion/addons" script_list=$(find . -type f -name "*.sqf") for script in $script_list; do echo Searching in $script... From e7eea111ec3e16b42e2057b477ddfbd4795a7fcc Mon Sep 17 00:00:00 2001 From: oOKexOo Date: Sun, 17 Jun 2018 19:48:04 +0200 Subject: [PATCH 3/8] New mintty-tmux session launcher --- Tools/start-mintty.bat | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Tools/start-mintty.bat diff --git a/Tools/start-mintty.bat b/Tools/start-mintty.bat new file mode 100644 index 00000000..e907ba71 --- /dev/null +++ b/Tools/start-mintty.bat @@ -0,0 +1,10 @@ +@ECHO OFF +WHERE mintty > NUL +IF %ERRORLEVEL% NEQ 0 ( + ECHO ERROR: mintty not found! + ECHO You need to add mintty to the PATH env variable. + PAUSE + GOTO :EOF +) + +start "" mintty /bin/bash -lic "tmux new-session 'cd ../@AresModAchillesExpansion/addons;$SHELL'\; split-window -v -t 0 -p 1" From 46cff79f44cf6b958762940a0846f2cf5240f229 Mon Sep 17 00:00:00 2001 From: oOKexOo Date: Sun, 17 Jun 2018 19:50:44 +0200 Subject: [PATCH 4/8] Revised AddonBuilder batch script --- Tools/AchillesAddonBuilder.example | 106 +++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Tools/AchillesAddonBuilder.example diff --git a/Tools/AchillesAddonBuilder.example b/Tools/AchillesAddonBuilder.example new file mode 100644 index 00000000..ee6ba65f --- /dev/null +++ b/Tools/AchillesAddonBuilder.example @@ -0,0 +1,106 @@ +@echo off +set "startDir=%CD%" +REM switch to Achilles root folder +cd .. +set "AchillesRootFolderPath=%CD%" + +REM /******************************************************************************/ +REM Addon Builder script for windows (by Kex) +REM /******************************************************************************/ +REM +REM Description: +REM ------------ +REM Packs all folders in sourceDir and creates corresponding *.pbo in targetDir. +REM The script is parallelized and will create a window for each source folder. +REM +REM "Installation": +REM --------------- +REM 1) Copy AchillesAddonBuilder.bat.example and rename it to AchillesAddonBuilder.bat +REM 2) Adjust the USER CONFIGURATIONS below +REM 3) Make sure that the AchillesAddonBuilder from Arma 3 Tools is in the PATH env variable +REM +REM Usage +REM ----- +REM Command Line Arguments: +REM 1) (optional) version for bikey e.g. "0.0.1" ("dev" by default) +REM +REM Examples: +REM --------- +REM 1) AchillesAddonBuilder.bat 0.0.1 +REM 2) AchillesAddonBuilder.bat + +REM /******************************************************************************/ +REM START OF USER CONFIGURATIONS +REM /******************************************************************************/ + +REM optional argument: version of bikey: _.biprivatekey +set keyVersion=%1 + +REM Path for the folder where the source folders are located +set "sourceDir=%AchillesRootFolderPath%\@AresModAchillesExpansion\addons" +REM Path for the folder where the *.pbo's shall be moved +set "targetDir=%AchillesRootFolderPath%\@AresModAchillesExpansion\addons" +REM Prefix: you can access your addon files via \\\ +REM Prefix: if projPrefix is "" then \\ +set projPrefix=achilles +REM Prefix for your bikey: _.biprivatekey +set privKeyPrefix=achilles +REM Default version (if you don't specify the version as an argument): _dev.biprivatekey +REM if no argument is passed and keyVersionDefault="", then the addon doesn't get signed +set "keyVersionDefault=" +REM Folder where the biprivatekey is located +set "privKeyDir=%AchillesRootFolderPath%\@AresModAchillesExpansion\keys\private" +REM Temporary folder +set "tmpDir=%TEMP%" + +REM /******************************************************************************/ +REM END OF USER CONFIGURATIONS +REM /******************************************************************************/ + +REM get biprivatekey file name +set "privKey=" +if "%keyVersion%"=="" ( + if not "%keyVersionDefault%"=="" ( + set privKey=%privKeyPrefix%_%keyVersion%.biprivatekey + ) +) else ( + set privKey=%privKeyPrefix%_%keyVersion%.biprivatekey +) + +REM Check if paths are valid +set "invalidpath=" +if not exist "%sourceDir%" set "invalidpath=%sourceDir%" +if not exist "%targetDir%" set "invalidpath=%targetDir%" +if not "%privKey%"=="" ( + if not exist "%privKeyDir%\%privKey%" set "invalidpath=%privKeyDir%\%privKey%" +) +if not exist "%tmpDir%" set "invalidpath=%tmpDir%" +if not "%invalidpath%"=="" ( + call:PERROR "%invalidpath% not found!" + call:PERROR "Fix your USER CONFIGURATIONS!" + echo HINT: Opening %0 + start notepad %0 + echo. + pause + goto EOS +) + +cd /d %sourceDir% +for /d %%D in (*) do ( + if "%privKey%"=="" ( + start "AddonBuilder: %%D" cmd /c "AddonBuilder "%sourceDir%\%%D" "%targetDir%" -packonly -temp="%tmpDir%" -prefix="%projPrefix%\%%D" -binarizeFullLogs" + ) else ( + start "AddonBuilder: %%D" cmd /c "AddonBuilder "%sourceDir%\%%D" "%targetDir%" -packonly -temp="%tmpDir%" -sign="%privKeyDir%\%privKey%" -prefix="%projPrefix%\%%D" -binarizeFullLogs" + ) +) + +goto EOS + +:PERROR +%Windir%\System32\WindowsPowerShell\v1.0\Powershell.exe write-host -foregroundcolor Red "ERROR: %1" +GOTO:EOF + +:EOS +cd /d %startDir% +echo. + From f1ed0f26317282ffe2538ec216750d8abed51b55 Mon Sep 17 00:00:00 2001 From: oOKexOo Date: Sun, 17 Jun 2018 19:51:28 +0200 Subject: [PATCH 5/8] AchillesConnectToServer --- Tools/AchillesConnectToServer.bat.example | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 Tools/AchillesConnectToServer.bat.example diff --git a/Tools/AchillesConnectToServer.bat.example b/Tools/AchillesConnectToServer.bat.example new file mode 100644 index 00000000..726623a7 --- /dev/null +++ b/Tools/AchillesConnectToServer.bat.example @@ -0,0 +1,96 @@ +@echo off +set "startDir=%CD%" +REM switch to Achilles root folder +cd .. +set "AchillesRootFolderPath=%CD%" + +REM /******************************************************************************/ +REM AchillesConnectToServer.bat script for windows (by Kex) +REM /******************************************************************************/ +REM +REM Description: +REM ------------ +REM Packs all folders in sourceDir and creates corresponding *.pbo in targetDir. +REM The script is parallelized and will create a window for each source folder. +REM +REM "Installation": +REM --------------- +REM 1) Copy AchillesConnectToServer.bat.example and rename it to AchillesConnectToServer.bat +REM 2) Adjust the USER CONFIGURATIONS below +REM +REM Usage +REM ----- +REM Command Line Arguments: +REM 1) (optional) mode e.g. ace, all, ... (if nothing is passed, the defaults are used) +REM +REM Examples: +REM --------- +REM 1) AchillesConnectToServer.bat +REM 2) AddonBuilder.bat ace + +REM /******************************************************************************/ +REM START OF USER CONFIGURATIONS +REM /******************************************************************************/ + +REM PATH settings +set "AchillesModFolderPath=%AchillesRootFolderPath%\@AresModAchillesExpansion" +set "Arma3RootFolderPath=E:\Program Files\games\Steam\steamapps\common\Arma 3" + +REM Default settings +set ip=127.0.0.1:2302 +set "password=" +set "mods=!Workshop\@CBA_A3;%AchillesModFolderPath%" + +REM /******************************************************************************/ +REM START OF MODE CONFIGURATIONS (NON-DEFAULT SETTINGS) +REM /******************************************************************************/ + +set mode=%1 +REM ACE: ACE3 +if /I "%mode%"=="ace" ( + set "mods=%mods%;!Workshop\@ace" +REM ALL: ACE3+RHS+CUP +) else if /I "%mode%"=="all" ( + set "mods=%mods%;!Workshop\@ace;!Workshop\@CUP Units;!Workshop\@CUP Vehicles;!Workshop\@CUP Weapons;!Workshop\@CUP Terrains - Core;!Workshop\@CUP Terrains - CWA;!Workshop\@CUP Terrains - Maps;!Workshop\@RHSUSAF;!Workshop\@RHSSAF;!Workshop\@RHSGREF;!Workshop\@RHSAFRF;!Workshop\@ACE Compat - RHS Armed Forces of the Russian Federation;!Workshop\@ACE Compat - RHS- GREF;!Workshop\@ACE Compat - RHS United States Armed Forces" +) else if /I not "%mode%"=="" ( + echo Error: %mode% is not available! + exit /b +) else ( + REM DEFAULT SETTINGS +) + +REM /******************************************************************************/ +REM END OF CONFIGURATIONS +REM /******************************************************************************/ + +REM Check if paths are valid +set "invalidpath=" +if not exist "%AchillesModFolderPath%" set "invalidpath=%AchillesModFolderPath%" +if not exist "%Arma3RootFolderPath%\arma3_x64.exe" set "invalidpath=%Arma3RootFolderPath%\arma3_x64.exe" +if not "%invalidpath%"=="" ( + call:PERROR "%invalidpath% not found!" + call:PERROR "Fix your USER CONFIGURATIONS!" + echo HINT: Opening %0 + start notepad %0 + echo. + pause + goto EOS +) + + +REM Switch to ArmA 3 root directory +cd /D "%Arma3RootFolderPath%" + +echo Connecting to %ip% +start "" "arma3_x64.exe" -connect=%ip% -password=%password% -world=empty -skipIntro -noSplash -noPause -showScriptErrors "-name=Kex" "-profiles=profiles" "-mod=%mods%" + +goto EOS + +:PERROR +%Windir%\System32\WindowsPowerShell\v1.0\Powershell.exe write-host -foregroundcolor Red "ERROR: %1" +GOTO:EOF + +:EOS +cd /d %startDir% +echo. + From 2cf6f09de17e924aa8ce5f3af87297fec13fdc9a Mon Sep 17 00:00:00 2001 From: oOKexOo Date: Sun, 17 Jun 2018 19:52:13 +0200 Subject: [PATCH 6/8] Update gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 01417d73..d1f93146 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ @AresModAchillesExpansion/keys/private @Release/* +Tools/AchillesConnectToServer.bat +Tools/AchillesAddonBuilder.bat *.bikey *.biprivatekey *.pbo @@ -8,3 +10,4 @@ .vscode/ .idea *.ini +*.log From 08b7e6d24ee126cbd9820357b0d97ef7717f0ef1 Mon Sep 17 00:00:00 2001 From: oOKexOo Date: Mon, 18 Jun 2018 00:19:29 +0200 Subject: [PATCH 7/8] Rename Tools folder and add bat extension to AchillesAddonBuilder --- .../AchillesAddonBuilder.bat.example | 0 {Tools => tools}/AchillesConnectToServer.bat.example | 0 {Tools => tools}/cheatsheets/GitBash.md | 0 {Tools => tools}/cheatsheets/util_command_lines.sh | 0 {Tools => tools}/fixes/SqfVisibilityFixer.groovy | 0 {Tools => tools}/fixes/edit_custom_module_script.py | 0 {Tools => tools}/fixes/list_unsafe_remote_exec.log | 0 {Tools => tools}/fixes/list_unsafe_remote_exec.sh | 0 {Tools => tools}/start-mintty.bat | 0 {Tools => tools}/travis/config_style_checker.py | 0 {Tools => tools}/travis/sqf_validator.py | 0 {Tools => tools}/updateRemoteExecWhiteList.sh | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename Tools/AchillesAddonBuilder.example => tools/AchillesAddonBuilder.bat.example (100%) rename {Tools => tools}/AchillesConnectToServer.bat.example (100%) rename {Tools => tools}/cheatsheets/GitBash.md (100%) rename {Tools => tools}/cheatsheets/util_command_lines.sh (100%) rename {Tools => tools}/fixes/SqfVisibilityFixer.groovy (100%) rename {Tools => tools}/fixes/edit_custom_module_script.py (100%) rename {Tools => tools}/fixes/list_unsafe_remote_exec.log (100%) rename {Tools => tools}/fixes/list_unsafe_remote_exec.sh (100%) rename {Tools => tools}/start-mintty.bat (100%) rename {Tools => tools}/travis/config_style_checker.py (100%) rename {Tools => tools}/travis/sqf_validator.py (100%) rename {Tools => tools}/updateRemoteExecWhiteList.sh (100%) diff --git a/Tools/AchillesAddonBuilder.example b/tools/AchillesAddonBuilder.bat.example similarity index 100% rename from Tools/AchillesAddonBuilder.example rename to tools/AchillesAddonBuilder.bat.example diff --git a/Tools/AchillesConnectToServer.bat.example b/tools/AchillesConnectToServer.bat.example similarity index 100% rename from Tools/AchillesConnectToServer.bat.example rename to tools/AchillesConnectToServer.bat.example diff --git a/Tools/cheatsheets/GitBash.md b/tools/cheatsheets/GitBash.md similarity index 100% rename from Tools/cheatsheets/GitBash.md rename to tools/cheatsheets/GitBash.md diff --git a/Tools/cheatsheets/util_command_lines.sh b/tools/cheatsheets/util_command_lines.sh similarity index 100% rename from Tools/cheatsheets/util_command_lines.sh rename to tools/cheatsheets/util_command_lines.sh diff --git a/Tools/fixes/SqfVisibilityFixer.groovy b/tools/fixes/SqfVisibilityFixer.groovy similarity index 100% rename from Tools/fixes/SqfVisibilityFixer.groovy rename to tools/fixes/SqfVisibilityFixer.groovy diff --git a/Tools/fixes/edit_custom_module_script.py b/tools/fixes/edit_custom_module_script.py similarity index 100% rename from Tools/fixes/edit_custom_module_script.py rename to tools/fixes/edit_custom_module_script.py diff --git a/Tools/fixes/list_unsafe_remote_exec.log b/tools/fixes/list_unsafe_remote_exec.log similarity index 100% rename from Tools/fixes/list_unsafe_remote_exec.log rename to tools/fixes/list_unsafe_remote_exec.log diff --git a/Tools/fixes/list_unsafe_remote_exec.sh b/tools/fixes/list_unsafe_remote_exec.sh similarity index 100% rename from Tools/fixes/list_unsafe_remote_exec.sh rename to tools/fixes/list_unsafe_remote_exec.sh diff --git a/Tools/start-mintty.bat b/tools/start-mintty.bat similarity index 100% rename from Tools/start-mintty.bat rename to tools/start-mintty.bat diff --git a/Tools/travis/config_style_checker.py b/tools/travis/config_style_checker.py similarity index 100% rename from Tools/travis/config_style_checker.py rename to tools/travis/config_style_checker.py diff --git a/Tools/travis/sqf_validator.py b/tools/travis/sqf_validator.py similarity index 100% rename from Tools/travis/sqf_validator.py rename to tools/travis/sqf_validator.py diff --git a/Tools/updateRemoteExecWhiteList.sh b/tools/updateRemoteExecWhiteList.sh similarity index 100% rename from Tools/updateRemoteExecWhiteList.sh rename to tools/updateRemoteExecWhiteList.sh From 48a60b413ad173d4ad59b246008aaae53c6de9be Mon Sep 17 00:00:00 2001 From: oOKexOo Date: Mon, 18 Jun 2018 00:23:08 +0200 Subject: [PATCH 8/8] Fix travis tools path --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 03562df8..2fe0ba15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,12 @@ python: before_script: - pip3 install sqflint script: - - python3 Tools/travis/sqf_validator.py - - python3 Tools/travis/config_style_checker.py + - python3 tools/travis/sqf_validator.py + - python3 tools/travis/config_style_checker.py - sqflint -d @AresModAchillesExpansion/addons notifications: email: false webhooks: urls: - https://mechilles.herokuapp.com/webhook - on_success: change \ No newline at end of file + on_success: change