Closed harry0498 closed 3 years ago
You should not be renaming includes at all, they are completely managed by sampctl, everything should already be included with the package, you simply need to do sampctl p ensure
to download the dependencies before building it with sampctl p build
and finally doing sampctl p run
to run it.
You should not be renaming includes at all, they are completely managed by sampctl, everything should already be included with the package, you simply need to do
sampctl p ensure
to download the dependencies before building it withsampctl p build
and finally doingsampctl p run
to run it.
I tried to do sampctl p ensure
then sampctl p build
without changing any of the files but I get this error:
dependencies/samp-Hellfire/gamemodes/sffa.pwn:29 (fatal) cannot read from file: "CTime"
Build encountered fatal error
heres whats at sffa.pwn:29
...
#include <CTime> // By RyDeR: http://forum.sa-mp.com/showthread.php?t=294054
...
My thinking is that WIndows would be able to find CTime
because its not case-sensitive with file naming, but Linux is case-sensitive. Is there a way to tell sampctl to ignore case?
case doesn't matter at all, we already handle that. This repo has already been tested on different platforms, so we know it works fine. Your issue is something else related to what you've done.
Wait hold on a second, what the hell are you doing??? dependencies/samp-Hellfire/gamemodes/sffa.pwn
why are you inside the depedencies? are you adding hellfire as a dependency? that won't work at all
Here are the steps I've done, I don't think I've done anything wrong but maybe you might notice something:
mkdir mysampserver && cd mysampserver
sampctl p init
? Preferred package format json
? Your Name - If you plan to release, must be your GitHub username. root
? Package Name - If you plan to release, must be the GitHub project name. mysampserver
? Package Type - Are you writing a gamemode or a reusable library? gamemode
? Add a .gitignore and .gitattributes files? No
? Add a README.md file? No
? Select your text editor vscode
? Add standard library dependency? Yes
? Scan for dependencies? Yes
? Initialise a git repository? No
? Add a .travis.yml for unit testing? No
? No .pwn or .inc files - enter name for new script test.pwn
samp-Hellfire
sampctl p install Southclaws/samp-Hellfire
{
"user": "samp",
"repo": "mysampserver",
"entry": "dependencies/samp-Hellfire/gamemodes/sffa.pwn",
"output": "gamemodes/sffa.amx",
"dependencies": [
"pawn-lang/pawn-stdlib",
"sampctl/samp-stdlib",
"Southclaws/samp-Hellfire"
],
"local": true,
"runtime": {
...
},
"builds": [
{
"name": "",
"args": ["-;+", "-(+", "-d3", "-Z+"],
"includes": [
"./include"
],
"compiler": {}
}
]
}
sampctl p ensure
sampctl p build
Then I get the CTime error:
/home/<user>/mysampserver/dependencies/samp-Hellfire/gamemodes/sffa.pwn:29 (fatal) cannot read from file: "CTime"
Build encountered fatal error
The CTime.inc file is located at (downloaded as a dependency, I have not modified this file, or any other files unless listed in the above steps):
/home/<user>/mysampserver/dependencies/pawn-ctime/ctime.inc
Just submit a PR to hellfire changing the case of the include.
Wait hold on a second, what the hell are you doing???
dependencies/samp-Hellfire/gamemodes/sffa.pwn
why are you inside the depedencies? are you adding hellfire as a dependency? that won't work at all
I have tried to clone the repo and build it from that, I get the same error.
Just submit a PR to hellfire changing the case of the include.
This isnt just an issue with samp-Hellfire, it happens with its dependencies too, also some other gamemodes ive tested.
This is just a mistake on the part of library/gamemode authors (like me) - nothing sampctl can do about it.
Windows is case insensitive, Linux is case sensitive.
Hi,
I am using sampctl on Linux and struggling with the includes. I have installed your samp-Hellfire package and set my
entry
todependencies/samp-Hellfire/gamemodes/sffa.pwn
in my pawn.json and while building it keeps failing to read the includes as they are case sensitive.It failed with ctime.inc and Balloon.inc because sffa.pwn was including CTime and balloon.
Build Flags:
I have also tried downloading and building with the
sampctl --platform=linux
flag.After renaming the .inc files it fixed the CTime and balloon errors, but now i'm having issues with YSI. It's also a pain to keep renaming the dependencies .inc files. Is there a fix for this? A flag maybe?