Advertisement
CreedWN

Creed's GMod Addon Uploader

Nov 23rd, 2016
715
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 17.24 KB | None | 0 0
  1. ::Official Location--https://pastebin.com/raw/B4sFSxu8
  2. @echo off
  3. :Logo
  4. echo                                              _
  5. echo     _____ _____  ______ ______ _____   (_) _____
  6. echo    / ____^|  __ \^|  ____^|  ____^|  __ \  ^|/ / ____^|
  7. echo        ^| ^|    ^| ^|__) ^| ^|__  ^| ^|__  ^| ^|  ^| ^|   ^| (___  
  8. echo           ^| ^|    ^|  _  /^|  __^| ^|  __^| ^| ^|  ^| ^|    \___ \
  9. echo           ^| ^|____^| ^| \ \^| ^|____^| ^|____^| ^|__^| ^|    ____) ^|
  10. echo            \_____^|_^|  \_\______^|______^|_____/    ^|_____/
  11. echo[
  12. echo __          ______  _____  _  __ _____ _    _  ____  _____  
  13. echo \ \        / / __ \^|  __ \^| ^|/ // ____^| ^|  ^| ^|/ __ \^|  __ \
  14. echo  \ \  /\  / / ^|  ^| ^| ^|__) ^| ' /^| (___ ^| ^|__^| ^| ^|  ^| ^| ^|__) ^|
  15. echo   \ \/  \/ /^| ^|  ^| ^|  _  /^|  ^<  \___ \^|  __  ^| ^|  ^| ^|  ___/
  16. echo    \  /\  / ^| ^|__^| ^| ^| \ \^| . \ ____) ^| ^|  ^| ^| ^|__^| ^| ^|    
  17. echo     \/  \/   \____/^|_^|  \_\_^|\_\_____/^|_^|  ^|_^|\____/^|_^|    
  18. echo[
  19. echo            _______ ____   ____  _       _____
  20. echo           ^|__   __/ __ \ / __ \^| ^|     / ____^|
  21. echo              ^| ^| ^| ^|  ^| ^| ^|  ^| ^| ^|    ^| (___  
  22. echo              ^| ^| ^| ^|  ^| ^| ^|  ^| ^| ^|     \___ \
  23. echo              ^| ^| ^| ^|__^| ^| ^|__^| ^| ^|____ ____) ^|
  24. echo              ^|_^|  \____/ \____/^|______^|_____/
  25.                          
  26. if "1"=="%Loaded%" (echo[&&echo Thank you for using my program. Exiting.)                                    
  27. timeout /t 2 /nobreak > NUL
  28. if "1"=="%Loaded%" (exit)
  29. goto Initialize      
  30. :Initialize
  31. regedit /e reg_exported.tmp "HKEY_CURRENT_USER\Software\Valve\Steam"
  32. find "SteamExe" reg_exported.tmp | findstr "SteamExe" >> line_exported.tmp
  33. set /p SteamPath= < line_exported.tmp
  34. set SteamPath="F:/Steam"
  35. del reg_exported.tmp
  36. del line_exported.tmp
  37. echo Loading...
  38. echo[
  39. echo[
  40. echo ----Steam Test--
  41. cd /d %SteamPath:~1,-11%
  42. if exist Steam.exe (echo --PASS&&set Error1=0) else (echo --CRITICAL FAILURE, STEAM NOT FOUND&&set Error1=1)
  43. set GModPath="%SteamPath:~1,-11%/steamapps/common/GarrysMod"
  44. set GModAddons=%GmodPath:~0,-1%/garrysmod/addons/"
  45. set BinPath=%GmodPath:~0,-1%/bin/"
  46. cd /d %BinPath%
  47. echo ----GMA Extractor and Creator (gmad.exe) Test--
  48. if exist gmad.exe (echo --PASS&&set Error2=0) else (echo --ERROR: NOT FOUND&&set Error2=1)
  49. set gmpublish = "%BinPath%/gmpublish.exe"
  50. echo ----GMA Publisher and Updater (gmpublish.exe) Test--
  51. if exist gmpublish.exe (echo --PASS&&set Error3=0) else (echo --ERROR: NOT FOUND&&set Error3=1)
  52. echo ----Windows XP Test--
  53. ver | findstr /i "5\.1\."
  54. if %ERRORLEVEL% EQU 0 (echo --ERROR: DOES NOT WORK ON XP&&set Error4=1) else (echo --PASS&&set Error4=0)
  55. echo[
  56. echo[
  57. echo Load complete.
  58. echo -------------------------------
  59. echo[
  60. if "0000"=="%Error1%%Error2%%Error3%%Error4%" (
  61.     echo Loaded successfuly!
  62.     set Loaded=1
  63.     goto MainMenu
  64. )
  65. if not "0000"=="%Error1%%Error2%%Error3%%Error4%" (
  66.     echo There was an error. (Or 4.)
  67.     echo (Try running in Administrator mode, right click this and click "Run as Administrator"!)
  68.     echo Please take a look above and find the error.
  69.     echo It is entirely possible you cannot fix this on your own.
  70.     echo Please contact Creed, either on steam or commenting on the guide.
  71.     echo This program will now close.
  72.     pause
  73.     exit
  74. )
  75.  
  76. :MainMenu
  77. cd /d %BinPath%
  78. cls
  79. echo                         MAIN MENU
  80. echo      Press the number of the program you want to use.
  81. echo[
  82. echo ---------------------------------------------------------------
  83. echo 1) Create an "addon.json" (Do this before publishing)
  84. echo 2) Fix [Filename contains captial letters] error
  85. echo[
  86. echo 3) Publish your workshop addon (It's not on the workshop)
  87. echo 4) Update your workshop addon (Already on workshop)
  88. echo[
  89. echo 5) Open GarrysMod Directory
  90. echo 6) Tutorial (IF YOU HAVEN'T SEEN THE GUIDE, PRESS THIS)
  91. echo[
  92. echo 7) Exit
  93. echo ---------------------------------------------------------------
  94. echo[
  95. CHOICE /N /C 1234567 %1
  96. if ERRORLEVEL 7 cls&&goto Logo&&exit
  97. if ERRORLEVEL 6 goto TutorialGuideWarn
  98. if ERRORLEVEL 5 goto OpenDir
  99. if ERRORLEVEL 4 goto UpdateProc
  100. if ERRORLEVEL 3 goto PublishProc
  101. if ERRORLEVEL 2 goto LowercaseConverter
  102. if ERRORLEVEL 1 goto JsonCreator
  103.  
  104. :OpenDir
  105. cd /d %GmodPath%
  106. start garrysmod
  107. cls
  108. echo Opened Main Directory. Returning to main menu.
  109. echo[
  110. pause
  111. goto MainMenu
  112. :TutorialGuideWarn
  113. cls
  114. echo If you are reading this, chances are you haven't read my guides.
  115. echo Please see if they apply to you.
  116. echo[
  117. echo ----------------------------------------------------------------
  118. echo How to upload maps (Specific and Easy)
  119. echo http://steamcommunity.com/sharedfiles/filedetails/?id=805217231
  120. echo[
  121. echo How to upload addons (General)
  122. echo http://steamcommunity.com/sharedfiles/filedetails/?id=805218730
  123. echo ----------------------------------------------------------------
  124. echo[
  125. pause
  126. goto Tutorial
  127. :Tutorial
  128. cls
  129. echo Here's some things that you should have.
  130. echo #1:
  131. echo ------
  132. echo Your addon should have its own folder (all lowercase, no spaces, preferably dashes) in:
  133. echo[
  134. echo %GmodAddons%
  135. echo[
  136. pause
  137.  
  138. cls
  139. echo #2:
  140. echo ------
  141. echo Inside, there should be a 512x512 "JPG" picture of your addon.
  142. echo This picture should be inside your root folder, named "icon.jpg".
  143. echo[
  144. echo Example:
  145. echo %GmodAddons:~0,-1%YOUR-ADDON-NAME/icon.jpg"
  146. echo[
  147. pause
  148.  
  149. cls
  150. echo #3:
  151. echo ------
  152. echo The hard part, the addon.json.
  153. echo There'll be an option for you to use my program to help you make this easily.
  154. echo[
  155. echo If you want to do it manually, go to
  156. echo[
  157. echo https://wiki.garrysmod.com/page/Workshop_Addon_Creation#addon.json
  158. echo[
  159. pause
  160.  
  161. cls
  162. echo #4:
  163. echo ------
  164. echo There should be nothing out of place. Workshop is very particular.
  165. echo[
  166. echo If you have any files out of place or files that shouldn't be in an addon (.txt files for instance), it will BREAK.
  167. echo[
  168. echo This is very important and is usually the reason people give up or get stuck on uploading.
  169. echo[
  170. pause
  171.  
  172. cls
  173. echo If you've got all that, let's begin!
  174. echo If not, just press the tutorial button in the main menu again.
  175. echo[
  176. pause
  177. goto MainMenu
  178.  
  179. :LowercaseConverter
  180. cls
  181. echo What is the folder of your addon in "garrysmod/addons/" called?
  182. set /p AddonName="Addon Folder Name: "
  183. echo[
  184. echo So it's located at %GmodAddons:~0,-1%%AddonName%"?
  185. set AddonPath=%GmodAddons:~0,-1%%AddonName%"
  186. echo [Press Y for Yes / Press N for No]
  187. CHOICE /N /C YN %1
  188. if ERRORLEVEL 2 goto LowercaseConverter
  189. if ERRORLEVEL 1 goto LowercaseConverter2
  190.  
  191. :LowercaseConverter2
  192. cls
  193. cd /d %AddonPath%
  194. echo WARNING: If for some reason your addon has case-sensitive code, this will break it!
  195. echo This may be true for materials, models and sounds as well.
  196. echo But if you're using the above and they're uppercase, they've probably never been on the workshop.
  197. echo You're a pioneer!
  198. echo[
  199. echo Press Y if you're sure.
  200. echo Press N to return to main menu.
  201. CHOICE /N /C YN %1
  202. if ERRORLEVEL 2 goto MainMenu
  203. if ERRORLEVEL 1 goto LowercaseConverter3
  204.  
  205. :LowercaseConverter3
  206. cls
  207. cd /d %AddonPath%
  208. echo Currently in:
  209. cd
  210. echo[
  211. setlocal enabledelayedexpansion
  212. for /f "tokens=*" %%a in ('dir/b/s/l') do (
  213.     set f=%%a
  214.     set f=!f:%%~dpa=!
  215.     ren "%%a" "!f!"
  216. )
  217. setlocal disabledelayedexpansion
  218. echo Done! Returning to main menu.
  219. pause
  220. goto MainMenu
  221.  
  222. :JsonCreator
  223. cls
  224. echo *WARNING*
  225. echo If you have an "addon.json" hand-made, THIS WILL DELETE IT!
  226. echo If you are following the guide you do not have this file, don't worry. Press Y.
  227. echo[
  228. echo Press Y to continue.
  229. echo Press N to go back to the main menu.
  230. echo Press X to JSON.
  231. echo[
  232.  
  233. CHOICE /N /C YNX %1
  234. if ERRORLEVEL 3 goto Jason
  235. if ERRORLEVEL 2 goto MainMenu
  236. if ERRORLEVEL 1 goto JsonCreator2
  237.  
  238. :Jason
  239. cls
  240. echo Congratulations, you know your memes.
  241. echo (Insert heavy rain reference here)
  242. pause
  243. goto Json
  244.  
  245. :JsonCreator2
  246. cls
  247. echo What is the folder of your addon in "garrysmod/addons/" called?
  248. set /p AddonName="Addon Folder Name: "
  249. echo[
  250. echo So it's located at %GmodAddons:~0,-1%%AddonName%"?
  251. set AddonPath=%GmodAddons:~0,-1%%AddonName%"
  252. echo [Press Y for Yes / Press N for No]
  253. CHOICE /N /C YN %1
  254. if ERRORLEVEL 2 goto JsonCreator
  255. if ERRORLEVEL 1 goto JsonCreator3
  256.  
  257. :JsonCreator3
  258. cls
  259. cd /d %AddonPath%
  260. echo         ADDON.JSON CREATION
  261. if exist addon.json (del addon.json&&echo --Deleted addon.json file, sorry.--)
  262. echo {>> addon.json
  263. @echo   "title":"%AddonName%",>>addon.json
  264. echo What type of addon is this?
  265. echo 1: "ServerContent"
  266. echo 2: "gamemode"
  267. echo 3: "map"
  268. echo 4: "weapon"
  269. echo 5: "vehicle"
  270. echo 6: "npc"
  271. echo 7: "tool"
  272. echo 8: "effects"
  273. echo 9: "model"
  274. CHOICE /N /C 123456789 %1
  275.  
  276. if ERRORLEVEL 9 set Type="model"&&goto TypeProc
  277. if ERRORLEVEL 8 set Type="effects"&&goto TypeProc
  278. if ERRORLEVEL 7 set Type="tool"&&goto TypeProc
  279. if ERRORLEVEL 6 set Type="npc"&&goto TypeProc
  280. if ERRORLEVEL 5 set Type="vehicle"&&goto TypeProc
  281. if ERRORLEVEL 4 set Type="weapon"&&goto TypeProc
  282. if ERRORLEVEL 3 set Type="map"&&goto TypeProc
  283. if ERRORLEVEL 2 set Type="gamemode"&&goto TypeProc
  284. if ERRORLEVEL 1 set Type="ServerContent"&&goto TypeProc
  285.  
  286. :TypeProc
  287. cls
  288. echo Type Chosen: %Type%
  289. @echo   "type":%Type%,>>addon.json
  290. echo[
  291. echo[
  292. echo Select 2 tags for your addon.
  293. echo Tag 1:
  294. echo[
  295. echo #1: "fun"
  296. echo #2: "roleplay"
  297. echo #3: "scenic"
  298. echo #4: "movie"
  299. echo #5: "realism"
  300. echo #6: "cartoon"
  301. echo #7: "water"
  302. echo #8: "comic"
  303. echo #9: "build"
  304. CHOICE /N /C 123456789 %1
  305.  
  306. if ERRORLEVEL 9 set Tag1="build"&&goto Tag1Proc
  307. if ERRORLEVEL 8 set Tag1="comic"&&goto Tag1Proc
  308. if ERRORLEVEL 7 set Tag1="water"&&goto Tag1Proc
  309. if ERRORLEVEL 6 set Tag1="cartoon"&&goto Tag1Proc
  310. if ERRORLEVEL 5 set Tag1="realism"&&goto Tag1Proc
  311. if ERRORLEVEL 4 set Tag1="movie"&&goto Tag1Proc
  312. if ERRORLEVEL 3 set Tag1="scenic"&&goto Tag1Proc
  313. if ERRORLEVEL 2 set Tag1="roleplay"&&goto Tag1Proc
  314. if ERRORLEVEL 1 set Tag1="fun"&&goto Tag1Proc
  315.  
  316. :Tag1Proc
  317. cls
  318. echo Type Chosen: %Type%
  319. echo[
  320. echo[
  321. echo Select 2 tags for your addon.
  322. echo Tag 2:
  323. echo[
  324.  
  325. if /I "fun"==%Tag1% (echo **"fun"&&set ChosenTag=1) else (echo #1: "fun")
  326. if /I "roleplay"==%Tag1% (echo **"roleplay"&&set ChosenTag=2) else (echo #2: "roleplay")
  327. if /I "scenic"==%Tag1% (echo **"scenic"&&set ChosenTag=3) else (echo #3: "scenic")
  328. if /I "movie"==%Tag1% (echo **"movie"&&set ChosenTag=4) else (echo #4: "movie")
  329. if /I "realism"==%Tag1% (echo **"realism"&&set ChosenTag=5) else (echo #5: "realism")
  330. if /I "cartoon"==%Tag1% (echo **"cartoon"&&set ChosenTag=6) else (echo #6: "cartoon")
  331. if /I "water"==%Tag1% (echo **"water"&&set ChosenTag=7) else (echo #7: "water")
  332. if /I "comic"==%Tag1% (echo **"comic"&&set ChosenTag=8) else (echo #8: "comic")
  333. if /I "build"==%Tag1% (echo **"build"&&set ChosenTag=9) else (echo #9: "build")
  334. CHOICE /N /C 123456789 %1
  335.  
  336. if %ERRORLEVEL%==%ChosenTag% (goto Tag1Proc)
  337. if ERRORLEVEL 9 set Tag2="build"&&goto Tag2Proc
  338. if ERRORLEVEL 8 set Tag2="comic"&&goto Tag2Proc
  339. if ERRORLEVEL 7 set Tag2="water"&&goto Tag2Proc
  340. if ERRORLEVEL 6 set Tag2="cartoon"&&goto Tag2Proc
  341. if ERRORLEVEL 5 set Tag2="realism"&&goto Tag2Proc
  342. if ERRORLEVEL 4 set Tag2="movie"&&goto Tag2Proc
  343. if ERRORLEVEL 3 set Tag2="scenic"&&goto Tag2Proc
  344. if ERRORLEVEL 2 set Tag2="roleplay"&&goto Tag2Proc
  345. if ERRORLEVEL 1 set Tag2="fun"&&goto Tag2Proc
  346. :Tag2Proc
  347. @echo   "tags":[ %Tag1%, %Tag2% ],>>addon.json
  348. @echo   "ignore":>>addon.json
  349. @echo   [>>addon.json
  350. set LastIgnore=icon.jpg
  351. goto IgnoreProc
  352.  
  353. :IgnoreProc
  354. cls
  355. echo What files do you want to ignore?
  356. echo Just press enter unless you have an error in the "Creating your file" part or you're an advanced user.
  357. echo[
  358. echo Please type without quotes.
  359. echo[
  360. echo To list multiple files, end your input with a comma. Otherwise, with nothing.
  361. echo An example of multiple files, where a new line is "enter":
  362. echo ----------------------------------------------------------
  363. echo *.svn,
  364. echo readme.txt,
  365. echo materials/materialslist.txt
  366. echo ----------------------------------------------------------
  367. echo[
  368. echo[
  369. set /p Ignore="Ignore: "
  370. ::This is done in an inefficient manner. I don't trust those else statements. If anyone wants to change the below to else, be my guest.
  371. if icon.jpg==%LastIgnore% (
  372.     if "%Ignore:~-1%"=="~-1" (
  373.         @echo       "icon.jpg">>addon.json
  374.         @echo   ]>>addon.json
  375.         @echo }>>addon.json
  376.         goto JsonFinish
  377.     )
  378.     if "%Ignore:~-1%"=="," (
  379.         @echo       "icon.jpg",>>addon.json
  380.         set LastIgnore=%Ignore%
  381.         goto IgnoreProc
  382.     )
  383.     if not "%Ignore:~-1%"=="," (
  384.         @echo       "icon.jpg",>>addon.json
  385.         @echo       "%Ignore%">>addon.json
  386.         @echo   ]>>addon.json
  387.         @echo }>>addon.json
  388.         goto JsonFinish
  389.     )
  390. )
  391. if not icon.jpg==%LastIgnore% (
  392.     if "%Ignore%"=="%LastIgnore%" (
  393.         if "%LastIgnore:~-1%"=="," (
  394.             @echo       "%LastIgnore:~0,-1%">>addon.json
  395.         )
  396.         if not "%LastIgnore:~-1%"=="," (
  397.             @echo       "%LastIgnore%">>addon.json
  398.         )
  399.         @echo   ]>>addon.json
  400.         @echo }>>addon.json
  401.         goto JsonFinish
  402.     )
  403.     if "%Ignore:~-1%"=="," (
  404.         @echo       "%LastIgnore:~0,-1%",>>addon.json
  405.         set LastIgnore=%Ignore%
  406.         goto IgnoreProc
  407.     )
  408.     if not "%Ignore:~-1%"=="," (
  409.         @echo       "%LastIgnore:~0,-1%",>>addon.json
  410.         @echo       "%Ignore%">>addon.json
  411.         @echo   ]>>addon.json
  412.         @echo }>>addon.json
  413.         goto JsonFinish
  414.     )
  415. )
  416.  
  417. :JsonFinish
  418. cls
  419. echo Here's what your completed addon.json file looks like!
  420. echo ---------------------------------
  421. echo[
  422. echo[
  423. FOR /F "tokens=*" %%i IN (addon.json) DO @ECHO %%i
  424. echo ---------------------------------
  425. @echo Automatically added icon.jpg
  426. echo ---------------------------------
  427. echo[
  428. echo[
  429.  
  430. echo If this looks correct, press Y to go back to the main menu.
  431. echo If it doesn't, press N to start over.
  432. CHOICE /N /C YN %1
  433. if ERRORLEVEL 2 goto JsonCreator
  434. if ERRORLEVEL 1 goto MainMenu
  435.  
  436. :PublishProc
  437. cls
  438. echo So you're publishing your addon for the first time.
  439. echo What is the folder of your addon in "garrysmod/addons/" called?
  440. set /p AddonName="Addon Folder Name: "
  441. echo[
  442. echo So it's located at %GmodAddons:~0,-1%%AddonName%"?
  443. set AddonPath=%GmodAddons:~0,-1%%AddonName%"
  444. echo [Press Y for Yes / Press N for No]
  445. CHOICE /N /C YN %1
  446. if ERRORLEVEL 2 goto PublishProc
  447. if ERRORLEVEL 1 goto PublishProc2
  448.  
  449. :PublishProc2
  450. cls
  451. echo Creating your file. Please look out for any lines in red.
  452. pause
  453. cls
  454. gmad create -folder ../garrysmod/addons/%AddonName%/ -out ../garrysmod/%AddonName%.gma -warninvalid
  455. echo[
  456. echo[
  457. echo[
  458. echo[
  459. echo Are there any lines in red?
  460. echo If there aren't, press "N" to begin uploading.
  461. echo If there are, please fix them before pressing "Y" to try again.
  462. CHOICE /N /C YN %1
  463. if ERRORLEVEL 2 goto PublishProc3
  464. if ERRORLEVEL 1 goto PublishProc2
  465.  
  466. :PublishProc3
  467. cls
  468. echo Uploading your file. Please look out for any errors.
  469. pause
  470. cls
  471. gmpublish create -addon ../garrysmod/%AddonName%.gma -icon ../garrysmod/addons/%AddonName%/icon.jpg
  472. echo[
  473. echo[
  474. echo[
  475. echo[
  476. echo[
  477. echo[
  478. echo You should see:
  479. echo[
  480. echo -----------------------------------------------
  481. echo Your file is marked as private - only you will be able to see it.
  482. echo Please mark it as public only when you have tested it!!
  483. echo -----------------------------------------------
  484. echo[
  485. echo Aside from that, are there any lines in red?
  486. echo If there aren't, press "N" to finish.
  487. echo If there are, please fix them before pressing "Y" to try again.
  488. CHOICE /N /C YN %1
  489. if ERRORLEVEL 2 goto PublishProc4
  490. if ERRORLEVEL 1 goto PublishProc
  491.  
  492. :PublishProc4
  493. cls
  494. cd /d ../garrysmod
  495. del "%AddonName%.gma"
  496. echo Congratulations! You've published "%AddonName%"! Returning to main menu.
  497. pause
  498. goto MainMenu
  499.  
  500.  
  501. :UpdateProc
  502. cls
  503. gmpublish list
  504. echo[
  505. echo[
  506. echo[
  507. echo Above is a list of your addons on the workshop. Please input the number of the addon (e.g., 799449579).
  508. set /p AddonID="Addon ID: "
  509. echo[
  510. echo The ID you put in is "%AddonID%".
  511. echo Is this correct?
  512. echo [Press Y for Yes / Press N for No]
  513. CHOICE /N /C YN %1
  514. if ERRORLEVEL 2 goto UpdateProc
  515. if ERRORLEVEL 1 goto UpdateProc2
  516.  
  517.  
  518. :UpdateProc2
  519. cls
  520. echo What is the folder of your addon in "garrysmod/addons/" called?
  521. set /p AddonName="Addon Folder Name: "
  522. echo[
  523. echo So it's located at %GmodAddons:~0,-1%%AddonName%"?
  524. set AddonPath=%GmodAddons:~0,-1%%AddonName%"
  525. echo [Press Y for Yes / Press N for No]
  526. CHOICE /N /C YN %1
  527. if ERRORLEVEL 2 goto UpdateProc2
  528. if ERRORLEVEL 1 goto UpdateProc3
  529.  
  530. :UpdateProc3
  531. cls
  532. echo Creating your file. Please look out for any lines in red.
  533. pause
  534. cls
  535. gmad create -folder ../garrysmod/addons/%AddonName%/ -out ../garrysmod/%AddonName%.gma -warninvalid
  536. echo[
  537. echo[
  538. echo[
  539. echo[
  540. echo Are there any lines in red?
  541. echo If there aren't, press "N" to begin uploading.
  542. echo If there are, please fix them before pressing "Y" to try again.
  543. CHOICE /N /C YN %1
  544. if ERRORLEVEL 2 goto UpdateProc4
  545. if ERRORLEVEL 1 goto UpdateProc3
  546.  
  547. :UpdateProc4
  548. cls
  549. echo Uploading your file. Please look out for any errors.
  550. pause
  551. cls
  552. gmpublish update -id %AddonID% -addon ../garrysmod/%AddonName%.gma
  553. echo[
  554. echo[
  555. echo[
  556. echo[
  557. echo[
  558. echo[
  559. echo You should see:
  560. echo[
  561. echo -----------------------------------------------
  562. echo Committing.. (this can take a long time)
  563. echo Success!
  564. echo -----------------------------------------------
  565. echo[
  566. echo If you do, press "N".
  567. echo If you don't, fix any errors shown, then press "Y".
  568. CHOICE /N /C YN %1
  569. if ERRORLEVEL 2 goto UpdateProc5
  570. if ERRORLEVEL 1 goto UpdateProc2
  571.  
  572. :UpdateProc5
  573. cls
  574. cd /d ../garrysmod
  575. del "%AddonName%.gma"
  576. echo Congratulations! You've updated "%AddonName%"! Return to main menu.
  577. pause
  578. goto MainMenu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement